xref: /openbsd-src/gnu/lib/libstdc++/libstdc++/libio/_G_config.h (revision c2fb321235c8dbfba0909bc43913400e90646ae7)
1 /* Copyright (C) 1999, 2000, 2004 Free Software Foundation, Inc.
2    This file is part of the GNU IO Library.
3 
4    This library is free software; you can redistribute it and/or
5    modify it under the terms of the GNU General Public License as
6    published by the Free Software Foundation; either version 2, or (at
7    your option) any later version.
8 
9    This library is distributed in the hope that it will be useful, but
10    WITHOUT ANY WARRANTY; without even the implied warranty of
11    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12    General Public License for more details.
13 
14    You should have received a copy of the GNU General Public License
15    along with this library; see the file COPYING.  If not, write to
16    the Free Software Foundation, 59 Temple Place - Suite 330, Boston,
17    MA 02111-1307, USA.
18 
19    As a special exception, if you link this library with files
20    compiled with a GNU compiler to produce an executable, this does
21    not cause the resulting executable to be covered by the GNU General
22    Public License.  This exception does not however invalidate any
23    other reasons why the executable file might be covered by the GNU
24    General Public License.  */
25 
26 /* This file is needed by libio to define various configuration parameters.
27    These are always the same in the GNU C library.  */
28 
29 #ifndef _G_config_h
30 #define _G_config_h 1
31 
32 #ifndef _LIBC
33 # include <bits/c++config.h>
34 # ifdef _GLIBCPP_USE_THREADS
35 #   define _IO_MTSAFE_IO
36 # endif
37 #endif
38 
39 /* Define types for libio in terms of the standard internal type names.  */
40 
41 #include <sys/types.h>
42 #define __need_size_t
43 #define __need_wchar_t
44 #define __need_wint_t
45 #define __need_NULL
46 #define __need_ptrdiff_t
47 #ifdef __cplusplus
48 # include <cstddef>
49 #else
50 # include <stddef.h>
51 #endif
52 
53 
54 #ifndef _WINT_T
55 /* Integral type unchanged by default argument promotions that can
56    hold any value corresponding to members of the extended character
57    set, as well as at least one value that does not correspond to any
58    member of the extended character set.  */
59 # define _WINT_T
60 typedef unsigned int wint_t;
61 #endif
62 
63 /* For use as part of glibc (native) or as part of libstdc++ (maybe
64    not glibc) */
65 #ifndef __c_mbstate_t_defined
66 # define __c_mbstate_t_defined	1
67 /*# ifdef _GLIBCPP_USE_WCHAR_T*/
68 typedef struct
69 {
70   int count;
71   wint_t value;
72 }__c_mbstate_t;
73 /*# endif*/
74 #endif
75 #undef __need_mbstate_t
76 
77 typedef size_t _G_size_t;
78 
79 
80 #if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T || defined(_GLIBCPP_USE_TYPE_WCHAR_T)
81 typedef struct
82 {
83   __off_t __pos;
84   __c_mbstate_t __state;
85 } _G_fpos_t;
86 
87 typedef struct
88 {
89   __off64_t __pos;
90   __c_mbstate_t __state;
91 } _G_fpos64_t;
92 #else
93 typedef __off_t _G_fpos_t;
94 typedef __off64_t _G_fpos64_t;
95 #endif
96 #define _G_ssize_t	__ssize_t
97 #define _G_off_t	__off_t
98 #define _G_off64_t	__off64_t
99 #define	_G_pid_t	__pid_t
100 #define	_G_uid_t	__uid_t
101 #define _G_wchar_t	wchar_t
102 #define _G_wint_t	wint_t
103 #define _G_stat64	stat64
104 #if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T || defined(_GLIBCPP_USE_TYPE_WCHAR_T)
105 # include <iconv.h>
106 typedef iconv_t _G_iconv_t;
107 #endif
108 
109 typedef int _G_int16_t __attribute__ ((__mode__ (__HI__)));
110 typedef int _G_int32_t __attribute__ ((__mode__ (__SI__)));
111 typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__)));
112 typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__)));
113 
114 #define _G_HAVE_BOOL 1
115 
116 
117 /* These library features are always available in the GNU C library.  */
118 #define _G_HAVE_ATEXIT 1
119 #define _G_HAVE_SYS_CDEFS 1
120 #define _G_HAVE_SYS_WAIT 1
121 #define _G_NEED_STDARG_H 1
122 #define _G_va_list __gnuc_va_list
123 
124 #define _G_HAVE_PRINTF_FP 1
125 #define _G_HAVE_MMAP 1
126 #define _G_HAVE_LONG_DOUBLE_IO 1
127 #define _G_HAVE_IO_FILE_OPEN 1
128 #define _G_HAVE_IO_GETLINE_INFO 1
129 
130 #define _G_IO_IO_FILE_VERSION 0x20001
131 
132 //#define _G_OPEN64	__open64
133 //#define _G_LSEEK64	__lseek64
134 //#define _G_FSTAT64(fd,buf) __fxstat64 (_STAT_VER, fd, buf)
135 
136 /* This is defined by <bits/stat.h> if `st_blksize' exists.  */
137 /*#define _G_HAVE_ST_BLKSIZE defined (_STATBUF_ST_BLKSIZE)*/
138 
139 #define _G_BUFSIZ 8192
140 
141 /* These are the vtbl details for ELF.  */
142 #define _G_NAMES_HAVE_UNDERSCORE 0
143 #define _G_VTABLE_LABEL_HAS_LENGTH 1
144 #ifndef _G_USING_THUNKS
145 # define _G_USING_THUNKS	1
146 #endif /* _G_USING_THUNKS */
147 #define _G_VTABLE_LABEL_PREFIX "__vt_"
148 #define _G_VTABLE_LABEL_PREFIX_ID __vt_
149 
150 #define _G_INTERNAL_CCS	"UCS4"
151 #define _G_HAVE_WEAK_SYMBOL 1
152 #define _G_STDIO_USES_LIBIO 1
153 
154 #if defined __cplusplus || defined __STDC__
155 # define _G_ARGS(ARGLIST) ARGLIST
156 #else
157 # define _G_ARGS(ARGLIST) ()
158 #endif
159 
160 #endif	/* _G_config.h */
161 
162