Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Apr 1998 12:51:23 -0400 (EDT)
From:      Thomas David Rivers <sastdr@unx.sas.com>
To:        FreeBSD-gnats-submit@FreeBSD.ORG
Subject:   bin/6332: time.h doesn't compile with -traditional
Message-ID:  <199804171651.MAA21525@numb.pc.sas.com>

next in thread | raw e-mail | index | archive | help

>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 <time.h>

   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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199804171651.MAA21525>