[9685] in Athena Bugs

home help back first fref pref prev next nref lref last post

rsaix 7.4G: /usr/include/unistd.h: getcwd() declared wrong

daemon@ATHENA.MIT.EDU (Calvin Clark)
Sat Jul 25 19:05:35 1992

Date: Sat, 25 Jul 92 19:05:22 -0400
From: Calvin Clark <ckclark@mit.edu>
To: bugs@Athena.MIT.EDU
Reply-To: ckclark@mit.edu

System name:		rosebud
Type and version:	POWER 7.4G (1 update(s) to same version)
Display type:		

What were you trying to do?

	Compile a program.

What's wrong:
	
	/usr/include/unistd.h declares getcwd() as taking a second
argument of type int:

	extern char *getcwd(char *buf, int size);

This is in violation of the POSIX.1 standard, which specifies that the
second argument should be of type size_t, which the ANSI standard
specifies as unsigned long.

What should have happened:

	The header file and the getcwd() routine itself should be fixed.
	Please forward this problem to IBM.  It's obviously broken.
	
Please describe any relevant documentation references:

	POSIX 1003.1-1988
	ANSI X3.159-1988	

home help back first fref pref prev next nref lref last post