home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / os / linux / 17257 < prev    next >
Encoding:
Internet Message Format  |  1992-11-19  |  1.9 KB

  1. Path: sparky!uunet!olivea!charnel!csusac!citrus!ianj
  2. From: ianj@citrus.SAC.CA.US ( Ian Justman )
  3. Newsgroups: comp.os.linux
  4. Subject: GCC typdef gone haywire
  5. Message-ID: <BxxqGL.3sp@citrus.SAC.CA.US>
  6. Date: 18 Nov 92 23:26:43 GMT
  7. Organization: Citrus Grove Public Access ( 916 ) 381-5822    Sacramento CA.  USA
  8. Lines: 42
  9. X-Newsreader: Tin 1.1 PL4
  10.  
  11. I have a terrible problem with what appears to be a legitimate typedef.
  12. Whenever I try to compile unarj straight out of the box, and I either 
  13. comment out or outright delete it.  Here's the code in the header file
  14. "unarj.h" which is duplicated (almost) entirely in
  15. /usr/include/linux/types.h:
  16.  
  17. ---begin---begin---begin---
  18. typedef unsigned char  uchar;   /*  8 bits or more */
  19. typedef unsigned int   uint;    /* 16 - 32 bits or more */
  20. typedef unsigned short ushort;  /* 16 bits or more */
  21. typedef unsigned long  ulong;   /* 32 bits or more */
  22. ---end---end---end---end---
  23.  
  24. I only keep the first one because it's not defined in the abovementioned
  25. file in the /usr/include/~~~ hierarchy.  Zap the remaining three, and we're
  26. OK, right?  WRONG!!!!!
  27.  
  28. Here's the offending code it promptly vomits on:
  29.  
  30. (specifically, a parse error)
  31.  
  32. ---begin---begin---begin---
  33. typedef ulong UCRC;     /* CRC-32 */
  34. ---end---end---end---end---
  35.  
  36. This was extracted from "unarj.h"
  37.  
  38. THIS LOOKS LIKE (AND IS) A COMPLETELY __LEGITIMATE__ TYPEDEF!!!!!
  39.  
  40. Excuse me for being slightly blunt, but this means that there's
  41. something seriously wrong with GCC.
  42.  
  43. Additional notes, the files were extraced from UARJ230.EXE.  I did
  44. get the ball o' wax to compile, but the way I did it was a little
  45. bit out of desparation.  I removed the duplicate typedefs from the
  46. /usr/include/linux/types.h and used the ones in unarj.h, and it
  47. compiled flawlessly.
  48.  
  49. I shouldn't HAVE to do this; this kind of thing ticks me off and I
  50. hope someone has an explanation.
  51. -- 
  52. Born to void warranties!    ianj@ijpc.UUCP
  53.