Fix build on sparc64-linux-gnu.
[official-gcc.git] / gcc / d / d-system.h
blob25a83b675b54e688e9f0145a8416371141b77711
1 /* d-system.h -- DMD frontend inclusion of gcc header files.
2 * Copyright (C) 2018 Free Software Foundation, Inc.
4 * GCC is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 3, or (at your option)
7 * any later version.
9 * GCC is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with GCC; see the file COPYING3. If not see
16 * <http://www.gnu.org/licenses/>.
19 #ifndef GCC_D_SYSTEM_H
20 #define GCC_D_SYSTEM_H
22 #include "config.h"
23 #include "system.h"
25 /* Used by the dmd front-end to determine if we have POSIX-style IO. */
26 #define POSIX (__linux__ || __GLIBC__ || __gnu_hurd__ || __APPLE__ \
27 || __FreeBSD__ || __OpenBSD__ || __DragonFly__ || __sun)
29 /* Forward assert invariants to gcc_assert. */
30 #undef assert
31 #define assert(EXPR) gcc_assert(EXPR)
33 /* Forward ctype.h macros used by the dmd front-end to safe-ctype.h. */
34 #undef isalpha
35 #define isalpha(c) ISALPHA(c)
36 #undef isalnum
37 #define isalnum(c) ISALNUM(c)
38 #undef isdigit
39 #define isdigit(c) ISDIGIT(c)
40 #undef islower
41 #define islower(c) ISLOWER(c)
42 #undef isprint
43 #define isprint(c) ISPRINT(c)
44 #undef isspace
45 #define isspace(c) ISSPACE(c)
46 #undef isupper
47 #define isupper(c) ISUPPER(c)
48 #undef isxdigit
49 #define isxdigit(c) ISXDIGIT(c)
50 #undef tolower
51 #define tolower(c) TOLOWER(c)
53 #endif /* GCC_D_SYSTEM_H */