Date: Tue, 9 Jul 2002 14:50:13 +0200 (CEST) From: Dimitry Andric <dim@xs4all.nl> To: FreeBSD-gnats-submit@FreeBSD.org Subject: misc/40378: stdlib.h gives needless warnings with -ansi Message-ID: <20020709125013.9D4085766@tensor.xs4all.nl>
next in thread | raw e-mail | index | archive | help
>Number: 40378 >Category: misc >Synopsis: stdlib.h gives needless warnings with -ansi >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: Tue Jul 09 06:00:13 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Dimitry Andric <dim@xs4all.nl> >Release: FreeBSD 4.6-STABLE i386 >Organization: n/a >Environment: System: FreeBSD tensor.xs4all.nl 4.6-STABLE FreeBSD 4.6-STABLE #0: Sat Jul 6 19:59:01 CEST 2002 root@tensor.xs4all.nl:/usr/obj/usr/src/sys/TENSOR i386 >Description: Since my latest cvsup (from 4.6-RC to 4.6-STABLE), lots of programs that are built with the gcc `-ansi' option have started complaining about stdlib.h, like this: In file included from ../../../../../../extras/Mesa/src/glheader.h:60, from ../../../../../../extras/Mesa/src/types.h:32, from mgafastpath.c:31: /usr/include/stdlib.h:108: warning: ANSI C does not support `long long' /usr/include/stdlib.h:112: warning: ANSI C does not support `long long' It seems that there has been some fiddling with __LONG_LONG_SUPPORTED and related defines, and these two functions have been missed, maybe? >How-To-Repeat: Compile any program that uses stdlib.h with -ansi, for example most of the XFree86-4 ports. >Fix: Here's a patch that removes these warnings. I hope it doesn't break anything else, but ANSI C source shouldn't use long long anyway. :) --- stdlib.h.orig Thu Jan 3 00:57:03 2002 +++ stdlib.h Tue Jul 9 14:39:10 2002 @@ -104,12 +104,14 @@ void srand __P((unsigned)); double strtod __P((const char *, char **)); long strtol __P((const char *, char **, int)); -long long - strtoll __P((const char *, char **, int)); unsigned long strtoul __P((const char *, char **, int)); +#ifndef __STRICT_ANSI__ +long long + strtoll __P((const char *, char **, int)); 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-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020709125013.9D4085766>