public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] time() syscall on i386
@ 2005-12-16 15:29 Thorsten Kukuk
  2005-12-20  8:00 ` Ulrich Drepper
  0 siblings, 1 reply; 2+ messages in thread
From: Thorsten Kukuk @ 2005-12-16 15:29 UTC (permalink / raw)
  To: libc-hacker


Hi,

the time() syscall wrapper on i386 is inconsistent with the time()
implementations from time/time.c and sysdeps/unix/time.c as used on
other architectures.

On i386 time() returns in error case -errno, in the other implementations
for the other architectures -1 is returned and errno adjusted.

So I propose the following patch to get i386 back in sync with the
other architectures and make it conforming to POSIX:


2005-12-16  Thorsten Kukuk  <kukuk@suse.de>

	* sysdeps/unix/sysv/linux/i386/syscalls.list (time): Remove E
	from Args.


--- sysdeps/unix/sysv/linux/i386/syscalls.list	10 Mar 2004 08:38:15 -0000	1.19
+++ sysdeps/unix/sysv/linux/i386/syscalls.list	16 Dec 2005 13:58:21 -0000
@@ -5,5 +5,5 @@
 vm86		-	vm86		i:ip	__vm86		vm86@@GLIBC_2.3.4
 oldgetrlimit	EXTRA	getrlimit	i:ip	__old_getrlimit	getrlimit@GLIBC_2.0
 oldsetrlimit	EXTRA	setrlimit	i:ip	__old_setrlimit	setrlimit@GLIBC_2.0
-time		-	time		Ei:p	time
+time		-	time		i:p	time
 waitpid		-	waitpid		Ci:ipi	__waitpid	waitpid	__libc_waitpid


-- 
Thorsten Kukuk         http://www.suse.de/~kukuk/      kukuk@suse.de
SUSE LINUX Products GmbH       Maxfeldstr. 5       D-90409 Nuernberg
--------------------------------------------------------------------    
Key fingerprint = A368 676B 5E1B 3E46 CFCE  2D97 F8FD 4E23 56C6 FB4B

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

* Re: [PATCH] time() syscall on i386
  2005-12-16 15:29 [PATCH] time() syscall on i386 Thorsten Kukuk
@ 2005-12-20  8:00 ` Ulrich Drepper
  0 siblings, 0 replies; 2+ messages in thread
From: Ulrich Drepper @ 2005-12-20  8:00 UTC (permalink / raw)
  To: Thorsten Kukuk; +Cc: libc-hacker

That's no good solution.  It still leaves the implementation 
inconsistent with other archs.  I've checked in a version which will 
always crash on invalid pointers.  This is how x86-64 works and likely 
other archs with time support in the vdso.

-- 
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖

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

end of thread, other threads:[~2005-12-20  8:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-16 15:29 [PATCH] time() syscall on i386 Thorsten Kukuk
2005-12-20  8:00 ` 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).