summaryrefslogtreecommitdiff
path: root/xc/programs/Xserver/hw/xfree86/os-support/xf86_ansic.h
diff options
context:
space:
mode:
Diffstat (limited to 'xc/programs/Xserver/hw/xfree86/os-support/xf86_ansic.h')
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/xf86_ansic.h40
1 files changed, 31 insertions, 9 deletions
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/xf86_ansic.h b/xc/programs/Xserver/hw/xfree86/os-support/xf86_ansic.h
index 23389ea39..6e4956812 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/xf86_ansic.h
+++ b/xc/programs/Xserver/hw/xfree86/os-support/xf86_ansic.h
@@ -1,5 +1,5 @@
/*
- * Copyright 1997,1998 by The XFree86 Project, Inc
+ * Copyright 1997-2000 by The XFree86 Project, Inc
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
@@ -22,15 +22,32 @@
*
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/xf86_ansic.h,v 3.36 2000/02/16 15:28:34 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/xf86_ansic.h,v 3.40 2000/06/17 00:03:26 martin Exp $ */
#ifndef _XF86_ANSIC_H
#define _XF86_ANSIC_H
-#ifndef FONTMODULE
-#include "misc.h"
-#endif
-#include "xf86_libc.h"
+/* Handle <stdarg.h> */
+
+#ifndef IN_MODULE
+# include <stdarg.h>
+#else /* !IN_MODULE */
+# ifndef __OS2ELF__
+# include <stdarg.h>
+# else /* __OS2ELF__ */
+ /* EMX/gcc_elf under OS/2 does not have native header files */
+# if !defined (_VA_LIST)
+# define _VA_LIST
+ typedef char *va_list;
+# endif
+# define _VA_ROUND(t) ((sizeof (t) + 3) & -4)
+# if !defined (va_start)
+# define va_start(ap,v) ap = (va_list)&v + ((sizeof (v) + 3) & -4)
+# define va_end(ap) (ap = 0, (void)0)
+# define va_arg(ap,t) (ap += _VA_ROUND (t), *(t *)(ap - _VA_ROUND (t)))
+# endif
+# endif /* __OS2ELF__ */
+#endif /* IN_MODULE */
/*
* The first set of definitions are required both for modules and
@@ -64,6 +81,11 @@
#ifndef SHRT_MIN
#define SHRT_MIN ((short)(1 << (x_SHORTBITS - 1)))
#endif
+
+#ifndef FONTMODULE
+#include "misc.h"
+#endif
+#include "xf86_libc.h"
#ifndef SHRT_MAX
#define SHRT_MAX ((short)~SHRT_MIN)
#endif
@@ -107,8 +129,6 @@
#define MAXLONG LONG_MAX
#endif
-#include <stdarg.h>
-
/*
* ANSI C compilers only.
*/
@@ -267,6 +287,8 @@ extern long xf86fpossize(void);
extern int xf86chmod(const char *, xf86mode_t);
extern int xf86chown(const char *, xf86uid_t, xf86gid_t);
extern xf86uid_t xf86geteuid(void);
+extern xf86gid_t xf86getegid(void);
+extern int xf86getpid(void);
extern int xf86mknod(const char *, xf86mode_t, xf86dev_t);
extern int xf86mkdir(const char *, xf86mode_t);
unsigned int xf86sleep(unsigned int seconds);
@@ -296,7 +318,7 @@ extern int xf86shmctl(int id, int xf86cmd, pointer *buf);
extern int xf86getpagesize(void);
extern void xf86usleep(unsigned long);
-extern void xf86getsecs(CARD32 *, CARD32 *);
+extern void xf86getsecs(long *, long *);
#ifndef DONT_DEFINE_WRAPPERS
#undef getpagesize
#define getpagesize() xf86getpagesize()