diff options
| author | Tomas Bzatek <tbzatek@users.sourceforge.net> | 2009-11-15 18:32:03 +0100 |
|---|---|---|
| committer | Tomas Bzatek <tbzatek@users.sourceforge.net> | 2009-11-15 18:32:03 +0100 |
| commit | cb3baab306e5951dc3a176fd9061f596a05b4729 (patch) | |
| tree | 1074fd193e9be7e62aa431effde391213705fc36 /libarchive/libarchive-2.7.1/build/cmake/CheckHeaderSTDC.c | |
| parent | c10a5c533a5b71c03f0e8d52dea81eb77dbebfd7 (diff) | |
| download | tuxcmd-modules-cb3baab306e5951dc3a176fd9061f596a05b4729.tar.xz | |
Rebase libarchive to 2.7.1
Diffstat (limited to 'libarchive/libarchive-2.7.1/build/cmake/CheckHeaderSTDC.c')
| -rw-r--r-- | libarchive/libarchive-2.7.1/build/cmake/CheckHeaderSTDC.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/libarchive/libarchive-2.7.1/build/cmake/CheckHeaderSTDC.c b/libarchive/libarchive-2.7.1/build/cmake/CheckHeaderSTDC.c new file mode 100644 index 0000000..cba0810 --- /dev/null +++ b/libarchive/libarchive-2.7.1/build/cmake/CheckHeaderSTDC.c @@ -0,0 +1,20 @@ +#include <stdlib.h> +#include <stdarg.h> +#include <string.h> +#include <ctype.h> + +#define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) + +int +main() +{ + int i; + + for (i = 0; i < 256; i++) { + if (XOR(islower(i), ISLOWER(i)) || toupper(i) != TOUPPER(i)) + return 2; + } + return 0; +} |
