home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / gnu / utils / bug / 2081 < prev    next >
Encoding:
Text File  |  1992-11-19  |  1.7 KB  |  44 lines

  1. Newsgroups: gnu.utils.bug
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!eng.umd.edu!djm
  3. From: djm@eng.umd.edu (David J. MacKenzie)
  4. Subject: gawk 2.14 const disagreement for fdopen on ultrix 4.2
  5. Message-ID: <199211192354.AA13430@frob.eng.umd.edu>
  6. Sender: gnulists@ai.mit.edu
  7. Organization: GNUs Not Usenet
  8. Distribution: gnu
  9. Date: Thu, 19 Nov 1992 13:54:38 GMT
  10. Approved: bug-gnu-utils@prep.ai.mit.edu
  11. Lines: 31
  12.  
  13. Ultrix 4.2b on a Decstation using gcc 2.2.2.
  14.  
  15. I did `configure ultrix41' and had one small problem, shown below.
  16.  
  17. In general, it causes trouble to provide your own prototypes for
  18. standard library functions, because various OS's disagree about the
  19. consts.  If the system has STDC_HEADERS, let its headers provide the
  20. prototypes; otherwise, just put in an old-style declaration.  Then you
  21. won't conflict with anyone, and if you do your prerelease testing on a
  22. system that provides prototypes, you'll still get type checking.
  23.  
  24. I've had similar problems with getopt and stdlib.h, and some string
  25. functions, in the past.
  26.  
  27.  
  28. gcc -DGAWK     -O2    -c io.c -o io.o
  29. io.c:58: conflicting types for `fdopen'
  30. /usr/local/gnu/lib/gcc-lib/decstation-ultrix4.2/2.2.2/include/stdio.h:181: previ
  31. ous declaration of `fdopen'
  32. make: *** [io.o] Error 1
  33. djm@decoder:/afs/.glue.umd.edu/@sys/build/usr.local/gnu/gawk-2.14 28 $ grep fdo
  34. pen io.c
  35. extern FILE     *fdopen P((int, const char *));
  36. extern FILE     *fdopen();
  37.                                         rp->fp = fdopen(fd, mode);
  38.         FILE *kludge = fdopen(fd, "r"); /* pclose needs FILE* w/ right fileno */
  39. djm@decoder:/afs/.glue.umd.edu/@sys/build/usr.local/gnu/gawk-2.14 29 $ grep fdo
  40. pen ~gnu/lib/gcc-lib/decstation-ultrix4.2/2.2.2/include/stdio.h
  41. extern FILE *   fdopen( int __filedes, char *__type );
  42.         *fdopen(),
  43.  
  44.