Date: Mon, 7 Oct 2002 12:03:32 -0700 (PDT) From: Peter Johnson <freebsd@bilogic.org> To: freebsd-gnats-submit@FreeBSD.org Subject: standards/43780: PATCH: long long functions in stdlib.h should be wrappered with __STRICT_ANSI__ Message-ID: <200210071903.g97J3WFV078251@www.freebsd.org>
index | next in thread | raw e-mail
>Number: 43780
>Category: standards
>Synopsis: PATCH: long long functions in stdlib.h should be wrappered with __STRICT_ANSI__
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-standards
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Mon Oct 07 12:10:02 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Peter Johnson
>Release: 4.7-RC
>Organization:
>Environment:
FreeBSD powerplant.home.bilogic.org 4.7-RC FreeBSD 4.7-RC #7: Mon Oct 7 01:01:51 PDT 2002
freebsd@powerplant.home.bilogic.org:/usr/obj/usr/src/sys/WORKSTATION i386
>Description:
Compiling code that includes stdlib.h with the GCC options -ansi -pedantic
reports the following warnings on two lines of stdlib.h:
/usr/include/stdlib.h:110: warning: ANSI C does not support `long long'
/usr/include/stdlib.h:114: warning: ANSI C does not support `long long'
These lines are the strtoll and strtoull functions.
>How-To-Repeat:
Compile a short program with gcc -ansi -pedantic that includes stdlib.h:
#include <stdlib.h>
int main()
{
return 0;
}
>Fix:
Add #ifndef __STRICT_ANSI__ wrappers around the offending lines:
--- include/stdlib.h.orig Wed Aug 14 19:07:57 2002
+++ include/stdlib.h Mon Oct 7 12:00:48 2002
@@ -106,12 +106,16 @@
void srand __P((unsigned));
double strtod __P((const char *, char **));
long strtol __P((const char *, char **, int));
+#ifndef __STRICT_ANSI__
long long
strtoll __P((const char *, char **, int));
+#endif
unsigned long
strtoul __P((const char *, char **, int));
+#ifndef __STRICT_ANSI__
unsigned long long
strtoull __P((const char *, char **, int));
+#endif
int system __P((const char *));
int mblen __P((const char *, size_t));
>Release-Note:
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-standards" in the body of the message
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200210071903.g97J3WFV078251>
