This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.
Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
Hi!
sysconf (_SC_MONOTONIC_CLOCK) should return -1 not 0
if monotonic clock support is not available on the system.
2003-03-27 Jakub Jelinek <jakub at redhat dot com>
* sysdeps/unix/sysv/linux/sysconf.c (__sysconf) <_SC_MONOTONIC_CLOCK>:
Return -1 instead of 0 if clock_getres failed.
--- libc/sysdeps/unix/sysv/linux/sysconf.c.jj 2003-03-22 18:32:37.000000000 -0500
+++ libc/sysdeps/unix/sysv/linux/sysconf.c 2003-03-27 08:12:20.000000000 -0500
@@ -42,7 +42,7 @@ __sysconf (int name)
INTERNAL_SYSCALL_DECL (err);
int r;
r = INTERNAL_SYSCALL (clock_getres, err, 2, CLOCK_MONOTONIC, &ts);
- return INTERNAL_SYSCALL_ERROR_P (r, err) ? 0 : 1;
+ return INTERNAL_SYSCALL_ERROR_P (r, err) ? -1 : 1;
}
#endif
Jakub
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |