VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/xorg-server-1.4.2/xf86_ansic.h@ 62425

最後變更 在這個檔案從62425是 43272,由 vboxsync 提交於 12 年 前

Additions/x11: more original X server headers.

  • 屬性 svn:eol-style 設為 native
檔案大小: 10.5 KB
 
1/*
2 * Copyright 1997-2003 by The XFree86 Project, Inc
3 *
4 * Permission to use, copy, modify, distribute, and sell this software and its
5 * documentation for any purpose is hereby granted without fee, provided that
6 * the above copyright notice appear in all copies and that both that
7 * copyright notice and this permission notice appear in supporting
8 * documentation, and that the names of the above listed copyright holders
9 * not be used in advertising or publicity pertaining to distribution of
10 * the software without specific, written prior permission. The above listed
11 * copyright holders make no representations about the suitability of this
12 * software for any purpose. It is provided "as is" without express or
13 * implied warranty.
14 *
15 * THE ABOVE LISTED COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD
16 * TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
17 * AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDERS BE
18 * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
19 * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
20 * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
21 * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
22 *
23 */
24
25#ifndef _XF86_ANSIC_H
26#define _XF86_ANSIC_H
27
28#include <stdarg.h>
29
30/*
31 * The first set of definitions are required both for modules and
32 * libc_wrapper.c.
33 */
34
35#if !defined(SYSV) && !defined(SVR4) && !defined(Lynx) || \
36 defined(__SCO__) || defined(__UNIXWARE__)
37#define HAVE_VSSCANF
38#define HAVE_VFSCANF
39#endif
40
41#ifndef NULL
42#if (defined(SVR4) || defined(SYSV)) && !defined(__GNUC__)
43#define NULL 0
44#else
45#define NULL ((void *)0)
46#endif
47#endif
48#ifndef EOF
49#define EOF (-1)
50#endif
51
52#ifndef PATH_MAX
53#define PATH_MAX 1024
54#endif
55
56/* <limits.h> stuff */
57#define x_BITSPERBYTE 8
58#define x_BITS(type) (x_BITSPERBYTE * (int)sizeof(type))
59#define x_SHORTBITS x_BITS(short)
60#define x_INTBITS x_BITS(int)
61#define x_LONGBITS x_BITS(long)
62#ifndef SHRT_MIN
63#define SHRT_MIN ((short)(1 << (x_SHORTBITS - 1)))
64#endif
65
66#ifndef FONTMODULE
67#include "misc.h"
68#endif
69#include "xf86_libc.h"
70#ifndef SHRT_MAX
71#define SHRT_MAX ((short)~SHRT_MIN)
72#endif
73#ifndef USHRT_MAX
74#define USHRT_MAX ((unsigned short)~0)
75#endif
76#ifndef MINSHORT
77#define MINSHORT SHRT_MIN
78#endif
79#ifndef MAXSHORT
80#define MAXSHORT SHRT_MAX
81#endif
82#ifndef INT_MIN
83#define INT_MIN (1 << (x_INTBITS - 1))
84#endif
85#ifndef INT_MAX
86#define INT_MAX (~INT_MIN)
87#endif
88#ifndef UINT_MAX
89#define UINT_MAX (~0)
90#endif
91#ifndef MININT
92#define MININT INT_MIN
93#endif
94#ifndef MAXINT
95#define MAXINT INT_MAX
96#endif
97#ifndef LONG_MIN
98#define LONG_MIN ((long)(1 << (x_LONGBITS - 1)))
99#endif
100#ifndef LONG_MAX
101#define LONG_MAX ((long)~LONG_MIN)
102#endif
103#ifndef ULONG_MAX
104#define ULONG_MAX ((unsigned long)~0UL)
105#endif
106#ifndef MINLONG
107#define MINLONG LONG_MIN
108#endif
109#ifndef MAXLONG
110#define MAXLONG LONG_MAX
111#endif
112
113/*
114 * ANSI C compilers only.
115 */
116
117/* ANSI C emulation library */
118
119extern void xf86abort(void);
120extern int xf86abs(int);
121extern double xf86acos(double);
122extern double xf86asin(double);
123extern double xf86atan(double);
124extern double xf86atan2(double,double);
125extern double xf86atof(const char*);
126extern int xf86atoi(const char*);
127extern long xf86atol(const char*);
128extern void *xf86bsearch(const void *, const void *, xf86size_t, xf86size_t,
129 int (*)(const void *, const void *));
130extern double xf86ceil(double);
131extern void* xf86calloc(xf86size_t,xf86size_t);
132extern void xf86clearerr(XF86FILE*);
133extern double xf86cos(double);
134extern void xf86exit(int);
135extern double xf86exp(double);
136extern double xf86fabs(double);
137extern int xf86fclose(XF86FILE*);
138extern int xf86feof(XF86FILE*);
139extern int xf86ferror(XF86FILE*);
140extern int xf86fflush(XF86FILE*);
141extern int xf86fgetc(XF86FILE*);
142extern int xf86getc(XF86FILE*);
143extern int xf86fgetpos(XF86FILE*,XF86fpos_t*);
144extern char* xf86fgets(char*,INT32,XF86FILE*);
145extern int xf86finite(double);
146extern double xf86floor(double);
147extern double xf86fmod(double,double);
148extern XF86FILE* xf86fopen(const char*,const char*);
149extern double xf86frexp(double, int*);
150extern int xf86printf(const char*,...);
151extern int xf86fprintf(XF86FILE*,const char*,...);
152extern int xf86fputc(int,XF86FILE*);
153extern int xf86fputs(const char*,XF86FILE*);
154extern xf86size_t xf86fread(void*,xf86size_t,xf86size_t,XF86FILE*);
155extern void xf86free(void*);
156extern XF86FILE* xf86freopen(const char*,const char*,XF86FILE*);
157#if defined(HAVE_VFSCANF) || !defined(NEED_XF86_PROTOTYPES)
158extern int xf86fscanf(XF86FILE*,const char*,...);
159#else
160extern int xf86fscanf(/*XF86FILE*,const char*,char *,char *,char *,char *,
161 char *,char *,char *,char *,char *,char * */);
162#endif
163extern int xf86fseek(XF86FILE*,long,int);
164extern int xf86fsetpos(XF86FILE*,const XF86fpos_t*);
165extern long xf86ftell(XF86FILE*);
166extern xf86size_t xf86fwrite(const void*,xf86size_t,xf86size_t,XF86FILE*);
167extern char* xf86getenv(const char*);
168extern int xf86isalnum(int);
169extern int xf86isalpha(int);
170extern int xf86iscntrl(int);
171extern int xf86isdigit(int);
172extern int xf86isgraph(int);
173extern int xf86islower(int);
174extern int xf86isprint(int);
175extern int xf86ispunct(int);
176extern int xf86isspace(int);
177extern int xf86isupper(int);
178extern int xf86isxdigit(int);
179extern long xf86labs(long);
180extern double xf86ldexp(double,int);
181extern double xf86log(double);
182extern double xf86log10(double);
183extern void* xf86malloc(xf86size_t);
184extern void* xf86memchr(const void*,int,xf86size_t);
185extern int xf86memcmp(const void*,const void*,xf86size_t);
186extern void* xf86memcpy(void*,const void*,xf86size_t);
187extern void* xf86memmove(void*,const void*,xf86size_t);
188extern void* xf86memset(void*,int,xf86size_t);
189extern double xf86modf(double,double*);
190extern void xf86perror(const char*);
191extern double xf86pow(double,double);
192extern void xf86qsort(void*, xf86size_t, xf86size_t,
193 int(*)(const void*, const void*));
194extern void* xf86realloc(void*,xf86size_t);
195extern long xf86random(void);
196extern int xf86remove(const char*);
197extern int xf86rename(const char*,const char*);
198extern void xf86rewind(XF86FILE*);
199extern int xf86setbuf(XF86FILE*,char*);
200extern int xf86setvbuf(XF86FILE*,char*,int,xf86size_t);
201extern double xf86sin(double);
202extern int xf86sprintf(char*,const char*,...);
203extern int xf86snprintf(char*,xf86size_t,const char*,...);
204extern double xf86sqrt(double);
205#if defined(HAVE_VSSCANF) || !defined(NEED_XF86_PROTOTYPES)
206extern int xf86sscanf(char*,const char*,...);
207#else
208extern int xf86sscanf(/*char*,const char*,char *,char *,char *,char *,
209 char *,char *,char *,char *,char *,char * */);
210#endif
211extern char* xf86strcat(char*,const char*);
212extern char* xf86strchr(const char*, int c);
213extern int xf86strcmp(const char*,const char*);
214extern int xf86strcasecmp(const char*,const char*);
215extern char* xf86strcpy(char*,const char*);
216extern xf86size_t xf86strcspn(const char*,const char*);
217extern char* xf86strerror(int);
218extern xf86size_t xf86strlcat(char*,const char*,xf86size_t);
219extern xf86size_t xf86strlcpy(char*,const char*,xf86size_t);
220extern xf86size_t xf86strlen(const char*);
221extern char* xf86strncat(char *, const char *, xf86size_t);
222extern int xf86strncmp(const char*,const char*,xf86size_t);
223extern int xf86strncasecmp(const char*,const char*,xf86size_t);
224extern char* xf86strncpy(char*,const char*,xf86size_t);
225extern char* xf86strpbrk(const char*,const char*);
226extern char* xf86strrchr(const char*,int);
227extern xf86size_t xf86strspn(const char*,const char*);
228extern char* xf86strstr(const char*,const char*);
229extern double xf86strtod(const char*,char**);
230extern char* xf86strtok(char*,const char*);
231extern long xf86strtol(const char*,char**,int);
232extern unsigned long xf86strtoul(const char*,char**,int);
233extern double xf86tan(double);
234extern XF86FILE* xf86tmpfile(void);
235extern char* xf86tmpnam(char*);
236extern int xf86tolower(int);
237extern int xf86toupper(int);
238extern int xf86ungetc(int,XF86FILE*);
239extern int xf86vfprintf(XF86FILE*,const char*,va_list);
240extern int xf86vsprintf(char*,const char*,va_list);
241extern int xf86vsnprintf(char*,xf86size_t,const char*,va_list);
242
243extern int xf86open(const char*, int,...);
244extern int xf86close(int);
245extern long xf86lseek(int, long, int);
246extern int xf86ioctl(int, unsigned long, pointer);
247extern xf86ssize_t xf86read(int, void *, xf86size_t);
248extern xf86ssize_t xf86write(int, const void *, xf86size_t);
249extern void* xf86mmap(void*, xf86size_t, int, int, int, xf86size_t /* off_t */);
250extern int xf86munmap(void*, xf86size_t);
251extern int xf86stat(const char *, struct xf86stat *);
252extern int xf86fstat(int, struct xf86stat *);
253extern int xf86access(const char *, int);
254extern int xf86errno;
255extern int xf86GetErrno(void);
256
257extern double xf86HUGE_VAL;
258
259extern double xf86hypot(double,double);
260
261/* non-ANSI C functions */
262extern XF86DIR* xf86opendir(const char*);
263extern int xf86closedir(XF86DIR*);
264extern XF86DIRENT* xf86readdir(XF86DIR*);
265extern void xf86rewinddir(XF86DIR*);
266extern void xf86bcopy(const void*,void*,xf86size_t);
267extern int xf86ffs(int);
268extern char* xf86strdup(const char*);
269extern void xf86bzero(void*,unsigned int);
270extern int xf86execl(const char *, const char *, ...);
271extern long xf86fpossize(void);
272extern int xf86chmod(const char *, xf86mode_t);
273extern int xf86chown(const char *, xf86uid_t, xf86gid_t);
274extern xf86uid_t xf86geteuid(void);
275extern xf86gid_t xf86getegid(void);
276extern int xf86getpid(void);
277extern int xf86mknod(const char *, xf86mode_t, xf86dev_t);
278extern int xf86mkdir(const char *, xf86mode_t);
279unsigned int xf86sleep(unsigned int seconds);
280/* sysv IPC */
281extern int xf86shmget(xf86key_t key, int size, int xf86shmflg);
282extern char * xf86shmat(int id, char *addr, int xf86shmflg);
283extern int xf86shmdt(char *addr);
284extern int xf86shmctl(int id, int xf86cmd, pointer buf);
285
286extern int xf86setjmp(xf86jmp_buf env);
287extern int xf86setjmp0(xf86jmp_buf env);
288extern int xf86setjmp1(xf86jmp_buf env, int);
289extern int xf86setjmp1_arg2(void);
290extern int xf86setjmperror(xf86jmp_buf env);
291extern int xf86getjmptype(void);
292extern void xf86longjmp(xf86jmp_buf env, int val);
293#define xf86setjmp_macro(env) \
294 (xf86getjmptype() == 0 ? xf86setjmp0((env)) : \
295 (xf86getjmptype() == 1 ? xf86setjmp1((env), xf86setjmp1_arg2()) : \
296 xf86setjmperror((env))))
297
298/*
299 * These things are always required by drivers (but not by libc_wrapper.c),
300 * even for a static server because some OSs don't provide them.
301 */
302
303extern int xf86getpagesize(void);
304extern void xf86usleep(unsigned long);
305extern void xf86getsecs(long *, long *);
306#ifndef DONT_DEFINE_WRAPPERS
307#undef getpagesize
308#define getpagesize() xf86getpagesize()
309#undef usleep
310#define usleep(ul) xf86usleep(ul)
311#undef getsecs
312#define getsecs(a, b) xf86getsecs(a, b)
313#endif
314#endif /* _XF86_ANSIC_H */
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette