VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/xorg-server-1.3.0.0/xf86_libc.h@ 25078

Last change on this file since 25078 was 25078, checked in by vboxsync, 15 years ago

Additions/x11/x11include: exported and set eol-style on new headers

  • Property svn:eol-style set to native
File size: 18.8 KB
Line 
1/*
2 * Copyright (c) 1997-2003 by The XFree86 Project, Inc.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20 * OTHER DEALINGS IN THE SOFTWARE.
21 *
22 * Except as contained in this notice, the name of the copyright holder(s)
23 * and author(s) shall not be used in advertising or otherwise to promote
24 * the sale, use or other dealings in this Software without prior written
25 * authorization from the copyright holder(s) and author(s).
26 */
27
28/*
29 * This file is an attempt to make developing code for the new loadable module
30 * architecure simpler. It tries to use macros to hide all libc wrappers so
31 * that all that is needed to "port" a module to this architecture is to
32 * include this one header file
33 *
34 * Revision history:
35 *
36 *
37 * 0.4 Apr 12 1997 add the ANSI defines
38 * 0.3 Feb 24 1997 handle getenv
39 * 0.2 Feb 24 1997 hide few FILE functions
40 * 0.1 Feb 24 1997 hide the trivial functions mem* str*
41 */
42
43#ifndef XF86_LIBC_H
44#define XF86_LIBC_H 1
45
46#include <X11/Xfuncs.h>
47#include <stddef.h>
48
49/*
50 * The first set of definitions are required both for modules and
51 * libc_wrapper.c.
52 */
53
54/*
55 * First, the new data types
56 *
57 * note: if some pointer is declared "opaque" here, pass it between
58 * xf86* functions only, and don't rely on it having a whatever internal
59 * structure, even if some source file might reveal the existence of
60 * such a structure.
61 */
62typedef void XF86FILE; /* opaque FILE replacement */
63extern XF86FILE* xf86stdin;
64extern XF86FILE* xf86stdout;
65extern XF86FILE* xf86stderr;
66
67typedef void XF86fpos_t; /* opaque fpos_t replacement */
68
69#define _XF86NAMELEN 263 /* enough for a larger filename */
70 /* (divisble by 8) */
71typedef void XF86DIR; /* opaque DIR replacement */
72
73/* Note: the following is POSIX! POSIX only requires the d_name member.
74 * Normal Unix has often a number of other members, but don't rely on that
75 */
76struct _xf86dirent { /* types in struct dirent/direct: */
77 char d_name[_XF86NAMELEN+1]; /* char [MAXNAMLEN]; might be smaller or unaligned */
78};
79typedef struct _xf86dirent XF86DIRENT;
80
81typedef unsigned long xf86size_t;
82typedef signed long xf86ssize_t;
83typedef unsigned long xf86dev_t;
84typedef unsigned int xf86mode_t;
85typedef unsigned int xf86uid_t;
86typedef unsigned int xf86gid_t;
87
88struct xf86stat {
89 xf86dev_t st_rdev; /* This is incomplete, and makes assumptions */
90};
91
92/* sysv IPC */
93typedef int xf86key_t;
94
95/* setjmp/longjmp */
96#if defined(__ia64__)
97typedef int xf86jmp_buf[1024] __attribute__ ((aligned (16))); /* guarantees 128-bit alignment! */
98#else
99typedef int xf86jmp_buf[1024];
100#endif
101
102/* for setvbuf */
103#define XF86_IONBF 1
104#define XF86_IOFBF 2
105#define XF86_IOLBF 3
106
107/* for open (XXX not complete) */
108#define XF86_O_RDONLY 0x0000
109#define XF86_O_WRONLY 0x0001
110#define XF86_O_RDWR 0x0002
111#define XF86_O_CREAT 0x0200
112
113/* for mmap */
114#define XF86_PROT_EXEC 0x0001
115#define XF86_PROT_READ 0x0002
116#define XF86_PROT_WRITE 0x0004
117#define XF86_PROT_NONE 0x0008
118#define XF86_MAP_FIXED 0x0001
119#define XF86_MAP_SHARED 0x0002
120#define XF86_MAP_PRIVATE 0x0004
121#define XF86_MAP_32BIT 0x0040
122#define XF86_MAP_FAILED ((void *)-1)
123
124/* for fseek */
125#define XF86_SEEK_SET 0
126#define XF86_SEEK_CUR 1
127#define XF86_SEEK_END 2
128
129/* for access */
130#define XF86_R_OK 0
131#define XF86_W_OK 1
132#define XF86_X_OK 2
133#define XF86_F_OK 3
134
135/* for chmod */
136#define XF86_S_ISUID 04000 /* set user ID on execution */
137#define XF86_S_ISGID 02000 /* set group ID on execution */
138#define XF86_S_ISVTX 01000 /* sticky bit */
139#define XF86_S_IRUSR 00400 /* read by owner */
140#define XF86_S_IWUSR 00200 /* write by owner */
141#define XF86_S_IXUSR 00100 /* execute/search by owner */
142#define XF86_S_IRGRP 00040 /* read by group */
143#define XF86_S_IWGRP 00020 /* write by group */
144#define XF86_S_IXGRP 00010 /* execute/search by group */
145#define XF86_S_IROTH 00004 /* read by others */
146#define XF86_S_IWOTH 00002 /* write by others */
147#define XF86_S_IXOTH 00001 /* execute/search by others */
148
149/* for mknod */
150#define XF86_S_IFREG 0010000
151#define XF86_S_IFCHR 0020000
152#define XF86_S_IFBLK 0040000
153#define XF86_S_IFIFO 0100000
154
155/*
156 * errno values
157 * They start at 1000 just so they don't match real errnos at all
158 */
159#define xf86_UNKNOWN 1000
160#define xf86_EACCES 1001
161#define xf86_EAGAIN 1002
162#define xf86_EBADF 1003
163#define xf86_EEXIST 1004
164#define xf86_EFAULT 1005
165#define xf86_EINTR 1006
166#define xf86_EINVAL 1007
167#define xf86_EISDIR 1008
168#define xf86_ELOOP 1009
169#define xf86_EMFILE 1010
170#define xf86_ENAMETOOLONG 1011
171#define xf86_ENFILE 1012
172#define xf86_ENOENT 1013
173#define xf86_ENOMEM 1014
174#define xf86_ENOSPC 1015
175#define xf86_ENOTDIR 1016
176#define xf86_EPIPE 1017
177#define xf86_EROFS 1018
178#define xf86_ETXTBSY 1019
179#define xf86_ENOTTY 1020
180#define xf86_ENOSYS 1021
181#define xf86_EBUSY 1022
182#define xf86_ENODEV 1023
183#define xf86_EIO 1024
184
185#define xf86_ESRCH 1025
186#define xf86_ENXIO 1026
187#define xf86_E2BIG 1027
188#define xf86_ENOEXEC 1028
189#define xf86_ECHILD 1029
190#define xf86_ENOTBLK 1030
191#define xf86_EXDEV 1031
192#define xf86_EFBIG 1032
193#define xf86_ESPIPE 1033
194#define xf86_EMLINK 1034
195#define xf86_EDOM 1035
196#define xf86_ERANGE 1036
197
198
199/* sysv IPV */
200/* xf86shmget() */
201#define XF86IPC_CREAT 01000
202#define XF86IPC_EXCL 02000
203#define XF86IPC_NOWAIT 04000
204#define XF86SHM_R 0400
205#define XF86SHM_W 0200
206#define XF86IPC_PRIVATE ((xf86key_t)0)
207/* xf86shmat() */
208#define XF86SHM_RDONLY 010000 /* attach read-only else read-write */
209#define XF86SHM_RND 020000 /* round attach address to SHMLBA */
210#define XF86SHM_REMAP 040000 /* take-over region on attach */
211/* xf86shmclt() */
212#define XF86IPC_RMID 0
213
214/*
215 * the rest of this file should only be included for code that is supposed
216 * to go into modules
217 */
218
219#if !defined(DONT_DEFINE_WRAPPERS)
220
221#undef abort
222#define abort() xf86abort()
223#undef abs
224#define abs(i) xf86abs(i)
225#undef acos
226#define acos(d) xf86acos(d)
227#undef asin
228#define asin(d) xf86asin(d)
229#undef atan
230#define atan(d) xf86atan(d)
231#undef atan2
232#define atan2(d1,d2) xf86atan2(d1,d2)
233#undef atof
234#define atof(ccp) xf86atof(ccp)
235#undef atoi
236#define atoi(ccp) xf86atoi(ccp)
237#undef atol
238#define atol(ccp) xf86atol(ccp)
239#undef bsearch
240#define bsearch(a,b,c,d,e) xf86bsearch(a,b,c,d,e)
241#undef ceil
242#define ceil(d) xf86ceil(d)
243#undef calloc
244#define calloc(I1,I2) xf86calloc(I1,I2)
245#undef clearerr
246#define clearerr(FP) xf86clearerr(FP)
247#undef cos
248#define cos(d) xf86cos(d)
249#undef exit
250#define exit(i) xf86exit(i)
251#undef exp
252#define exp(d) xf86exp(d)
253#undef fabs
254#define fabs(d) xf86fabs(d)
255#undef fclose
256#define fclose(FP) xf86fclose(FP)
257#undef feof
258#define feof(FP) xf86feof(FP)
259#undef ferror
260#define ferror(FP) xf86ferror(FP)
261#undef fflush
262#define fflush(FP) xf86fflush(FP)
263#undef fgetc
264#define fgetc(FP) xf86fgetc(FP)
265#undef getc
266#define getc(FP) xf86getc(FP)
267#undef fgetpos
268#define fgetpos(FP,fpp) xf86fgetpos(FP,fpp)
269#undef fgets
270#define fgets(cp,i,FP) xf86fgets(cp,i,FP)
271#undef finite
272#define finite(d) xf86finite(d)
273#undef floor
274#define floor(d) xf86floor(d)
275#undef fmod
276#define fmod(d1,d2) xf86fmod(d1,d2)
277#undef fopen
278#define fopen(ccp1,ccp2) xf86fopen(ccp1,ccp2)
279#undef printf
280#define printf xf86printf
281#undef fprintf
282#define fprintf xf86fprintf
283#undef fputc
284#define fputc(i,FP) xf86fputc(i,FP)
285#undef fputs
286#define fputs(ccp,FP) xf86fputs(ccp,FP)
287#undef fread
288#define fread(vp,I1,I2,FP) xf86fread(vp,I1,I2,FP)
289#undef free
290#define free(vp) xf86free(vp)
291#undef freopen
292#define freopen(ccp1,ccp2,FP) xf86freopen(ccp1,ccp2,FP)
293#undef frexp
294#define frexp(x,exp) xf86frexp(x,exp)
295#undef fscanf
296#define fscanf xf86fscanf
297#undef fseek
298#define fseek(FP,l,i) xf86fseek(FP,l,i)
299#undef fsetpos
300#define fsetpos(FP,cfpp) xf86fsetpos(FP,cfpp)
301#undef ftell
302#define ftell(FP) xf86ftell(FP)
303#undef fwrite
304#define fwrite(cvp,I1,I2,FP) xf86fwrite(cvp,I1,I2,FP)
305#undef getenv
306#define getenv(ccp) xf86getenv(ccp)
307#undef isalnum
308#define isalnum(i) xf86isalnum(i)
309#undef isalpha
310#define isalpha(i) xf86isalpha(i)
311#undef iscntrl
312#define iscntrl(i) xf86iscntrl(i)
313#undef isdigit
314#define isdigit(i) xf86isdigit(i)
315#undef isgraph
316#define isgraph(i) xf86isgraph(i)
317#undef islower
318#define islower(i) xf86islower(i)
319#undef isprint
320#define isprint(i) xf86isprint(i)
321#undef ispunct
322#define ispunct(i) xf86ispunct(i)
323#undef isspace
324#define isspace(i) xf86isspace(i)
325#undef isupper
326#define isupper(i) xf86isupper(i)
327#undef isxdigit
328#define isxdigit(i) xf86isxdigit(i)
329#undef labs
330#define labs(l) xf86labs(l)
331#undef ldexp
332#define ldexp(x, exp) xf86ldexp(x, exp)
333#undef log
334#define log(d) xf86log(d)
335#undef log10
336#define log10(d) xf86log10(d)
337#undef malloc
338#define malloc(I) xf86malloc(I)
339#undef memchr
340#define memchr(cvp,i,I) xf86memchr(cvp,i,I)
341#undef memcmp
342#define memcmp(cvp1,cvp2,I) xf86memcmp(cvp1,cvp2,I)
343#undef memcpy
344#define memcpy(vp,cvp,I) xf86memcpy(vp,cvp,I)
345#undef memmove
346#define memmove(vp,cvp,I) xf86memmove(vp,cvp,I)
347#undef memset
348#define memset(vp,int,I) xf86memset(vp,int,I)
349#undef modf
350#define modf(d,dp) xf86modf(d,dp)
351#undef perror
352#define perror(ccp) xf86perror(ccp)
353#undef pow
354#define pow(d1,d2) xf86pow(d1,d2)
355#undef random
356#define random() xf86random()
357#undef realloc
358#define realloc(vp,I) xf86realloc(vp,I)
359#undef remove
360#define remove(ccp) xf86remove(ccp)
361#undef rename
362#define rename(ccp1,ccp2) xf86rename(ccp1,ccp2)
363#undef rewind
364#define rewind(FP) xf86rewind(FP)
365#undef setbuf
366#define setbuf(FP,cp) xf86setbuf(FP,cp)
367#undef setvbuf
368#define setvbuf(FP,cp,i,I) xf86setvbuf(FP,cp,i,I)
369#undef sin
370#define sin(d) xf86sin(d)
371#undef snprintf
372#define snprintf xf86snprintf
373#undef sprintf
374#define sprintf xf86sprintf
375#undef sqrt
376#define sqrt(d) xf86sqrt(d)
377#undef sscanf
378#define sscanf xf86sscanf
379#undef strcat
380#define strcat(cp,ccp) xf86strcat(cp,ccp)
381#undef strcmp
382#define strcmp(ccp1,ccp2) xf86strcmp(ccp1,ccp2)
383#undef strcasecmp
384#define strcasecmp(ccp1,ccp2) xf86strcasecmp(ccp1,ccp2)
385#undef strcpy
386#define strcpy(cp,ccp) xf86strcpy(cp,ccp)
387#undef strcspn
388#define strcspn(ccp1,ccp2) xf86strcspn(ccp1,ccp2)
389#undef strerror
390#define strerror(i) xf86strerror(i)
391#undef strlcat
392#define strlcat(cp,ccp,I) xf86strlcat(cp,ccp,I)
393#undef strlcpy
394#define strlcpy(cp,ccp,I) xf86strlcpy(cp,ccp,I)
395#undef strlen
396#define strlen(ccp) xf86strlen(ccp)
397#undef strncmp
398#define strncmp(ccp1,ccp2,I) xf86strncmp(ccp1,ccp2,I)
399#undef strncasecmp
400#define strncasecmp(ccp1,ccp2,I) xf86strncasecmp(ccp1,ccp2,I)
401#undef strncpy
402#define strncpy(cp,ccp,I) xf86strncpy(cp,ccp,I)
403#undef strpbrk
404#define strpbrk(ccp1,ccp2) xf86strpbrk(ccp1,ccp2)
405#undef strchr
406#define strchr(ccp,i) xf86strchr(ccp,i)
407#undef strrchr
408#define strrchr(ccp,i) xf86strrchr(ccp,i)
409#undef strspn
410#define strspn(ccp1,ccp2) xf86strspn(ccp1,ccp2)
411#undef strstr
412#define strstr(ccp1,ccp2) xf86strstr(ccp1,ccp2)
413#undef srttod
414#define strtod(ccp,cpp) xf86strtod(ccp,cpp)
415#undef strtok
416#define strtok(cp,ccp) xf86strtok(cp,ccp)
417#undef strtol
418#define strtol(ccp,cpp,i) xf86strtol(ccp,cpp,i)
419#undef strtoul
420#define strtoul(ccp,cpp,i) xf86strtoul(ccp,cpp,i)
421#undef tan
422#define tan(d) xf86tan(d)
423#undef tmpfile
424#define tmpfile() xf86tmpfile()
425#undef tolower
426#define tolower(i) xf86tolower(i)
427#undef toupper
428#define toupper(i) xf86toupper(i)
429#undef ungetc
430#define ungetc(i,FP) xf86ungetc(i,FP)
431#undef vfprinf
432#define vfprintf(p,f,a) xf86vfprintf(p,f,a)
433#undef vsnprintf
434#define vsnprintf(s,n,f,a) xf86vsnprintf(s,n,f,a)
435#undef vsprintf
436#define vsprintf(s,f,a) xf86vsprintf(s,f,a)
437/* XXX Disable assert as if NDEBUG was defined */
438/* Some X headers defined this away too */
439#undef assert
440#define assert(a) ((void)0)
441#undef HUGE_VAL
442#define HUGE_VAL xf86HUGE_VAL
443
444#undef hypot
445#define hypot(x,y) xf86hypot(x,y)
446
447#undef qsort
448#define qsort(b, n, s, f) xf86qsort(b, n, s, f)
449
450/* non-ANSI C functions */
451#undef opendir
452#define opendir(cp) xf86opendir(cp)
453#undef closedir
454#define closedir(DP) xf86closedir(DP)
455#undef readdir
456#define readdir(DP) xf86readdir(DP)
457#undef rewinddir
458#define rewinddir(DP) xf86rewinddir(DP)
459#undef bcopy
460#define bcopy(vp,cvp,I) xf86memmove(cvp,vp,I)
461#undef ffs
462#define ffs(i) xf86ffs(i)
463#undef strdup
464#define strdup(ccp) xf86strdup(ccp)
465#undef bzero
466#define bzero(vp,ui) xf86bzero(vp,ui)
467#undef execl
468#define execl xf86execl
469#undef chmod
470#define chmod(a,b) xf86chmod(a,b)
471#undef chown
472#define chown(a,b,c) xf86chown(a,b,c)
473#undef geteuid
474#define geteuid xf86geteuid
475#undef getegid
476#define getegid xf86getegid
477#undef getpid
478#define getpid xf86getpid
479#undef mknod
480#define mknod(a,b,c) xf86mknod(a,b,c)
481#undef sleep
482#define sleep(a) xf86sleep(a)
483#undef mkdir
484#define mkdir(a,b) xf86mkdir(a,b)
485#undef getpagesize
486#define getpagesize xf86getpagesize
487#undef shmget
488#define shmget(a,b,c) xf86shmget(a,b,c)
489#undef shmat
490#define shmat(a,b,c) xf86shmat(a,b,c)
491#undef shmdt
492#define shmdt(a) xf86shmdt(a)
493#undef shmctl
494#define shmctl(a,b,c) xf86shmctl(a,b,c)
495
496#undef S_ISUID
497#define S_ISUID XF86_S_ISUID
498#undef S_ISGID
499#define S_ISGID XF86_S_ISGID
500#undef S_ISVTX
501#define S_ISVTX XF86_S_ISVTX
502#undef S_IRUSR
503#define S_IRUSR XF86_S_IRUSR
504#undef S_IWUSR
505#define S_IWUSR XF86_S_IWUSR
506#undef S_IXUSR
507#define S_IXUSR XF86_S_IXUSR
508#undef S_IRGRP
509#define S_IRGRP XF86_S_IRGRP
510#undef S_IWGRP
511#define S_IWGRP XF86_S_IWGRP
512#undef S_IXGRP
513#define S_IXGRP XF86_S_IXGRP
514#undef S_IROTH
515#define S_IROTH XF86_S_IROTH
516#undef S_IWOTH
517#define S_IWOTH XF86_S_IWOTH
518#undef S_IXOTH
519#define S_IXOTH XF86_S_IXOTH
520#undef S_IFREG
521#define S_IFREG XF86_S_IFREG
522#undef S_IFCHR
523#define S_IFCHR XF86_S_IFCHR
524#undef S_IFBLK
525#define S_IFBLK XF86_S_IFBLK
526#undef S_IFIFO
527#define S_IFIFO XF86_S_IFIFO
528
529/* some types */
530#undef FILE
531#define FILE XF86FILE
532#undef fpos_t
533#define fpos_t XF86fpos_t
534#undef DIR
535#define DIR XF86DIR
536#undef DIRENT
537#define DIRENT XF86DIRENT
538#undef size_t
539#define size_t xf86size_t
540#undef ssize_t
541#define ssize_t xf86ssize_t
542#undef dev_t
543#define dev_t xf86dev_t
544#undef mode_t
545#define mode_t xf86mode_t
546#undef uid_t
547#define uid_t xf86uid_t
548#undef gid_t
549#define gid_t xf86gid_t
550#undef stat_t
551#define stat_t struct xf86stat
552
553#undef ulong
554#define ulong unsigned long
555
556/*
557 * There should be no need to #undef any of these. If they are already
558 * defined it is because some illegal header has been included.
559 */
560
561/* some vars */
562#undef stdin
563#define stdin xf86stdin
564#undef stdout
565#define stdout xf86stdout
566#undef stderr
567#define stderr xf86stderr
568
569#undef SEEK_SET
570#define SEEK_SET XF86_SEEK_SET
571#undef SEEK_CUR
572#define SEEK_CUR XF86_SEEK_CUR
573#undef SEEK_END
574#define SEEK_END XF86_SEEK_END
575
576/*
577 * XXX Basic I/O functions BAD,BAD,BAD!
578 */
579#define open xf86open
580#define close(a) xf86close(a)
581#define lseek(a,b,c) xf86lseek(a,b,c)
582#if !defined(__DragonFly__)
583#define ioctl(a,b,c) xf86ioctl(a,b,c)
584#endif
585#define read(a,b,c) xf86read(a,b,c)
586#define write(a,b,c) xf86write(a,b,c)
587#define mmap(a,b,c,d,e,f) xf86mmap(a,b,c,d,e,f)
588#define munmap(a,b) xf86munmap(a,b)
589#define stat(a,b) xf86stat(a,b)
590#define fstat(a,b) xf86fstat(a,b)
591#define access(a,b) xf86access(a,b)
592#undef O_RDONLY
593#define O_RDONLY XF86_O_RDONLY
594#undef O_WRONLY
595#define O_WRONLY XF86_O_WRONLY
596#undef O_RDWR
597#define O_RDWR XF86_O_RDWR
598#undef O_CREAT
599#define O_CREAT XF86_O_CREAT
600#undef PROT_EXEC
601#define PROT_EXEC XF86_PROT_EXEC
602#undef PROT_READ
603#define PROT_READ XF86_PROT_READ
604#undef PROT_WRITE
605#define PROT_WRITE XF86_PROT_WRITE
606#undef PROT_NONE
607#define PROT_NONE XF86_PROT_NONE
608#undef MAP_FIXED
609#define MAP_FIXED XF86_MAP_FIXED
610#undef MAP_SHARED
611#define MAP_SHARED XF86_MAP_SHARED
612#undef MAP_PRIVATE
613#define MAP_PRIVATE XF86_MAP_PRIVATE
614#undef MAP_FAILED
615#define MAP_FAILED XF86_MAP_FAILED
616#undef R_OK
617#define R_OK XF86_R_OK
618#undef W_OK
619#define W_OK XF86_W_OK
620#undef X_OK
621#define X_OK XF86_X_OK
622#undef F_OK
623#define F_OK XF86_F_OK
624#undef errno
625#define errno xf86errno
626#undef putchar
627#define putchar(i) xf86fputc(i, xf86stdout)
628#undef puts
629#define puts(s) xf86fputs(s, xf86stdout)
630
631#undef EACCES
632#define EACCES xf86_EACCES
633#undef EAGAIN
634#define EAGAIN xf86_EAGAIN
635#undef EBADF
636#define EBADF xf86_EBADF
637#undef EEXIST
638#define EEXIST xf86_EEXIST
639#undef EFAULT
640#define EFAULT xf86_EFAULT
641#undef EINTR
642#define EINTR xf86_EINTR
643#undef EINVAL
644#define EINVAL xf86_EINVAL
645#undef EISDIR
646#define EISDIR xf86_EISDIR
647#undef ELOOP
648#define ELOOP xf86_ELOOP
649#undef EMFILE
650#define EMFILE xf86_EMFILE
651#undef ENAMETOOLONG
652#define ENAMETOOLONG xf86_ENAMETOOLONG
653#undef ENFILE
654#define ENFILE xf86_ENFILE
655#undef ENOENT
656#define ENOENT xf86_ENOENT
657#undef ENOMEM
658#define ENOMEM xf86_ENOMEM
659#undef ENOSPC
660#define ENOSPC xf86_ENOSPC
661#undef ENOTDIR
662#define ENOTDIR xf86_ENOTDIR
663#undef EPIPE
664#define EPIPE xf86_EPIPE
665#undef EROFS
666#define EROFS xf86_EROFS
667#undef ETXTBSY
668#define ETXTBSY xf86_ETXTBSY
669#undef ENOTTY
670#define ENOTTY xf86_ENOTTY
671#undef ENOSYS
672#define ENOSYS xf86_ENOSYS
673#undef EBUSY
674#define EBUSY xf86_EBUSY
675#undef ENODEV
676#define ENODEV xf86_ENODEV
677#undef EIO
678#define EIO xf86_EIO
679
680/* IPC stuff */
681#undef SHM_RDONLY
682#define SHM_RDONLY XF86SHM_RDONLY
683#undef SHM_RND
684#define SHM_RND XF86SHM_RND
685#undef SHM_REMAP
686#define SHM_REMAP XF86SHM_REMAP
687#undef IPC_RMID
688#define IPC_RMID XF86IPC_RMID
689#undef IPC_CREAT
690#define IPC_CREAT XF86IPC_CREAT
691#undef IPC_EXCL
692#define IPC_EXCL XF86IPC_EXCL
693#undef PC_NOWAIT
694#define IPC_NOWAIT XF86IPC_NOWAIT
695#undef SHM_R
696#define SHM_R XF86SHM_R
697#undef SHM_W
698#define SHM_W XF86SHM_W
699#undef IPC_PRIVATE
700#define IPC_PRIVATE XF86IPC_PRIVATE
701
702/* Some ANSI macros */
703#undef FILENAME_MAX
704#define FILENAME_MAX 1024
705
706#if (defined(sun) && defined(__SVR4))
707# define _FILEDEFED /* Already have FILE defined, don't redefine it */
708#endif
709
710#endif /* !DONT_DEFINE_WRAPPERS */
711
712#if (!defined(DONT_DEFINE_WRAPPERS) || defined(DEFINE_SETJMP_WRAPPERS))
713#undef setjmp
714#define setjmp(a) xf86setjmp_macro(a)
715#undef longjmp
716#define longjmp(a,b) xf86longjmp(a,b)
717#undef jmp_buf
718#define jmp_buf xf86jmp_buf
719#endif
720
721#endif /* XF86_LIBC_H */
Note: See TracBrowser for help on using the repository browser.

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