This is the mail archive of the newlib@sourceware.org mailing list for the newlib 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]

Re: readlink and symlink prototypes [PATCH]


Shaun Jackman wrote:
2005/11/1, Jeff Johnston <jjohnstn@redhat.com>:

Could you explain why you need/want to do this?  The reason these
prototypes are not outside the #ifdefs is that these functions don't
exist in generic newlib.  Generic newlib is not fully SUSv3-compliant
nor POSIX-compliant nor is it intended to be.  X86 linux newlib, for
example, which is far more robust, overrides the header files.

-- Jeff J.


My application is cross compiled for an embedded system (arm-elf) as
well as for a desktop machine for testing purposes. When compiled for
the embedded system, the application provides its own implementation
of readlink/symlink. Providing an implementation for an unimplemented
libc function is quite straight forward; however, patching newlib's
header files is not so straight forward.

My preference would be for newlib to provide prototypes for all the
SUSv3/POSIX functions. I'd much rather get link time errors than
compile time errors for unimplemented SUSv3/POSIX functions.

Cheers,
Shaun

After thinking about it I realized that my logic above is wrong. The current sys/unistd.h header file has lots of non-generic-newlib prototypes already. Moving these prototypes plus others outside of the checks will ultimately make the header file cleaner.


Patch checked in.

-- Jeff J.


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