Commit graph

6 commits

Author SHA1 Message Date
David 'Digit' Turner
8b3cea6732 libc: <stdint.h>: Don't make __STD_CONSTANT_MACROS available if only __STD_LIMIT_MACROS is defined.
Change-Id: I8b0ea266eab9c6f75d8407b704953ecaef948221
2011-03-11 14:39:05 +01:00
David 'Digit' Turner
0e5411b4ba libc: <stdint.h>: fix typo in INTMAX_C()/UINTMAX_C() definition
Change-Id: I3c74269901a288c448734dd7eb442a62b9348db8
2011-03-10 20:35:17 +01:00
David 'Digit' Turner
08ff1a6474 libc: <stdint.h>: Proper C++
This patch prevents the definition of various macros when <stdint.h> is
included from C++. The ISO C99 standard mentions that when this header
is included from a C++ source file, limit and constant related macros
should only be defined when asked explicitely by defining
__STDC_LIMIT_MACROS and __STD_CONSTANT_MACROS, respectively.

The <stdint.h> lacked the proper #ifdef .. #endif blocks for the
following macros:

    INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX, PTRDIFF_MIN, PTRDIFF_MAX
    INTMAX_MIN, INTMAX_MAX, UINTMAX_MAX,
    INPTR_C, UINTPR_C, PTRDIFF_C, INTMAX_C, UINTMAX_C

This is intended to fix http://code.google.com/p/android/issues/detail?id=14380
after we copy this file to development/ndk/platforms/android-3/include/

Change-Id: Ia77e0822edfaaf568ea599d7de673b310eeeaa4a
2011-03-10 18:02:01 +01:00
Martin Storsjo
c88110e284 Define 64 bit types if compiling with -std=c99
Compiling with -std=c99 defines __STRICT_ANSI__, but the 64 bit types
and type macros should still be defined in this case.

This helps compiling third party code that needs -std=c99 with the NDK.
2009-09-14 16:45:50 +02:00
The Android Open Source Project
4e468ed2eb Code drop from //branches/cupcake/...@124589 2008-12-17 18:03:48 -08:00
The Android Open Source Project
a27d2baa0c Initial Contribution 2008-10-21 07:00:00 -07:00