comparison src/s/cygwin32.h @ 412:697ef44129c6 r21-2-14

Import from CVS: tag r21-2-14
author cvs
date Mon, 13 Aug 2007 11:20:41 +0200
parents de805c49cfc1
children 41dbb7a9d5f2
comparison
equal deleted inserted replaced
411:12e008d41344 412:697ef44129c6
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. */ 19 Boston, MA 02111-1307, USA. */
20 20
21 /* Building under cygwin 21 /* Building under cygwin
22 * 22 *
23 * The approach I have taken with this port is to use primarily the 23 * The approach I have taken with this port is to use primarily the UNIX
24 * UNIX code base adding stuff that is MS-Windows specific. This works 24 * code base adding stuff that is MS-Windows specific. This works quite
25 * quite well, and is in keeping with my perception of the cygwin 25 * well, and is in keeping with my perception of the cygwin philosophy.
26 * philosophy. Note that if you make changes to this file you do NOT 26 * Note that if you make changes to this file you do NOT want to define
27 * want to define WIN32_NATIVE (formerly "WINDOWSNT"), I repeat - do 27 * WINDOWSNT, I repeat - do not define this, it will break everything
28 * not define this, it will break everything horribly. What does get 28 * horribly. What does get defined is HAVE_MS_WINDOWS, but this is
29 * defined is HAVE_MS_WINDOWS, but this is done by configure and only 29 * done by configure and only applies to the window system.
30 * applies to the window system.
31 * 30 *
32 * When building make sure your HOME path is unix style - i.e. without 31 * When building make sure your HOME path is unix style - i.e. without
33 * a drive letter. 32 * a drive letter.
34 * 33 *
35 * once you have done this, configure and make. 34 * once you have done this, configure and make.
37 * windows '95 - I haven't tested this under '95, it will probably 36 * windows '95 - I haven't tested this under '95, it will probably
38 * build but I konw there are some limitations with cygwin under 95 so 37 * build but I konw there are some limitations with cygwin under 95 so
39 * YMMV. I build with NT4 SP3. 38 * YMMV. I build with NT4 SP3.
40 * 39 *
41 * Andy Piper <andy@xemacs.org> 8/1/98 40 * Andy Piper <andy@xemacs.org> 8/1/98
42 * http://www.xemacs.freeserve.co.uk/ */ 41 * http://www.parallax.co.uk/~andyp */
43
44 /* Identify ourselves */
45 #define CYGWIN
46 42
47 /* cheesy way to determine cygwin version */ 43 /* cheesy way to determine cygwin version */
48 #ifndef NOT_C_CODE 44 #ifndef NOT_C_CODE
49 # include <signal.h> 45 #include <signal.h>
50 # ifdef HAVE_CYGWIN_VERSION_H 46 #ifdef HAVE_CYGWIN_VERSION_H
51 # include <cygwin/version.h> 47 #include <cygwin/version.h>
52 # else 48 #else
53 # ifdef SIGIO 49 #ifdef SIGIO
54 # define CYGWIN_VERSION_DLL_MAJOR 19 50 #define CYGWIN_B19
55 # define CYGWIN_VERSION_DLL_MINOR 0 51 #else
56 # define CYGWIN_B19 52 #define BROKEN_CYGWIN
57 # else 53 #endif
58 # define CYGWIN_VERSION_DLL_MAJOR 18 54 #endif
59 # define CYGWIN_VERSION_DLL_MINOR 0 55
60 # define BROKEN_CYGWIN 56 extern void cygwin32_win32_to_posix_path_list(const char*, char*);
61 # endif 57 extern int cygwin32_win32_to_posix_path_list_buf_size(const char*);
62 # endif 58 extern void cygwin32_posix_to_win32_path_list(const char*, char*);
63 59 extern int cygwin32_posix_to_win32_path_list_buf_size(const char*);
64 void cygwin32_win32_to_posix_path_list (const char*, char*); 60 #ifndef CYGWIN_VERSION_DLL_MAJOR
65 int cygwin32_win32_to_posix_path_list_buf_size (const char*);
66 void cygwin32_posix_to_win32_path_list (const char*, char*);
67 int cygwin32_posix_to_win32_path_list_buf_size (const char*);
68 # if CYGWIN_VERSION_DLL_MAJOR < 20
69 struct timeval; 61 struct timeval;
70 struct timezone; 62 struct timezone;
71 struct itimerval; 63 struct itimerval;
72 struct stat; 64 struct stat;
73 int gettimeofday (struct timeval *tp, struct timezone *tzp); 65 extern int gettimeofday(struct timeval *tp, struct timezone *tzp);
74 int gethostname (char* name, int namelen); 66 extern int gethostname (char* name, int namelen);
75 char* mktemp (char *); 67 extern char* mktemp(char *);
76 double logb (double); 68 extern double logb(double);
77 void sync (void); 69 extern void sync();
78 int ioctl (int, int, ...); 70 extern int ioctl(int, int, ...);
79 /* sys/stat.h */ 71 /* sys/stat.h */
80 int lstat (const char *path, struct stat *buf); 72 extern int lstat(const char *path, struct stat *buf);
81 /* unistd.h */ 73 /* unistd.h */
82 int readlink (const char *path, void *buf, unsigned int bufsiz); 74 extern int readlink(const char *path, void *buf, unsigned int bufsiz);
83 int symlink (const char *name1, const char *name2); 75 extern int symlink(const char *name1, const char *name2);
84 /* sys/time.h */ 76 /* sys/time.h */
85 int setitimer (int which, const struct itimerval *value, 77 extern int setitimer(int which, const struct itimerval *value,
86 struct itimerval *ovalue); 78 struct itimerval *ovalue);
87 int utimes (char *file, struct timeval *tvp); 79 extern int utimes(char *file, struct timeval *tvp);
88 80
89 int srandom (unsigned seed); 81 extern int srandom( unsigned seed);
90 long random (void); 82 extern long random();
91 83
92 # endif /* CYGWIN_VERSION_DLL_MAJOR < 20 */ 84 #define SND_ASYNC 1
93 85 #define SND_NODEFAULT 2
94 # if CYGWIN_VERSION_DLL_MAJOR <= 20 86 #define SND_MEMORY 4
95 char *getpass (const char *prompt); 87 #define SND_FILENAME 0x2000L
96 double logb (double); 88 #define VK_APPS 0x5D
97 # endif /* CYGWIN_VERSION_DLL_MAJOR <= 20 */ 89 #define SIF_TRACKPOS 0x0010
98 90 #define ICC_BAR_CLASSES 4
91 #define FW_BLACK FW_HEAVY
92 #define FW_ULTRABOLD FW_EXTRABOLD
93 #define FW_DEMIBOLD FW_SEMIBOLD
94 #define FW_ULTRALIGHT FW_EXTRALIGHT
95 #define APPCMD_FILTERINITS 0x20L
96 #define CBF_FAIL_SELFCONNECTIONS 0x1000
97 #define CBF_SKIP_ALLNOTIFICATIONS 0x3C0000
98 #define CBF_FAIL_ADVISES 0x4000
99 #define CBF_FAIL_POKES 0x10000
100 #define CBF_FAIL_REQUESTS 0x20000
101 #define SZDDESYS_TOPIC "System"
102 #define JOHAB_CHARSET 130
103 #define MAC_CHARSET 77
104
105 #endif
106 #endif
107
108 #define PBS_SMOOTH 0x01
109
110 #ifdef HAVE_MS_WINDOWS
111 #define HAVE_NTGUI
112 #define HAVE_FACES
99 #endif 113 #endif
100 114
101 #ifndef ORDINARY_LINK 115 #ifndef ORDINARY_LINK
102 #define ORDINARY_LINK 116 #define ORDINARY_LINK
103 #endif 117 #endif
104 118
105 #define C_SWITCH_SYSTEM -Wno-sign-compare -fno-caller-saves 119 #define C_SWITCH_SYSTEM -Wno-sign-compare -fno-caller-saves
106 #define LIBS_SYSTEM -lwinmm 120 #define LIBS_SYSTEM -lwinmm
107 #define WIN32_LEAN_AND_MEAN 121
108 122
109 #define TEXT_START -1 123 #define TEXT_START -1
110 #define TEXT_END -1 124 #define TEXT_END -1
111 #define DATA_END -1 125 #define DATA_END -1
112 #define HEAP_IN_DATA 126 #define HEAP_IN_DATA
113 #define NO_LIM_DATA
114 #define UNEXEC "unexcw.o" 127 #define UNEXEC "unexcw.o"
115 128
116 #ifdef CYGWIN_VERSION_DLL_MAJOR 129 #ifdef CYGWIN_VERSION_DLL_MAJOR
117 #if 0 130 #if 0
118 /* #### FIXME: although defining BROKEN_SIGIO is correct for proper ^G 131 /* ### FIXME: although defining BROKEN_SIGIO is correct for proper ^G
119 behavior, bugs in cygwin mean that xemacs locks up frequently if 132 behavior, bugs in cygwin mean that xemacs locks up frequently if
120 this is defined. */ 133 this is defined. */
121 #define BROKEN_SIGIO 134 #define BROKEN_SIGIO
122 #endif 135 #endif
123 #else 136 #else
126 #define strnicmp strncasecmp 139 #define strnicmp strncasecmp
127 #ifndef HAVE_SOCKETS 140 #ifndef HAVE_SOCKETS
128 #define HAVE_SOCKETS 141 #define HAVE_SOCKETS
129 #endif 142 #endif
130 #define OBJECTS_SYSTEM ntplay.o 143 #define OBJECTS_SYSTEM ntplay.o
144 #define HAVE_NATIVE_SOUND
131 145
132 #undef MAIL_USE_SYSTEM_LOCK 146 #undef MAIL_USE_SYSTEM_LOCK
147 #define MAIL_USE_POP
133 148
134 /* Define NO_ARG_ARRAY if you cannot take the address of the first of a 149 /* Define NO_ARG_ARRAY if you cannot take the address of the first of a
135 * group of arguments and treat it as an array of the arguments. */ 150 * group of arguments and treat it as an array of the arguments. */
136 151
137 #define NO_ARG_ARRAY 152 #define NO_ARG_ARRAY
153
154 /* Define WORD_MACHINE if addresses and such have
155 * to be corrected before they can be used as byte counts. */
156
157 #define WORD_MACHINE
158
159 /* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
160 the 24-bit bit field into an int. In other words, if bit fields
161 are always unsigned.
162
163 If you use NO_UNION_TYPE, this flag does not matter. */
164
165 #define EXPLICIT_SIGN_EXTEND
138 166
139 /* Data type of load average, as read out of kmem. */ 167 /* Data type of load average, as read out of kmem. */
140 168
141 #define LOAD_AVE_TYPE long 169 #define LOAD_AVE_TYPE long
142 170
151 Otherwise Emacs assumes that text space precedes data space, 179 Otherwise Emacs assumes that text space precedes data space,
152 numerically. */ 180 numerically. */
153 181
154 /* Text does precede data space, but this is never a safe assumption. */ 182 /* Text does precede data space, but this is never a safe assumption. */
155 #define VIRT_ADDR_VARIES 183 #define VIRT_ADDR_VARIES
184
185 /* set this if you have a new version of cygwin
186 #define DATA_SEG_BITS 0x10000000
187 */
156 188
157 /* If you are compiling with a non-C calling convention but need to 189 /* If you are compiling with a non-C calling convention but need to
158 declare vararg routines differently, put it here */ 190 declare vararg routines differently, put it here */
159 #define _VARARGS_ __cdecl 191 #define _VARARGS_ __cdecl
160 192