[patch] POSIX2001 adjustment for readlink and nonnull annotation for realpath

Bernhard Fischer rep.dot.nop at gmail.com
Sun Jan 28 14:54:46 UTC 2007


Hi,

	* include/stdlib.h: Annotate realpath's second argument resolved
	with attribute nonnull. Our impl doesn't allocate space if the
	resolved path is NULL, so add a compile-time warning for the
	users.
	* include/unistd.h, libc/sysdeps/linux/common/readlink.c: return
	type is changed to ssize_t, to align with the IEEE P1003.1a
	draft standard (from SUSv).
	* Rules.mak: Add -Wnonnull and -Wundef to the extra annoying
	warnings.

Untested. Ok for trunk?

The -Wundef suggests these glitches:

-) __ASSUME_LDT_WORKS
./libpthread/linuxthreads.old/sysdeps/i386/pt-machine.h:74:5: warning:
"__ASSUME_LDT_WORKS" is not defined
-) USE__THREAD
./include/bits/uClibc_errno.h:36:7: warning: "USE___THREAD" is not
defined

Comments?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: uClibc.trunk.misc-posix2001_and_nonnull_ann.00.patch
Type: text/x-diff
Size: 2891 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/uclibc/attachments/20070128/7c89b0be/attachment-0002.bin 


More information about the uClibc mailing list