Mercurial > hg > xemacs-beta
comparison src/sysfile.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 | 0784d089fdc9 |
children | 6cca1c9bdc85 |
comparison
equal
deleted
inserted
replaced
557:f486da5f1a3b | 558:ed498ef2108b |
---|---|
1 /* | 1 /* |
2 Copyright (C) 1995 Free Software Foundation, Inc. | 2 Copyright (C) 1995 Free Software Foundation, Inc. |
3 Copyright (C) 2001 Ben Wing. | |
3 | 4 |
4 This file is part of XEmacs. | 5 This file is part of XEmacs. |
5 | 6 |
6 XEmacs is free software; you can redistribute it and/or modify it | 7 XEmacs is free software; you can redistribute it and/or modify it |
7 under the terms of the GNU General Public License as published by the | 8 under the terms of the GNU General Public License as published by the |
24 #define INCLUDED_sysfile_h_ | 25 #define INCLUDED_sysfile_h_ |
25 | 26 |
26 #include <errno.h> | 27 #include <errno.h> |
27 | 28 |
28 #ifndef WIN32_NATIVE | 29 #ifndef WIN32_NATIVE |
29 #include <sys/errno.h> /* <errno.h> does not always imply this */ | 30 # include <sys/errno.h> /* <errno.h> does not always imply this */ |
30 #endif | 31 #endif |
31 | 32 |
32 #ifdef HAVE_UNISTD_H | 33 #ifdef HAVE_UNISTD_H |
33 #include <unistd.h> | 34 # include <unistd.h> |
34 #endif | 35 #endif |
35 | 36 |
36 #ifndef INCLUDED_FCNTL | 37 #ifndef INCLUDED_FCNTL |
37 # define INCLUDED_FCNTL | 38 # define INCLUDED_FCNTL |
38 # include <fcntl.h> | 39 # include <fcntl.h> |
39 #endif /* INCLUDED_FCNTL */ | 40 #endif /* INCLUDED_FCNTL */ |
40 | 41 |
41 /* Load sys/types.h if not already loaded. | 42 /* The anonymous voice of the past says: |
42 In some systems loading it twice is suicidal. */ | 43 In some systems loading it twice is suicidal. */ |
43 #ifndef makedev | 44 #ifndef INCLUDED_SYS_TYPES |
44 #include <sys/types.h> /* some typedefs are used in sys/file.h */ | 45 # define INCLUDED_SYS_TYPES |
45 #endif | 46 # include <sys/types.h> /* some typedefs are used in sys/file.h */ |
47 #endif /* INCLUDED_SYS_TYPES */ | |
46 | 48 |
47 #ifndef WIN32_NATIVE | 49 #ifndef WIN32_NATIVE |
48 #include <sys/file.h> | 50 # include <sys/file.h> |
49 #endif | 51 #endif |
50 | 52 |
51 #include <sys/stat.h> | 53 #include <sys/stat.h> |
52 | 54 |
53 #ifndef WIN32_NATIVE | 55 #if defined (WIN32_NATIVE) || defined (CYGWIN) |
56 # include <io.h> | |
57 #endif | |
58 | |
59 #ifdef WIN32_NATIVE | |
60 # include <direct.h> | |
61 #else | |
54 /* Some configuration files' definitions for the LOAD_AVE_CVT macro | 62 /* Some configuration files' definitions for the LOAD_AVE_CVT macro |
55 (like sparc.h's) use macros like FSCALE, defined here. */ | 63 (like sparc.h's) use macros like FSCALE, defined here. */ |
56 #ifdef HAVE_GTK | 64 # ifdef HAVE_GTK |
57 /* I hate GTK */ | 65 /* I hate GTK */ |
58 #undef MIN | 66 # undef MIN |
59 #undef MAX | 67 # undef MAX |
60 #endif /* HAVE_GTK */ | 68 # endif /* HAVE_GTK */ |
61 #include <sys/param.h> | 69 # include <sys/param.h> |
62 #endif | 70 /* We used to conditionalize this on defined (NeXT) || defined (CYGWIN), |
63 | 71 with the comment "what is needed from here? Do others need it too? |
64 #if defined (NeXT) || defined(CYGWIN) | 72 O_BINARY is in here under cygwin." sunplay.c needed this, so let's |
65 /* what is needed from here? Do others need it too? | 73 just include it always and fix any breakage (unlikely) that happens. */ |
66 O_BINARY is in here under cygwin. */ | |
67 # include <sys/fcntl.h> | 74 # include <sys/fcntl.h> |
68 #endif /* NeXT */ | |
69 | |
70 #ifdef WIN32_NATIVE | |
71 #include <io.h> | |
72 #include <direct.h> | |
73 #endif | 75 #endif |
74 | 76 |
75 #ifndef STDERR_FILENO | 77 #ifndef STDERR_FILENO |
76 #define STDIN_FILENO 0 | 78 #define STDIN_FILENO 0 |
77 #define STDOUT_FILENO 1 | 79 #define STDOUT_FILENO 1 |
244 #define S_ISNWK(m) (((m) & S_IFMT) == S_IFNWK) | 246 #define S_ISNWK(m) (((m) & S_IFMT) == S_IFNWK) |
245 #endif | 247 #endif |
246 | 248 |
247 /* Client .c files should simply use `PATH_MAX'. */ | 249 /* Client .c files should simply use `PATH_MAX'. */ |
248 #ifndef PATH_MAX | 250 #ifndef PATH_MAX |
249 # if defined (_POSIX_PATH_MAX) | 251 # if defined (_MAX_PATH) |
252 /* MS Win -- and preferable to _POSIX_PATH_MAX, which is also defined */ | |
253 # define PATH_MAX _MAX_PATH | |
254 # elif defined (_POSIX_PATH_MAX) | |
250 # define PATH_MAX _POSIX_PATH_MAX | 255 # define PATH_MAX _POSIX_PATH_MAX |
251 # elif defined (MAXPATHLEN) | 256 # elif defined (MAXPATHLEN) |
252 # define PATH_MAX MAXPATHLEN | 257 # define PATH_MAX MAXPATHLEN |
253 # else | 258 # else |
254 # define PATH_MAX 1024 | 259 # define PATH_MAX 1024 |