From owner-freebsd-bugs Fri Apr 17 10:10:06 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id KAA02834 for freebsd-bugs-outgoing; Fri, 17 Apr 1998 10:10:06 -0700 (PDT) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: (from gnats@localhost) by hub.freebsd.org (8.8.8/8.8.8) id KAA02780; Fri, 17 Apr 1998 10:10:03 -0700 (PDT) (envelope-from gnats) Received: from lamb.sas.com (root@lamb.sas.com [192.35.83.8]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id RAA01141 for ; Fri, 17 Apr 1998 17:00:59 GMT (envelope-from sastdr@unx.sas.com) Received: from mozart (mozart.unx.sas.com [192.58.184.8]) by lamb.sas.com (8.8.7/8.8.7) with SMTP id NAA27401 for ; Fri, 17 Apr 1998 13:00:57 -0400 (EDT) Received: from wagner.unx.sas.com by mozart (5.65c/SAS/Domains/5-6-90) id AA13842; Fri, 17 Apr 1998 13:00:57 -0400 Received: from numb.pc.sas.com by wagner.unx.sas.com (5.65c/SAS/Generic 9.01/3-26-93) id AA26734; Fri, 17 Apr 1998 13:00:56 -0400 Received: (from sastdr@localhost) by numb.pc.sas.com (8.8.8/8.6.6) id MAA21525; Fri, 17 Apr 1998 12:51:23 -0400 (EDT) Message-Id: <199804171651.MAA21525@numb.pc.sas.com> Date: Fri, 17 Apr 1998 12:51:23 -0400 (EDT) From: Thomas David Rivers Reply-To: sastdr@unx.sas.com To: FreeBSD-gnats-submit@FreeBSD.ORG X-Send-Pr-Version: 3.2 Subject: bin/6332: time.h doesn't compile with -traditional Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 6332 >Category: bin >Synopsis: /usr/include/time.h doesn't compile with -traditional >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Apr 17 10:10:01 PDT 1998 >Last-Modified: >Originator: Thomas David Rivers >Organization: SAS Institute >Release: FreeBSD 2.2.6-RELEASE i386 >Environment: >Description: I continue to compile some software with -traditional; because it may not compile on other hosts and I'd like to "catch" this on FreeBSD before it gets there. Unfortunately, some system header files have had some ANSI-isms creep in, that prevent programs from compiling with the -traditional flag. This seems to mostly be the use of the 'const' keyword. .e.g: in time.h: #if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE) const char *strptime __P((const char *, const char *, struct tm *)); char *timezone __P((int, int)); >How-To-Repeat: foo.c: #include cc -traditional foo.c >Fix: Replace uses of 'const' with the __const keyword defined in cdefs.h. >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message