From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6412 invoked by alias); 2 Oct 2010 10:20:38 -0000 Received: (qmail 6393 invoked by uid 22791); 2 Oct 2010 10:20:37 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 02 Oct 2010 10:20:31 +0000 From: "jay.krell at cornell dot edu" To: gcc-bugs@gcc.gnu.org Subject: [Bug other/45864] New: system.h is crufty maybe? Raise the level fo ANSI C89? X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: other X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jay.krell at cornell dot edu X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Sat, 02 Oct 2010 10:20:00 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-10/txt/msg00193.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45864 Summary: system.h is crufty maybe? Raise the level fo ANSI C89? Product: gcc Version: 4.5.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: other AssignedTo: unassigned@gcc.gnu.org ReportedBy: jay.krell@cornell.edu I recently found a compiler that didn't like spaces after the # in preprocessor directives. In system.h: Do any systems lack stddef.h? (it is in ANSI C89) Do any systems lack #define NULL? (ditto) Do any systems lack limits.h? (ditto) Ditto: string.h? time.h? (ditto) errno declared in errno.h? (ditto) SEEK_SET, SEEK_CUR, SEEK_END (ditto) F_OK, X_OK, W_OK, R_OK O_RDONLY, O_WRONLY atof, atol, free, getenv, strstr, abort, offsetof? (ditto) malloc, calloc, realloc? (ditto) Posixy systems that gcc can be hosted on: getcwd, getwd, sbrk? I wonder if all the compability stuff needs to stay. Along with suggesting a new one -- no spaces after #. I wonder if the _unlocked stuff is worthwhile. One should be sure to have reasonably large inputs/outputs, not just getchar one at a time, for example. Maybe some of this is for "header-less" environments? I grant, getting headers for cross build scenarios can be a pain. But I do need the libraries anyway. - Jay