acconfig.h: _GLIBCPP_USING_THREADS and some workaround types added.
[gcc.git] / libstdc++-v3 / libio / _G_config.h
1 /* This file is needed by libio to define various configuration parameters.
2 These are always the same in the GNU C library. */
3
4 #ifndef _G_config_h
5 #define _G_config_h 1
6
7 #ifndef _LIBC
8 # include <bits/c++config.h>
9 # ifdef _GLIBCPP_USING_THREADS
10 # define _IO_MTSAFE_IO
11 # endif
12 #endif
13
14 /* Define types for libio in terms of the standard internal type names. */
15
16 #ifndef _LARGEFILE64_SOURCE
17 # define _LARGEFILE64_SOURCE
18 #endif
19 #include <sys/types.h>
20 #define __need_size_t
21 #define __need_wchar_t
22 #define __need_wint_t
23 #define __need_NULL
24 #include <bits/std_cstddef.h>
25
26
27 /* For use as part of glibc (native) or as part of libstdc++ (maybe
28 not glibc) */
29 #if __GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ <= 1)
30 # ifdef _GLIBCPP_USE_WCHAR_T
31 # include <bits/std_cwchar.h>
32 typedef mbstate_t __mbstate_t;
33 # endif
34 #endif
35
36 #ifndef _WINT_T
37 /* Integral type unchanged by default argument promotions that can
38 hold any value corresponding to members of the extended character
39 set, as well as at least one value that does not correspond to any
40 member of the extended character set. */
41 # define _WINT_T
42 typedef unsigned int wint_t;
43 #endif
44 #define __need_mbstate_t
45 #include <bits/std_cwchar.h>
46 #define _G_size_t size_t
47 #if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
48 typedef struct
49 {
50 __off_t __pos;
51 __mbstate_t __state;
52 } _G_fpos_t;
53 typedef struct
54 {
55 __off64_t __pos;
56 __mbstate_t __state;
57 } _G_fpos64_t;
58 #else
59 typedef __off_t _G_fpos_t;
60 typedef __off64_t _G_fpos64_t;
61 #endif
62 #define _G_ssize_t __ssize_t
63 #define _G_off_t __off_t
64 #define _G_off64_t __off64_t
65 #define _G_pid_t __pid_t
66 #define _G_uid_t __uid_t
67 #define _G_wchar_t wchar_t
68 #define _G_wint_t wint_t
69 #define _G_stat64 stat64
70 #if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
71 # include <iconv.h>
72 typedef iconv_t _G_iconv_t;
73 # if 0
74 /* XXX Commented out because outside glibc we have to use iconv()
75 and not gconv(). */
76 typedef union
77 {
78 struct __gconv_info __cd;
79 struct
80 {
81 struct __gconv_info __cd;
82 struct __gconv_step_data __data;
83 } __combined;
84 } _G_iconv_t;
85 # endif
86 #endif
87
88 typedef int _G_int16_t __attribute__ ((__mode__ (__HI__)));
89 typedef int _G_int32_t __attribute__ ((__mode__ (__SI__)));
90 typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__)));
91 typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__)));
92
93 #define _G_HAVE_BOOL 1
94
95
96 /* These library features are always available in the GNU C library. */
97 #define _G_HAVE_ATEXIT 1
98 #define _G_HAVE_SYS_CDEFS 1
99 #define _G_HAVE_SYS_WAIT 1
100 #define _G_NEED_STDARG_H 1
101 #define _G_va_list __gnuc_va_list
102
103 #define _G_HAVE_PRINTF_FP 1
104 #define _G_HAVE_MMAP 1
105 #define _G_HAVE_LONG_DOUBLE_IO 1
106 #define _G_HAVE_IO_FILE_OPEN 1
107 #define _G_HAVE_IO_GETLINE_INFO 1
108
109 #define _G_IO_IO_FILE_VERSION 0x20001
110
111 //#define _G_OPEN64 __open64
112 //#define _G_LSEEK64 __lseek64
113 //#define _G_FSTAT64(fd,buf) __fxstat64 (_STAT_VER, fd, buf)
114
115 /* This is defined by <bits/stat.h> if `st_blksize' exists. */
116 /*#define _G_HAVE_ST_BLKSIZE defined (_STATBUF_ST_BLKSIZE)*/
117
118 #define _G_BUFSIZ 8192
119
120 /* These are the vtbl details for ELF. */
121 #define _G_NAMES_HAVE_UNDERSCORE 0
122 #define _G_VTABLE_LABEL_HAS_LENGTH 1
123 #define _G_USING_THUNKS 1
124 #define _G_VTABLE_LABEL_PREFIX "__vt_"
125 #define _G_VTABLE_LABEL_PREFIX_ID __vt_
126
127 #define _G_INTERNAL_CCS "UCS4"
128 #define _G_HAVE_WEAK_SYMBOL 1
129 #define _G_STDIO_USES_LIBIO 1
130
131 #if defined __cplusplus || defined __STDC__
132 # define _G_ARGS(ARGLIST) ARGLIST
133 #else
134 # define _G_ARGS(ARGLIST) ()
135 #endif
136
137 #endif /* _G_config.h */