home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / gnu / gcc / bug / 3038 < prev    next >
Encoding:
Text File  |  1992-12-22  |  3.4 KB  |  104 lines

  1. Newsgroups: gnu.gcc.bug
  2. Path: sparky!uunet!cis.ohio-state.edu!sedona.intel.com!tmcconne
  3. From: tmcconne@sedona.intel.com (Tom McConnell)
  4. Subject: gcc-2.3.2 / NCR-3350 SVR4.02 <netinet/in.h> bug
  5. Message-ID: <9212221656.AA31720@thunder.intel.com>
  6. Sender: gnulists@ai.mit.edu
  7. Organization: GNUs Not Usenet
  8. Distribution: gnu
  9. Date: Tue, 22 Dec 1992 02:56:31 GMT
  10. Approved: bug-gcc@prep.ai.mit.edu
  11. Lines: 91
  12.  
  13.   Howdy.
  14.  
  15.   I have finished porting gcc-2.3.2 to the NCR-3350, and used it to compile
  16. X11R5p21 and libg++-2.3. This report concerns the <netinet/in.h> include file.
  17.  
  18.     Cheers,
  19.  
  20.     Tom McConnell
  21.  
  22.  Tom McConnell          |     Internet: tmcconne@sedona.intel.com
  23.  Intel, Corp. C3-91     |     Phone: (602)-554-8229
  24.  5000 W. Chandler Blvd. | The opinions expressed are my own. No one in 
  25.  Chandler, AZ  85226    | their right mind would claim them.
  26.  
  27. Problem: <netinet/in.h> defines some external functions who declare 
  28.         "struct sockaddr" without a previous definition.
  29.  
  30. Program: float.c
  31.  
  32. /* Test in.h */
  33. #include <stdio.h>
  34. #include <netinet/in.h>
  35. main()
  36. {
  37.     printf("test in.h \n");
  38. }
  39.  
  40. Example compile:
  41.  
  42. gcc -v    -c in.c -o in.o
  43. Reading specs from /stor/gnu/iAWS/lib/gcc-lib/ncr3000/2.3.2/specs
  44. gcc version 2.3.2
  45.  /stor/gnu/iAWS/lib/gcc-lib/ncr3000/2.3.2/cpp -lang-c -v -undef -D__GNUC__=2
  46.  -Di386 -Dunix -D__svr4__ -D__i386__ -D__unix__ -D__svr4__ -D__i386 -D__unix
  47.  -D__svr4__ -Asystem(unix) -Acpu(i386) -Amachine(i386) in.c /var/tmp/cca003SE.i
  48. GNU CPP version 2.3.2 (i386 System V Release 4)
  49.  /stor/gnu/iAWS/lib/gcc-lib/ncr3000/2.3.2/cc1 /var/tmp/cca003SE.i -quiet
  50.  -dumpbase in.c -version -o /var/tmp/cca003SE.s
  51. GNU C version 2.3.2 (i386 System V Release 4) compiled by GNU C version 2.3.2.
  52. In file included from in.c:3:
  53. /stor/gnu/iAWS/lib/gcc-lib/ncr3000/2.3.2/include/netinet/in.h:221: warning:
  54.  `struct sockaddr' declared inside parameter list
  55. /stor/gnu/iAWS/lib/gcc-lib/ncr3000/2.3.2/include/netinet/in.h:221: warning:
  56.  its scope is only this definition or declaration,
  57. /stor/gnu/iAWS/lib/gcc-lib/ncr3000/2.3.2/include/netinet/in.h:221: warning:
  58.  which is probably not what you want.
  59. /stor/gnu/iAWS/lib/gcc-lib/ncr3000/2.3.2/include/netinet/in.h:222: warning:
  60.  `struct sockaddr' declared inside parameter list
  61.  /usr/ccs/bin/as -V -Qy -o in.o /var/tmp/cca003SE.s
  62. as: Standard C Development Environment  (SCDE) 5.0  04/19/90
  63. rm -f in
  64. gcc -v -g -o in in.o
  65. Reading specs from /stor/gnu/iAWS/lib/gcc-lib/ncr3000/2.3.2/specs
  66. gcc version 2.3.2
  67.  /usr/ccs/bin/ld -V -Y P,/usr/ccs/lib:/usr/lib -Qy -o in /usr/ccs/lib/crt1.o
  68.  /usr/ccs/lib/crti.o /usr/ccs/lib/values-Xa.o
  69.  /stor/gnu/iAWS/lib/gcc-lib/ncr3000/2.3.2/crtbegin.o
  70.  -L/stor/gnu/iAWS/lib/gcc-lib/ncr3000/2.3.2 -L/usr/ccs/bin -L/usr/ccs/lib
  71.  -L/stor/gnu/iAWS/lib in.o -lgcc -lc
  72.  /stor/gnu/iAWS/lib/gcc-lib/ncr3000/2.3.2/crtend.o /usr/ccs/lib/crtn.o -lgcc
  73. ld: Standard C Development Environment  (SCDE) 5.0  04/19/90
  74.  
  75. Analysis: This section of <netinet/in.h> appears to be for kernels only.
  76.  
  77. Solution: Add an "#ifdef _KERNEL" around the affected area in <netinet/in.h>.
  78.  
  79. Patch:
  80. This patch file was created on Tue Dec 22 09:38:19 MST 1992.
  81.  
  82. The top level directory was /a/stor/gnu/iAWS/lib/gcc-lib/ncr3000/2.3.2/include
  83.  
  84.  
  85. *** ./netinet/in.h_orig    Tue Dec 22 09:20:29 1992
  86. --- ./netinet/in.h    Sun Dec 20 20:59:48 1992
  87. ***************
  88. *** 199,202 ****
  89. --- 199,203 ----
  90.   #endif
  91.   
  92. + #ifdef _KERNEL
  93.   #ifdef INKERNEL
  94.   
  95. ***************
  96. *** 225,228 ****
  97. --- 226,230 ----
  98.   
  99.   #endif    /* INKERNEL */
  100. + #endif /* _KERNEL */
  101.   #undef    _PROTO
  102.   
  103.  
  104.