uclibc-0.9.29 - #define internal_function ends up in userspace

Kevin Day thekevinday at gmail.com
Fri Aug 24 17:34:06 PDT 2007


internal_function sounds like it is supposed to be internal to uClibc.
If that is the case, then why is there an exposed define in userspace?

It just so happens that php-5.2.3 uses internal_function as one of
their local variable names.
This is fine, up until the point where a global #define statement
turns internal_function into an empty statement, and the compiler
cannot figure out what is wrong.
Staments like:
zend_internal_function internal_function;
This causes gcc to spit out a warning that this statement does nothing
and later fail, complaining about an invalid syscall command in any
line that uses the internal_function variable.

I do not know where the safer place would be to put this define.
For this reason, I renamed every occuranceof internal_function into
uclibc_internal_function so that the define statement that is exposed to
userspace is unique enough to not conflict and mess up any other projects

The provided patch contains contains this workaround.
I leave the correct fix to you guys, I believe that this define should
not ever appear in userspace.

-- 
Kevin Day
-------------- next part --------------
A non-text attachment was scrubbed...
Name: uClibc-0.9.29-rename_internal_function_define-1.patch
Type: application/octet-stream
Size: 23783 bytes
Desc: not available
Url : http://busybox.net/lists/uclibc/attachments/20070824/b7de094b/attachment-0001.obj 


More information about the uClibc mailing list