This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

FreeBSD port (33): syscalls list


Hi,

Here is one more porting obstacle: sysdeps/unix/common/syscalls.list
says that the getpgid() function should be constructed as a syscall to
SYS_getpgrp.

This is very dangerous as a fallback mechanism in such a general file
as unix/common/syscalls.list, because getpgid() is a 1-argument function,
and getpgrp() is a no-argument function.

It is definitely wrong for FreeBSD (which has different SYS_pgid and
SYS_pgrp system calls). It is overridden for all other working ports
- Linux: uses _NR_getpgid
- Hurd: sysdeps/mach/hurd/getpgid.c
- AIX: sysdeps/unix/sysv/aix/getpgid.c
- Solaris: sysdeps/unix/sysv/sysv4/getpgid.c
- SCO: sysdeps/unix/sysv/sco3.2.4/getpgid.c
- Irix4: uses SYS_bsdgetpgrp

Therefore I suggest to remove this line. It is a pitfall during porting.


2002-07-06  Bruno Haible  <bruno@clisp.org>

	* sysdeps/unix/common/syscalls.list (getpgid): Remove.

diff -r -c3 glibc-20020627.bak/sysdeps/unix/common/syscalls.list glibc-20020627/sysdeps/unix/common/syscalls.list
--- glibc-20020627.bak/sysdeps/unix/common/syscalls.list	Mon Apr 15 20:55:52 2002
+++ glibc-20020627/sysdeps/unix/common/syscalls.list	Fri Jul  5 01:17:11 2002
@@ -4,7 +4,6 @@
 fchmod		-	fchmod		i:ii	__fchmod	fchmod
 fchown		-	fchown		i:iii	__fchown	fchown
 ftruncate	-	ftruncate	i:ii	__ftruncate	ftruncate
-getpgid		-	getpgrp		i:i	__getpgid	getpgid
 getrusage	-	getrusage	i:ip	__getrusage	getrusage
 gettimeofday	-	gettimeofday	i:PP	__gettimeofday	gettimeofday __gettimeofday_internal
 settimeofday	-	settimeofday	i:PP	__settimeofday	settimeofday


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]