home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / std_unix / volume.31 / text0026.txt < prev    next >
Encoding:
Text File  |  1993-07-15  |  1.4 KB  |  51 lines

  1. Submitted-by: david@twg.com ("David Herron")
  2.  
  3. Greetings!
  4.  
  5. I am compiling up the GNU tools for our Solaris 2.1 system (to get my
  6. feet wet on there y'see).  Most have been going together well enough
  7. but gdb just won't go.  This is because of silliness in the include
  8. files supplied by Sun.
  9.  
  10. In bfd/elf.c is #include <sys/procfs.h>.  The following inconsistencies are
  11. there:
  12.  
  13. sys/procfs.h contains uses of:
  14.  
  15.     sigset_t
  16.     u_long, u_char, u_short and u_int
  17.     siginfo_t
  18.     struct sigaltstack
  19.  
  20. sys/types.h
  21.  
  22.     defines u_long &c only when !defined(_POSIX_SOURCE)
  23.  
  24. sys/signal.h
  25.  
  26.     defines sigset_t when defined(_POSIX_SOURCE)
  27.     defines struct sigaltstack when !defined(_POSIX_SOURCE)
  28.  
  29. sys/siginfo.h
  30.  
  31.     defines siginfo_t when !defined(_POSIX_SOURCE)
  32.  
  33. So there is no way a file containing sys/procfs.h can be defined.
  34.  
  35. My workaround is to copy sys/signal.h, sys/siginfo.h and sys/procfs.h
  36. to /opt/gnu/lib/gcc-lib/.../include/sys and hack away.
  37.  
  38. This solution is a rude workaround though.  It makes some non-POSIX
  39. symbols be visible when POSIX_SOURCE is defined.  HOWEVER.. I don't see
  40. how you're supposed to get work accomplished when POSIX_SOURCE is not
  41. defined since that is the only way to get many interesting things only defined!
  42. And then to have any non-POSIX symbol be not visible when it is defined
  43. just makes things downright hard!
  44.  
  45. David Herron <david@twg.com> (work) <david@davids.mmdf.com> (home)
  46.  
  47. [ Note crossposting, and followup -- mod ]
  48.  
  49. Volume-Number: Volume 31, Number 29
  50.  
  51.