X-Git-Url: http://git.chise.org/gitweb/?p=chise%2Fxemacs-chise.git.1;a=blobdiff_plain;f=src%2Fs%2Fcygwin32.h;h=c8673c3f7a02ae06019b843409f826978fbbcc56;hp=b277934ca3eb5d74ba67bf13c2a6bf1d2f31b521;hb=762383636a99307282c2d93d26c35c046ec24da1;hpb=669565bfdc5d704dfb1d5ac1a0ec01fb3615a1ae diff --git a/src/s/cygwin32.h b/src/s/cygwin32.h index b277934..c8673c3 100644 --- a/src/s/cygwin32.h +++ b/src/s/cygwin32.h @@ -20,107 +20,82 @@ Boston, MA 02111-1307, USA. */ /* Building under cygwin * - * The approach I have taken with this port is to use primarily the UNIX - * code base adding stuff that is MS-Windows specific. This works quite - * well, and is in keeping with my perception of the cygwin philosophy. - * Note that if you make changes to this file you do NOT want to define - * WINDOWSNT, I repeat - do not define this, it will break everything - * horribly. What does get defined is HAVE_MS_WINDOWS, but this is - * done by configure and only applies to the window system. + * The approach I have taken with this port is to use primarily the + * UNIX code base adding stuff that is MS-Windows specific. This works + * quite well, and is in keeping with my perception of the cygwin + * philosophy. Note that if you make changes to this file you do NOT + * want to define WIN32_NATIVE (formerly "WINDOWSNT"), I repeat - do + * not define this, it will break everything horribly. What does get + * defined is HAVE_MS_WINDOWS, but this is done by configure and only + * applies to the window system. * - * The important thing about building is that it is done on a binary - * mounted filesystem. i.e. something mounted like: mount -b c: - * /binary. If you do not do this then compilation of el files may - * produce garbage. As of b24 there are fixes in xemacs to make - * building on text mounts but I don't generally do this. Make sure - * you have installed cygwin32 b18 + patched dll (which can be found - * at http://www.lexa.ru/sos or on my home page - * http://www.parallax.co.uk/~andyp. Alternatively when b19 comes out - * the patched dll will be unnecessary. Also make sure your HOME path - * is unix style - i.e. without a drive letter. + * When building make sure your HOME path is unix style - i.e. without + * a drive letter. * - * Note that some people have reported problems with the patched - * cygwin.dll on Sergey's home page so you may want to use the one on - * mine which I *know* works. - * - * once you have done this, configure and make. If you want unexec - * support you need to download a.out.h from my web page or use cygwin - * b19. You probably want to build with mule support since this - * addresses crlf issues in a sensible way. + * once you have done this, configure and make. * * windows '95 - I haven't tested this under '95, it will probably * build but I konw there are some limitations with cygwin under 95 so * YMMV. I build with NT4 SP3. * - * What I want to do: - * - * the fileio stuff merely uses the unix system calls this means that - * the mount type of your fs will determine how files are edited. This - * is fine except in the instance that you want to convert one to the - * other. In this instance I would like to bring the buffer_file_type - * code into the picture without all the other windows-nt - * cruft. Apparently the best way to do this is use the mule coding - * stuff. - * - * process support needs fixing although basic support works (a la - * make-docfile) - * - * Andy Piper 8/1/98 - * http://www.parallax.co.uk/~andyp */ + * Andy Piper 8/1/98 + * http://www.xemacs.freeserve.co.uk/ */ + +/* Identify ourselves */ +#define CYGWIN /* cheesy way to determine cygwin version */ #ifndef NOT_C_CODE -#include -#ifdef HAVE_CYGWIN32_VERSION_H -#include -#else -#ifdef SIGIO -#define CYGWIN_B19 -#else -#define BROKEN_CYGWIN -#endif -#endif - -extern void cygwin32_win32_to_posix_path_list(const char*, char*); -extern int cygwin32_win32_to_posix_path_list_buf_size(const char*); -extern void cygwin32_posix_to_win32_path_list(const char*, char*); -extern int cygwin32_posix_to_win32_path_list_buf_size(const char*); -#ifndef CYGWIN_DLL_VERSION_MAJOR +# include +# ifdef HAVE_CYGWIN_VERSION_H +# include +# else +# ifdef SIGIO +# define CYGWIN_VERSION_DLL_MAJOR 19 +# define CYGWIN_VERSION_DLL_MINOR 0 +# define CYGWIN_B19 +# else +# define CYGWIN_VERSION_DLL_MAJOR 18 +# define CYGWIN_VERSION_DLL_MINOR 0 +# define BROKEN_CYGWIN +# endif +# endif + +void cygwin32_win32_to_posix_path_list (const char*, char*); +int cygwin32_win32_to_posix_path_list_buf_size (const char*); +void cygwin32_posix_to_win32_path_list (const char*, char*); +int cygwin32_posix_to_win32_path_list_buf_size (const char*); +# if CYGWIN_VERSION_DLL_MAJOR < 20 struct timeval; struct timezone; struct itimerval; struct stat; -extern int gettimeofday(struct timeval *tp, struct timezone *tzp); -extern int gethostname (char* name, int namelen); -extern char* mktemp(char *); -extern double logb(double); -extern void sync(); -extern int ioctl(int, int, ...); - /* sys/stat.h */ -extern int lstat(const char *path, struct stat *buf); - /* unistd.h */ -extern int readlink(const char *path, void *buf, unsigned int bufsiz); -extern int symlink(const char *name1, const char *name2); - /* sys/time.h */ -extern int setitimer(int which, const struct itimerval *value, - struct itimerval *ovalue); -extern int utimes(char *file, struct timeval *tvp); - -extern int srandom( unsigned seed); -extern long random(); - -#define SND_ASYNC 1 -#define SND_NODEFAULT 2 -#define SND_MEMORY 4 -#define SND_FILENAME 0x2000L -#define VK_APPS 0x5D -#define SIF_TRACKPOS 0x0010 -#endif -#endif +int gettimeofday (struct timeval *tp, struct timezone *tzp); +int gethostname (char* name, int namelen); +char* mktemp (char *); +double logb (double); +void sync (void); +int ioctl (int, int, ...); + /* sys/stat.h */ +int lstat (const char *path, struct stat *buf); + /* unistd.h */ +int readlink (const char *path, void *buf, unsigned int bufsiz); +int symlink (const char *name1, const char *name2); + /* sys/time.h */ +int setitimer (int which, const struct itimerval *value, + struct itimerval *ovalue); +int utimes (char *file, struct timeval *tvp); + +int srandom (unsigned seed); +long random (void); + +# endif /* CYGWIN_VERSION_DLL_MAJOR < 20 */ + +# if CYGWIN_VERSION_DLL_MAJOR <= 20 +char *getpass (const char *prompt); +double logb (double); +# endif /* CYGWIN_VERSION_DLL_MAJOR <= 20 */ -#ifdef HAVE_MS_WINDOWS -#define HAVE_NTGUI -#define HAVE_FACES #endif #ifndef ORDINARY_LINK @@ -129,57 +104,38 @@ extern long random(); #define C_SWITCH_SYSTEM -Wno-sign-compare -fno-caller-saves #define LIBS_SYSTEM -lwinmm - -#define ICC_BAR_CLASSES 4 -#define FW_BLACK FW_HEAVY -#define FW_ULTRABOLD FW_EXTRABOLD -#define FW_DEMIBOLD FW_SEMIBOLD -#define FW_ULTRALIGHT FW_EXTRALIGHT -#define APPCMD_FILTERINITS 0x20L -#define CBF_FAIL_SELFCONNECTIONS 0x1000 -#define CBF_SKIP_ALLNOTIFICATIONS 0x3C0000 -#define CBF_FAIL_ADVISES 0x4000 -#define CBF_FAIL_POKES 0x10000 -#define CBF_FAIL_REQUESTS 0x20000 -#define SZDDESYS_TOPIC "System" -#define JOHAB_CHARSET 130 -#define MAC_CHARSET 77 +#define WIN32_LEAN_AND_MEAN #define TEXT_START -1 #define TEXT_END -1 #define DATA_END -1 #define HEAP_IN_DATA +#define NO_LIM_DATA #define UNEXEC "unexcw.o" -/* #define BROKEN_SIGIO */ + +#ifdef CYGWIN_VERSION_DLL_MAJOR +#if 0 +/* #### FIXME: although defining BROKEN_SIGIO is correct for proper ^G + behavior, bugs in cygwin mean that xemacs locks up frequently if + this is defined. */ +#define BROKEN_SIGIO +#endif +#else #define PROCESS_IO_BLOCKING +#endif #define strnicmp strncasecmp #ifndef HAVE_SOCKETS #define HAVE_SOCKETS #endif #define OBJECTS_SYSTEM ntplay.o -#define HAVE_NATIVE_SOUND #undef MAIL_USE_SYSTEM_LOCK -#define MAIL_USE_POP /* Define NO_ARG_ARRAY if you cannot take the address of the first of a * group of arguments and treat it as an array of the arguments. */ #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 - /* Data type of load average, as read out of kmem. */ #define LOAD_AVE_TYPE long @@ -198,10 +154,6 @@ extern long random(); /* 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 @@ -265,7 +217,7 @@ cygwin32_posix_to_win32_path_list(src, dst) /* Pseudo-terminal support under SVR4 only loops to deal with errors. */ -#define PTY_ITERATION for (i = 0; i < 1; i++) +#define PTY_ITERATION for (i = 0, c = 0; i < 1; i++) /* This sets the name of the master side of the PTY. */