This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: [PATCH, approved]: Fixes HPUX 11 "size_t" compile problems with binutils, etc.


> This is not only not what the patch should do, but it also isn't what
> it does on my system (HP-UX 11.00).  The patch should change any system

My HP-UX 11.00 system doesn't use "__size_t" in any headers.  It
appears that there are a variety of different header configuration
for 11.00.

> headers which contain a line matching this pattern: 
> "^#define __size_t size_t".  This is a list of the files that this
> patch was applied to when run on my system:
> 
> ctype.h errno.h locale.h malloc.h pwd.h
> setjmp.h stddef.h stdio.h stdlib.h string.h
> time.h utime.h varargs.h wchar.h

Under the HP-UX 11.11, the only headers which define __size_t are
varargs.h and sys/stdsyms.h.  __size_t is used in pwd.h, stdio.h,
stdlib.h, string.h, wchar.h, sys/newsig.h, sys/time.h, and sys/unistd.h.

> 
> In these files all instances of __size_t were changed to _hpux_size_t.
> In the beginning of all of these header files there is set of define
> statements which include the statement "#define __size_t _size_t".
> It seems to me that HPUX 11.11 must have moved these defines into one
> file and just included that file in each of the affected header files,
> thus the pattern used to select which header files to change is no
> longer grabbing the correct files.  Someone who has access to these

Yes.

Gcc 3.1 seems to work ok without this hack on 11.11, albeit with only
a limited amount of testing (haven't tried C++ yet).  Could you provide
a specific test case where you have a problem without your hack?  I
tried including stddef.h with the headers which use __size_t and didn't
see a problem, either with stddef.h first or last.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)


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