home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / gnu / gcc / help / 2016 < prev    next >
Encoding:
Internet Message Format  |  1992-08-31  |  1.4 KB

  1. Path: sparky!uunet!mcsun!sun4nl!ooc.uva.nl!driehuis
  2. From: driehuis@ooc.uva.nl (Bert Driehuis)
  3. Newsgroups: gnu.gcc.help
  4. Subject: Re: Problems with #include <unistd.h>
  5. Message-ID: <32147@slice.ooc.uva.nl>
  6. Date: 31 Aug 92 14:42:10 GMT
  7. References: <1992Aug28.074934.25241@cs.joensuu.fi>
  8. Organization: ooc.uva.nl
  9. Lines: 22
  10.  
  11. hvaisane@cs.joensuu.fi (H. Vaisanen) writes:
  12. >I am using gcc version 2.2.2 in DECstation 3100 under Ultrix V4.2
  13.  
  14. >When I do #include <unistd.h> I get error messages for conflicting
  15. >types of functions, like this:
  16.  
  17. >/usr/local/gnu/lib/g++-include/unistd.h:57:
  18. >  conflicting types for `int  chown (const char *, short int, short int)'
  19. I ran into the same thing on BSDI (but for slightly different calls), and
  20. went around it by adding "#define chown __hide__chown" before the
  21. "#include_next <stdlib.h>", and a corresponding "#undef chown" after.
  22. Be sure to put them around the correct #include_next, there are two in
  23. each file. In some of the libg++ supplied files you'll see the same approach.
  24.  
  25. Seeing that the distributed files do the same, I am left wondering why
  26. the original is included in the first place. I guess that the #include_next
  27. is to pick up local differences in symbolic constants, etcetera. In that
  28. case, wouldn't it be a good idea to protect all calls defined in the libg++
  29. include files in the same way?
  30. -- 
  31. Bert Driehuis, driehuis@ooc.uva.nl
  32. Morssingel 243, 2312 EX Leiden, The Netherlands.
  33.