public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Fix sysconf (_SC_MONOTONIC_CLOCK)
@ 2003-03-27 16:51 Jakub Jelinek
  2003-03-27 19:40 ` Ulrich Drepper
  0 siblings, 1 reply; 2+ messages in thread
From: Jakub Jelinek @ 2003-03-27 16:51 UTC (permalink / raw)
  To: Ulrich Drepper, Roland McGrath; +Cc: Glibc hackers

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@redhat.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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Fix sysconf (_SC_MONOTONIC_CLOCK)
  2003-03-27 16:51 [PATCH] Fix sysconf (_SC_MONOTONIC_CLOCK) Jakub Jelinek
@ 2003-03-27 19:40 ` Ulrich Drepper
  0 siblings, 0 replies; 2+ messages in thread
From: Ulrich Drepper @ 2003-03-27 19:40 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: Roland McGrath, Glibc hackers

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jakub Jelinek wrote:

> sysconf (_SC_MONOTONIC_CLOCK) should return -1 not 0
> if monotonic clock support is not available on the system.

Thanks, I've applied it.

- -- 
- --------------.                        ,-.            444 Castro Street
Ulrich Drepper \    ,-----------------'   \ Mountain View, CA 94041 USA
Red Hat         `--' drepper at redhat.com `---------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+gzss2ijCOnn/RHQRAkM2AKDN1TMKEqflMdY+rs/TpkbrIhlJ7ACfStUc
Y3E4TFVZn6hEsjAerrhB+ho=
=+jzZ
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-03-27 17:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-27 16:51 [PATCH] Fix sysconf (_SC_MONOTONIC_CLOCK) Jakub Jelinek
2003-03-27 19:40 ` Ulrich Drepper

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).