OSDN Git Service

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