comparison src/s/cygwin32.h @ 558:ed498ef2108b

[xemacs-hg @ 2001-05-23 09:59:33 by ben] xemacs.mak: call `ver' to get the exact os version and put it in the installation; suggestion from adrian. behavior-defs.el: Add scroll-in-place, jka-compr, efs, fix up some things. pop.c: Remove BROKEN_CYGWIN. etc\sample.init.el: Rewrite to be much more careful about loading features -- now it decays gracefully even in the complete absence of packages. Also avoid doing obnoxious things when loading efs. configure.in: add some support for eventually turning on file coding by default. Fix numerous places where AC_MSG_WARN had quotes around its arg, which is bad. Replace with []. Same for AC_MSG_ERROR. s\cygwin32.h, s\mingw32.h: remove support for way old beta versions of cygwin. don't put -Wno-sign-compare in the system switches; this isn't a system issue. define BROKEN_SIGIO for cygwin to get C-g support. device-msw.c: signal an error rather than crash with an unavailable network printer (from Mike Alexander). event-msw.c: cleanup headers. fix (hopefully) an error with data corruption when sending to a network connection. fileio.c: Fix evil code that attempts to handle the ~user prefix by (a) always assuming we're referencing ourselves and not even verifying the user -- hence any file with a tilde as its first char is invalid! (b) if there wasn't a slash following the filename, the pointer was set *past* the end of file and we started reading from uninitialized memory. Now we simply treat these as files, always. optionally for 21.4 (doc fix): lread.c: cambia de pas_de_lache_ici -- al minimo usa la palabra certa. frame.c: fix warnings. emacs.c, nt.c, ntproc.c, process-nt.c, realpath.c, unexnt.c: rename MAX_PATH to standard PATH_MAX. process-nt.c, realpath.c: cleanup headers. process-unix.c, sysdep.c, systime.h, syswindows.h: kill BROKEN_CYGWIN and support for way old beta versions of cygwin. sysfile.h: use _MAX_PATH (Windows) preferentially for PATH_MAX if defined. include io.h on Cygwin (we need get_osfhandle()). include sys/fcntl.h always, since we were including it in various header files anyway. unexcw.c: fix up style to conform to standard. remove duplicate definition of PERROR. buffer.c: comment change. database.c, debug.h, device-tty.c, dired-msw.c, glyphs-msw.c: header cleanups (remove places that directly include a system header file, because we have our own layer to do this more cleanly and portably); indentation fixes.
author ben
date Wed, 23 May 2001 09:59:48 +0000
parents c69610198c35
children 5fd7ba8b56e7
comparison
equal deleted inserted replaced
557:f486da5f1a3b 558:ed498ef2108b
1 /* system description file for cygwin32. 1 /* system description file for cygwin32.
2 Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc. 2 Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc.
3 Copyright (C) 2001 Ben Wing.
3 4
4 This file is part of GNU Emacs. 5 This file is part of GNU Emacs.
5 6
6 GNU Emacs is free software; you can redistribute it and/or modify 7 GNU Emacs is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by 8 it under the terms of the GNU General Public License as published by
45 #define CYGWIN 46 #define CYGWIN
46 47
47 /* cheesy way to determine cygwin version */ 48 /* cheesy way to determine cygwin version */
48 #ifndef NOT_C_CODE 49 #ifndef NOT_C_CODE
49 # include <signal.h> 50 # include <signal.h>
50 # ifdef HAVE_CYGWIN_VERSION_H 51 # include <cygwin/version.h>
51 # include <cygwin/version.h>
52 # else
53 # ifdef SIGIO
54 # define CYGWIN_VERSION_DLL_MAJOR 19
55 # define CYGWIN_VERSION_DLL_MINOR 0
56 # define CYGWIN_B19
57 # else
58 # define CYGWIN_VERSION_DLL_MAJOR 18
59 # define CYGWIN_VERSION_DLL_MINOR 0
60 # define BROKEN_CYGWIN
61 # endif
62 # endif
63 52
64 # if CYGWIN_VERSION_DLL_MAJOR < 20 53 void cygwin_win32_to_posix_path_list (const char *, char *);
65 54 int cygwin_win32_to_posix_path_list_buf_size (const char *);
66 void cygwin32_win32_to_posix_path_list (const char*, char*); 55 void cygwin_posix_to_win32_path_list (const char *, char *);
67 int cygwin32_win32_to_posix_path_list_buf_size (const char*); 56 int cygwin_posix_to_win32_path_list_buf_size (const char *);
68 void cygwin32_posix_to_win32_path_list (const char*, char*);
69 int cygwin32_posix_to_win32_path_list_buf_size (const char*);
70
71 #define cygwin_win32_to_posix_path_list cygwin32_win32_to_posix_path_list
72 #define cygwin_win32_to_posix_path_list_buf_size \
73 cygwin32_win32_to_posix_path_list_buf_size
74 #define cygwin_posix_to_win32_path_list cygwin32_posix_to_win32_path_list
75 #define cygwin_posix_to_win32_path_list_buf_size \
76 cygwin32_posix_to_win32_path_list_buf_size
77
78 struct timeval;
79 struct timezone;
80 struct itimerval;
81 struct stat;
82 int gettimeofday (struct timeval *tp, struct timezone *tzp);
83 int gethostname (char* name, int namelen);
84 char* mktemp (char *);
85 double logb (double);
86 void sync (void);
87 int ioctl (int, int, ...);
88 /* sys/stat.h */
89 int lstat (const char *path, struct stat *buf);
90 /* unistd.h */
91 int readlink (const char *path, void *buf, unsigned int bufsiz);
92 int symlink (const char *name1, const char *name2);
93 /* sys/time.h */
94 int setitimer (int which, const struct itimerval *value,
95 struct itimerval *ovalue);
96 int utimes (char *file, struct timeval *tvp);
97
98 int srandom (unsigned seed);
99 long random (void);
100
101 # else /* not CYGWIN_VERSION_DLL_MAJOR < 20 */
102
103 void cygwin_win32_to_posix_path_list (const char*, char*);
104 int cygwin_win32_to_posix_path_list_buf_size (const char*);
105 void cygwin_posix_to_win32_path_list (const char*, char*);
106 int cygwin_posix_to_win32_path_list_buf_size (const char*);
107
108 # endif /* CYGWIN_VERSION_DLL_MAJOR < 20 */
109
110 # if CYGWIN_VERSION_DLL_MAJOR <= 20
111 char *getpass (const char *prompt);
112 double logb (double);
113 # endif /* CYGWIN_VERSION_DLL_MAJOR <= 20 */
114 57
115 /* Still left out of 1.1! */ 58 /* Still left out of 1.1! */
116 double logb (double); 59 double logb (double);
117 int killpg (int pgrp, int sig); 60 int killpg (int pgrp, int sig);
118 61
120 63
121 #ifndef ORDINARY_LINK 64 #ifndef ORDINARY_LINK
122 #define ORDINARY_LINK 65 #define ORDINARY_LINK
123 #endif 66 #endif
124 67
125 #define C_SWITCH_SYSTEM -Wno-sign-compare -fno-caller-saves 68 #define C_SWITCH_SYSTEM -fno-caller-saves
126 #define LIBS_SYSTEM -lwinmm 69 #define LIBS_SYSTEM -lwinmm
127 #define WIN32_LEAN_AND_MEAN 70 #define WIN32_LEAN_AND_MEAN
128 71
129 #define TEXT_START -1 72 #define TEXT_START -1
130 #define TEXT_END -1 73 #define TEXT_END -1
131 #define DATA_END -1 74 #define DATA_END -1
132 #define HEAP_IN_DATA 75 #define HEAP_IN_DATA
133 #define NO_LIM_DATA 76 #define NO_LIM_DATA
134 #define UNEXEC "unexcw.o" 77 #define UNEXEC "unexcw.o"
135 78
136 #ifdef CYGWIN_VERSION_DLL_MAJOR
137 #if 0
138 /* #### FIXME: although defining BROKEN_SIGIO is correct for proper ^G
139 behavior, bugs in cygwin mean that xemacs locks up frequently if
140 this is defined. */
141 #define BROKEN_SIGIO 79 #define BROKEN_SIGIO
142 #endif 80
143 #else
144 #define PROCESS_IO_BLOCKING
145 #endif
146 #define strnicmp strncasecmp 81 #define strnicmp strncasecmp
147 #ifndef HAVE_SOCKETS 82 #ifndef HAVE_SOCKETS
148 #define HAVE_SOCKETS 83 #define HAVE_SOCKETS
149 #endif 84 #endif
150 #define OBJECTS_SYSTEM ntplay.o 85 #define OBJECTS_SYSTEM ntplay.o