Paul Eggert <[EMAIL PROTECTED]> writes about the failure of <sys/types.h> in the Linux Standards Base to define size_t.
>> ... >> "Nelson H. F. Beebe" <[EMAIL PROTECTED]> writes: >> >> > This is the same problem as before with size_t being used before >> > it is defined with this compiler. >> >> <stdio_ext.h> is one thing; it's not standardized. But <sys/types.h> >> is another. The compiler is seriously broken if <sys/types.h> does >> not define size_t. >> >> As I recall, the last mainstream POSIX-like operating system that >> didn't have size_t in <sys/types.h> was 4.3BSD-Reno (circa 1990), a >> system so old that we haven't supported it for ages. POSIX has >> required <sys/types.h> to define size_t for quite some time. >> >> Jim indicated that he'd rather not worry about implementations that >> are this far out of the mainstream. Can you please fix this with the >> LSB compiler, or get it fixed? >> ... Here is the relevant section of POSIX (IEEE Std 1003.1-2001 (Revision of IEEE Std 1003.1-1996 and IEEE Std 1003.2-1992) that confirms Paul's statement: >> ... >> 12927 NAME >> 12928 sys/types.h -- data types >> >> 12929 SYNOPSIS >> 12930 #include <sys/types.h> >> >> 12931 DESCRIPTION >> 12932 The <sys/types.h> header shall include definitions for at >> least the following types: >> >> ... >> >> 12963 size_t Used for sizes of >> objects. >> ... Neither ISO C89 nor ISO C99 Standards mention any header files in the <sys/*.h> location. This lack-of-definition failure is readily exhibited: % cat bug-lsbcc.c #include <sys/types.h> size_t p; % lsbcc -c bug-lsbcc.c bug-lsbcc.c:2: error: syntax error before "p" bug-lsbcc.c:2: warning: data definition has no type or storage class I signed up on the LSB discussion list this morning http://lists.freestandards.org/mailman/listinfo/lsb-discuss to see if has been discussed there I have also since done a Web search, which turned up a report of the same problem from 2003-07-18 14:16: http://sourceforge.net/tracker/index.php?func=detail&aid=773937&group_id=1107&atid=101107 Given that three years have passed since that bug report, no bug resolution is recorded, and my LSB compilers are new and dated 2006-05-25, I doubt that another problem report would have any effect. ------------------------------------------------------------------------------- - Nelson H. F. Beebe Tel: +1 801 581 5254 - - University of Utah FAX: +1 801 581 4148 - - Department of Mathematics, 110 LCB Internet e-mail: [EMAIL PROTECTED] - - 155 S 1400 E RM 233 [EMAIL PROTECTED] [EMAIL PROTECTED] - - Salt Lake City, UT 84112-0090, USA URL: http://www.math.utah.edu/~beebe/ - -------------------------------------------------------------------------------