X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Ftest-stdint.c;h=f606cc3e24fd3dbbe5346b6a2889036ab1ce7cdb;hb=86e6a68e249fd4e4af6cebbfddfc52b33d3f8b37;hp=cd87167e34963f044cd1f15c9b16306979a9fac6;hpb=3965bf4053324a67ed53e3d261471a567cff2502;p=pspp diff --git a/tests/test-stdint.c b/tests/test-stdint.c index cd87167e34..f606cc3e24 100644 --- a/tests/test-stdint.c +++ b/tests/test-stdint.c @@ -1,31 +1,28 @@ /* Test of substitute. - Copyright (C) 2006 Free Software Foundation, Inc. + Copyright (C) 2006-2011 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU Library General Public License as published - by the Free Software Foundation; either version 2, or (at your option) - any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - USA. */ + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ /* Written by Bruno Haible , 2006. */ -#ifdef HAVE_CONFIG_H -# include -#endif +#include /* Whether to enable pedantic checks. */ #define DO_PEDANTIC 0 #define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ +#define __STDC_CONSTANT_MACROS 1 /* likewise */ #include #include "verify.h" @@ -250,11 +247,15 @@ uintmax_t j[2] = { UINTMAX_C (17), UINTMAX_MAX }; verify (TYPE_MAXIMUM (uintmax_t) == UINTMAX_MAX); verify_same_types (UINTMAX_MAX, (uintmax_t) 0 + 0); +/* As of 2007, Sun C and HP-UX 10.20 cc don't support 'long long' constants in + the preprocessor. */ +#if !(defined __SUNPRO_C || (defined __hpux && !defined __GNUC__)) #if INTMAX_MIN && INTMAX_MAX && UINTMAX_MAX /* ok */ #else err or; #endif +#endif /* 7.18.3. Limits of other integer types */ @@ -307,11 +308,7 @@ err or; #endif #if HAVE_WINT_T -# if HAVE_WCHAR_H -# include -# include -# include -# endif +# include verify (TYPE_MINIMUM (wint_t) == WINT_MIN); verify (TYPE_MAXIMUM (wint_t) == WINT_MAX); @@ -358,7 +355,7 @@ verify_same_types (UINTMAX_C (17), (uintmax_t)0 + 0); int -main () +main (void) { return 0; }