(add_emchar_rune): Use `ASCII_TO_CHARC', `CHAR_TO_CHARC' and
[chise/xemacs-chise.git-] / src / s / mingw32.h
index 4f0fd96..1454e05 100644 (file)
@@ -28,8 +28,6 @@ Boston, MA 02111-1307, USA.  */
 #define DOS_NT         /* MSDOS or WINDOWSNT */
 #endif
 
-#define PBS_SMOOTH              0x01
-
 #ifdef HAVE_MS_WINDOWS
 #define HAVE_NTGUI
 #define HAVE_FACES
@@ -41,6 +39,7 @@ Boston, MA 02111-1307, USA.  */
 
 #define C_SWITCH_SYSTEM "-mno-cygwin -Wno-sign-compare -fno-caller-saves -Int/inc -I../nt/inc -DWINDOWSNT"
 #define LIBS_SYSTEM "-mno-cygwin -lwinmm -lwsock32"
+#define WIN32_LEAN_AND_MEAN
 
 #define TEXT_START -1
 #define TEXT_END -1
@@ -51,9 +50,11 @@ Boston, MA 02111-1307, USA.  */
 #define TIME_ONESHOT 0
 #define TIME_PERIODIC 1
 #define LOCALE_USE_CP_ACP 0x40000000
-#define SHGFI_EXETYPE 0x2000
 #define NSIG 23
 
+/* this is necessary to get the TCS_* definitions in <commctrl.h> */
+#define _WIN32_IE 0x0400
+
 /* translate NT world unexec stuff to our a.out definitions */
 
 #define strnicmp strncasecmp
@@ -72,18 +73,6 @@ Boston, MA 02111-1307, USA.  */
 
 #define NO_ARG_ARRAY
 
-/* Define WORD_MACHINE if addresses and such have
- * to be corrected before they can be used as byte counts.  */
-
-#define WORD_MACHINE
-
-/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
-   the 24-bit bit field into an int.  In other words, if bit fields
-   are always unsigned.
-
-   If you use NO_UNION_TYPE, this flag does not matter.  */
-
-#define EXPLICIT_SIGN_EXTEND
 /* System calls that are encapsulated */
 #define ENCAPSULATE_RENAME
 #define ENCAPSULATE_OPEN
@@ -108,10 +97,6 @@ Boston, MA 02111-1307, USA.  */
 /* Text does precede data space, but this is never a safe assumption.  */
 #define VIRT_ADDR_VARIES
 
-/* set this if you have a new version of cygwin
-#define DATA_SEG_BITS 0x10000000
-*/
-
 /* If you are compiling with a non-C calling convention but need to
    declare vararg routines differently, put it here */
 #define _VARARGS_ __cdecl
@@ -172,12 +157,6 @@ Boston, MA 02111-1307, USA.  */
 #include <cygwin/version.h>
 #endif
 
-typedef unsigned int MMRESULT;
-typedef struct timecaps_tag {          
-  unsigned int    wPeriodMin;
-  unsigned int    wPeriodMax;
-} TIMECAPS;
-
 /* IO calls that are emulated or shadowed */
 #define pipe    sys_pipe
 int sys_pipe (int * phandles);
@@ -189,8 +168,8 @@ void sleep (int seconds);
 
 /* subprocess calls that are emulated */
 #define spawnve sys_spawnve
-int spawnve (int mode, CONST char *cmdname, 
-            CONST char * CONST *argv, CONST char *CONST *envp);
+int spawnve (int mode, const char *cmdname, 
+            const char * const *argv, const char *const *envp);
 
 #define wait    sys_wait
 int wait (int *status);
@@ -205,7 +184,7 @@ int kill (int pid, int sig);
 /* Encapsulation of system calls */
 #ifndef DONT_ENCAPSULATE
 #define getpid sys_getpid
-int getpid (void);
+pid_t getpid (void);
 #endif
 
 #define DONT_USE_LITOUT
@@ -222,24 +201,35 @@ char *getwd (char *dir);
 void *sbrk (unsigned long increment);
 
 struct passwd;
-struct passwd *getpwuid (int uid);
+struct passwd *getpwuid (uid_t uid);
 struct passwd *getpwnam (const char *name);
-int getuid ();
-int geteuid ();
-int getgid (void);
-int getegid ();
+uid_t getuid (void);
+uid_t geteuid (void);
+gid_t getgid (void);
+gid_t getegid (void);
+
+#if CYGWIN_VERSION_DLL_MAJOR <= 21
+#define _ftime ftime
 #define _timeb timeb
+#endif
 
 /* Stuff that gets set wrongly or otherwise */
 #define HAVE_SETITIMER
 #define HAVE_GETTIMEOFDAY
 #define HAVE_SELECT
 /*#define HAVE_STRUCT_UTIMBUF*/
+#ifndef HAVE_H_ERRNO
+#define HAVE_H_ERRNO
+#endif
+#ifndef HAVE_TZNAME
+#define HAVE_TZNAME
+#endif
 
 #undef GETTIMEOFDAY_ONE_ARGUMENT
 #undef HAVE_SYS_WAIT_H
 #undef HAVE_TERMIOS
 #undef SYSV_SYSTEM_DIR
+#undef CLASH_DETECTION
 
 /* We now have emulation for some signals */
 #define HAVE_SIGHOLD