* libc/include/math.h: _LONG_LONG_TYPE replaced by "long long".
Guards for C99 and C++11 functions fixed.
* libc/include/stdlib.h: Guards for C99 and C++11 functions fixed.
Found by:
find -name '*.h' |xargs grep -i 'attribute.*(([a-z]'
For an example of the type of bugs this causes, try compiling this valid
C11 program (it's valid because 'noreturn' is reserved for use in the
user namespace unless you include <stdnoreturn.h>):
$ cat foo.c
#define noreturn __attribute__((noreturn))
#include <stdlib.h>
$ gcc -c -o foo.o -Wall foo.c
In file included from /usr/include/stdlib.h:11:0,
from foo.c:2:
foo.c:1:18: error: expected ')' before '__attribute__'
#define noreturn __attribute__((noreturn))
^
/usr/include/stdlib.h:66:28: error: expected ',' or ';' before ')' token
_VOID _EXFUN(abort,(_VOID) _ATTRIBUTE ((noreturn)));
^
* libc/machine/spu/spu_timer_internal.h: Decorate attribute names
with __, for namespace safety.
* libc/machine/xscale/machine/profile.h: Likewise.
* libc/include/stdlib.h: Likewise.
* libc/include/_ansi.h: Likewise.
* libc/include/sys/unistd.h: Likewise.
* libc/sys/linux/linuxthreads/libc-symbols.h: Likewise.
* libc/sys/linux/linuxthreads/internals.h: Likewise.
* libc/sys/linux/machine/i386/weakalias.h: Likewise.
* libc/sys/linux/machine/i386/dl-procinfo.h: Likewise.
* libc/sys/linux/machine/i386/dl-machine.h: Likewise.
* libc/sys/linux/libc-symbols.h: Likewise.
* libc/sys/linux/iconv/gconv_charset.h: Likewise.
* libc/sys/linux/include/resolv.h: Likewise.
* libc/sys/linux/sys/unistd.h: Likewise.
* libc/sys/linux/dl/atomicity.h: Likewise.
* libc/sys/linux/dl/dynamic-link.h: Likewise.
* libc/sys/linux/dl/ldsodefs.h: Likewise.
throughout in place of explicit GNUC version checks.
* libc/include/_ansi.h (_NOINLINE): Define.
(_NOINLINE_STATIC): Define.
* libc/stdio/vfprintf.c (__sbprintf): Define _NOINLINE_STATIC.
* libc/include/_ansi.h: Add new _EXFNPTR macro for using with
function pointer arguments.
* libc/iconv/lib/conv.h: Use _EXFNPTR rather than _EXPARM macro.
* libc/iconv/lib/ucsconv.h: Ditto.
* libc/include/stdlib.h: Use new _EXFNPTR macro for function pointers.
* libc/include/sys/reent.h: Ditto.
* libc/include/sys/unistd.h: Ditto.
* libc/search/bsearch.c: Ditto.
* libc/stdio/fseek.c: Ditto.
* libc/stdio64/fseeko64.c: Ditto.
* libc/stdlib/atexit.c: Ditto.
* libc/stdlib/on_exit.c: Ditto.
Jeff Johnston <jjohnstn@redhhat.com>
* libc/include/_ansi.h: Add _LONG_LONG definition.
* libc/include/math.h (llrint, llrintf, rintl, lrintl, llrintl): Add
prototypes.
* libc/machine/i386/machine/fastmath.h: Add support for new i386
fast math versions of rint, lrint, and llrint family functions.
* libm/machine/i386/Makefile.am: Add new files.
* libm/machine/i386/Makefile.in: Regenerated.
* libm/machine/i386/f_llrint.c, libm/machine/i386/f_lrint.c,
libm/machine/i386/f_rint.c, libm/machine/i386/f_llrintf.c,
libm/machine/i386/f_lrintf.c, libm/machine/i386/f_rintf.c,
libm/machine/i386/f_llrintl.c, libm/machine/i386/f_lrintl.c,
libm/machine/i386/f_rintl.c: New files with fast math implementations.
* Makefile.am(stmp-targ-include): Copy newlib.h to targ-include.
(install-data-local): Install newlib.h.
* Makefile.in: Regenerated.
* aclocal.m4: Ditto.
* configure: Ditto.
* configure.in: Add AM_CONFIG_HEADER to generate newlib.h based on
newlib.hin. Add AC_DEFINE_UNQUOTED entries for _ELIX_LEVEL
and _NEWLIB_VERSION to fill in newlib.h header file entries.
In AC_OUTPUT statement, unset ac_file so multilib support does
not use last ac_file temporary used in newlib.h configuration.
* libc/include/_ansi.h: Include <newlib.h>.
* newlib.hin: New template file for newlib.h.
* stamp-h.in: New file.
* Makefile.in: Regenerate.
* libc/include/_ansi.h (_EXFUN): Define specially for __CYGWIN__.
(_EXPARM): New macro for defining a function parameter.
* libc/include/stdlib.h: Use _EXPARM.
* libc/stdlib/mallocr.c: Don't build cfree for Cygwin.