diff options
Diffstat (limited to 'lib-src')
| -rw-r--r-- | lib-src/ChangeLog | 67 | ||||
| -rw-r--r-- | lib-src/Makefile.in | 30 | ||||
| -rw-r--r-- | lib-src/ebrowse.c | 9 | ||||
| -rw-r--r-- | lib-src/emacsclient.c | 25 | ||||
| -rw-r--r-- | lib-src/etags.c | 2 | ||||
| -rw-r--r-- | lib-src/make-docfile.c | 62 | ||||
| -rw-r--r-- | lib-src/makefile.w32-in | 13 | ||||
| -rw-r--r-- | lib-src/movemail.c | 35 | ||||
| -rw-r--r-- | lib-src/ntlib.c | 19 | ||||
| -rw-r--r-- | lib-src/profile.c | 2 |
10 files changed, 147 insertions, 117 deletions
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 4f4d2b50a00..f3fd3751005 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog | |||
| @@ -1,3 +1,70 @@ | |||
| 1 | 2012-08-15 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | * etags.c (Pascal_functions): Fix parenthesization typo. | ||
| 4 | |||
| 5 | 2012-08-14 Paul Eggert <eggert@cs.ucla.edu> | ||
| 6 | |||
| 7 | * make-docfile.c (enum global_type): Sort values roughly in | ||
| 8 | decreasing alignment, except put functions last. | ||
| 9 | (compare_globals): Use this new property of enum global_type. | ||
| 10 | (write_globals): Use bool, not int, for booleans. | ||
| 11 | |||
| 12 | 2012-08-10 Glenn Morris <rgm@gnu.org> | ||
| 13 | |||
| 14 | * make-docfile.c (IF_LINT): | ||
| 15 | * emacsclient.c (IF_LINT): Remove (in config.h now). | ||
| 16 | |||
| 17 | * make-docfile.c (main): | ||
| 18 | (fopen) [!WINDOWSNT]: | ||
| 19 | (chdir) [!DOS_NT]: No more need to undef. | ||
| 20 | |||
| 21 | * movemail.c (DIRECTORY_SEP, IS_DIRECTORY_SEP): | ||
| 22 | * make-docfile.c (DIRECTORY_SEP, IS_DIRECTORY_SEP): | ||
| 23 | * emacsclient.c (DIRECTORY_SEP, IS_DIRECTORY_SEP, IS_DEVICE_SEP): | ||
| 24 | Remove (they are in config.h now). | ||
| 25 | |||
| 26 | * ebrowse.c (PATH_LIST_SEPARATOR): | ||
| 27 | Remove, and replace with SEPCHAR from config.h. | ||
| 28 | |||
| 29 | 2012-08-03 Juanma Barranquero <lekktu@gmail.com> | ||
| 30 | |||
| 31 | * makefile.w32-in (LOCAL_FLAGS): Remove WINDOWSNT and DOS_NT, | ||
| 32 | they are always defined in config.h. | ||
| 33 | |||
| 34 | 2012-08-03 Eli Zaretskii <eliz@gnu.org> | ||
| 35 | |||
| 36 | * ntlib.c (lstat): New function, calls 'stat'. | ||
| 37 | |||
| 38 | 2012-08-02 Paul Eggert <eggert@cs.ucla.edu> | ||
| 39 | |||
| 40 | Use C99-style 'extern inline' if available. | ||
| 41 | * profile.c (SYSTIME_INLINE): Define. | ||
| 42 | |||
| 43 | 2012-08-02 Glenn Morris <rgm@gnu.org> | ||
| 44 | |||
| 45 | * makefile.w32-in (MS_W32_H): Update for new ms-w32.h location. | ||
| 46 | |||
| 47 | 2012-08-01 Glenn Morris <rgm@gnu.org> | ||
| 48 | |||
| 49 | * Makefile.in (config_h): New variable. | ||
| 50 | Use throughout in place of ../src/config.h. | ||
| 51 | |||
| 52 | 2012-08-01 Juanma Barranquero <lekktu@gmail.com> | ||
| 53 | |||
| 54 | * makefile.w32-in (CONFIG_H): Update dependencies. | ||
| 55 | (CONF_POST_H): New macro. | ||
| 56 | |||
| 57 | 2012-07-30 Paul Eggert <eggert@cs.ucla.edu> | ||
| 58 | |||
| 59 | Update .PHONY listings in makefiles. | ||
| 60 | * Makefile.in (.PHONY): Add all, need-blessmail, maybe-blessmail, | ||
| 61 | install, uninstall, mostlyclean, clean, distclean, | ||
| 62 | maintainer-clean, extraclean, check, tags. | ||
| 63 | |||
| 64 | 2012-07-29 Eli Zaretskii <eliz@gnu.org> | ||
| 65 | |||
| 66 | * makefile.w32-in ($(BLD)/profile.$(O)): Depend on stamp_BLD. | ||
| 67 | |||
| 1 | 2012-07-12 Paul Eggert <eggert@cs.ucla.edu> | 68 | 2012-07-12 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 69 | ||
| 3 | * movemail.c: Add missing 'defined'. | 70 | * movemail.c: Add missing 'defined'. |
diff --git a/lib-src/Makefile.in b/lib-src/Makefile.in index fe727c65730..c5acca28856 100644 --- a/lib-src/Makefile.in +++ b/lib-src/Makefile.in | |||
| @@ -178,8 +178,13 @@ ALL_CFLAGS = ${BASE_CFLAGS} ${PROFILING_CFLAGS} ${LDFLAGS} ${CPPFLAGS} ${CFLAGS} | |||
| 178 | LINK_CFLAGS = ${BASE_CFLAGS} ${LDFLAGS} ${CFLAGS} | 178 | LINK_CFLAGS = ${BASE_CFLAGS} ${LDFLAGS} ${CFLAGS} |
| 179 | CPP_CFLAGS = ${BASE_CFLAGS} ${PROFILING_CFLAGS} ${CPPFLAGS} ${CFLAGS} | 179 | CPP_CFLAGS = ${BASE_CFLAGS} ${PROFILING_CFLAGS} ${CPPFLAGS} ${CFLAGS} |
| 180 | 180 | ||
| 181 | # Configuration files for .o files to depend on. | ||
| 182 | config_h = ../src/config.h $(srcdir)/../src/conf_post.h | ||
| 183 | |||
| 181 | all: ${EXE_FILES} ${SCRIPTS} ${INSTALLABLE_SCRIPTS} | 184 | all: ${EXE_FILES} ${SCRIPTS} ${INSTALLABLE_SCRIPTS} |
| 182 | 185 | ||
| 186 | .PHONY: all need-blessmail maybe-blessmail | ||
| 187 | |||
| 183 | LOADLIBES = ../lib/libgnu.a $(LIBS_SYSTEM) | 188 | LOADLIBES = ../lib/libgnu.a $(LIBS_SYSTEM) |
| 184 | $(EXE_FILES): ../lib/libgnu.a | 189 | $(EXE_FILES): ../lib/libgnu.a |
| 185 | 190 | ||
| @@ -231,6 +236,9 @@ $(DESTDIR)${archlibdir}: all | |||
| 231 | done ; \ | 236 | done ; \ |
| 232 | fi | 237 | fi |
| 233 | 238 | ||
| 239 | .PHONY: install uninstall mostlyclean clean distclean maintainer-clean | ||
| 240 | .PHONY: extraclean check tags | ||
| 241 | |||
| 234 | install: $(DESTDIR)${archlibdir} | 242 | install: $(DESTDIR)${archlibdir} |
| 235 | @echo | 243 | @echo |
| 236 | @echo "Installing utilities for users to run." | 244 | @echo "Installing utilities for users to run." |
| @@ -284,19 +292,19 @@ test-distrib${EXEEXT}: ${srcdir}/test-distrib.c | |||
| 284 | $(CC) ${ALL_CFLAGS} -o test-distrib ${srcdir}/test-distrib.c | 292 | $(CC) ${ALL_CFLAGS} -o test-distrib ${srcdir}/test-distrib.c |
| 285 | ./test-distrib ${srcdir}/testfile | 293 | ./test-distrib ${srcdir}/testfile |
| 286 | 294 | ||
| 287 | ../lib/libgnu.a: ../src/config.h | 295 | ../lib/libgnu.a: $(config_h) |
| 288 | cd ../lib && $(MAKE) libgnu.a | 296 | cd ../lib && $(MAKE) libgnu.a |
| 289 | 297 | ||
| 290 | regex.o: $(srcdir)/../src/regex.c $(srcdir)/../src/regex.h ../src/config.h | 298 | regex.o: $(srcdir)/../src/regex.c $(srcdir)/../src/regex.h $(config_h) |
| 291 | ${CC} -c ${CPP_CFLAGS} -DCONFIG_BROKETS -DINHIBIT_STRING_HEADER \ | 299 | ${CC} -c ${CPP_CFLAGS} -DCONFIG_BROKETS -DINHIBIT_STRING_HEADER \ |
| 292 | ${srcdir}/../src/regex.c | 300 | ${srcdir}/../src/regex.c |
| 293 | 301 | ||
| 294 | etags${EXEEXT}: ${srcdir}/etags.c regex.o ../src/config.h | 302 | etags${EXEEXT}: ${srcdir}/etags.c regex.o $(config_h) |
| 295 | $(CC) ${ALL_CFLAGS} -DEMACS_NAME="\"GNU Emacs\"" \ | 303 | $(CC) ${ALL_CFLAGS} -DEMACS_NAME="\"GNU Emacs\"" \ |
| 296 | -DVERSION="\"${version}\"" ${srcdir}/etags.c \ | 304 | -DVERSION="\"${version}\"" ${srcdir}/etags.c \ |
| 297 | regex.o $(LOADLIBES) -o etags | 305 | regex.o $(LOADLIBES) -o etags |
| 298 | 306 | ||
| 299 | ebrowse${EXEEXT}: ${srcdir}/ebrowse.c ${srcdir}/../lib/min-max.h ../src/config.h | 307 | ebrowse${EXEEXT}: ${srcdir}/ebrowse.c ${srcdir}/../lib/min-max.h $(config_h) |
| 300 | $(CC) ${ALL_CFLAGS} -DVERSION="\"${version}\"" \ | 308 | $(CC) ${ALL_CFLAGS} -DVERSION="\"${version}\"" \ |
| 301 | ${srcdir}/ebrowse.c $(LOADLIBES) -o ebrowse | 309 | ${srcdir}/ebrowse.c $(LOADLIBES) -o ebrowse |
| 302 | 310 | ||
| @@ -307,30 +315,30 @@ ctags${EXEEXT}: etags${EXEEXT} | |||
| 307 | -DVERSION="\"${version}\"" ${srcdir}/etags.c \ | 315 | -DVERSION="\"${version}\"" ${srcdir}/etags.c \ |
| 308 | regex.o $(LOADLIBES) -o ctags | 316 | regex.o $(LOADLIBES) -o ctags |
| 309 | 317 | ||
| 310 | profile${EXEEXT}: ${srcdir}/profile.c ../src/config.h | 318 | profile${EXEEXT}: ${srcdir}/profile.c $(config_h) |
| 311 | $(CC) ${ALL_CFLAGS} ${srcdir}/profile.c \ | 319 | $(CC) ${ALL_CFLAGS} ${srcdir}/profile.c \ |
| 312 | $(LOADLIBES) $(LIB_CLOCK_GETTIME) -o profile | 320 | $(LOADLIBES) $(LIB_CLOCK_GETTIME) -o profile |
| 313 | 321 | ||
| 314 | make-docfile${EXEEXT}: ${srcdir}/make-docfile.c ../src/config.h | 322 | make-docfile${EXEEXT}: ${srcdir}/make-docfile.c $(config_h) |
| 315 | $(CC) ${ALL_CFLAGS} ${srcdir}/make-docfile.c $(LOADLIBES) \ | 323 | $(CC) ${ALL_CFLAGS} ${srcdir}/make-docfile.c $(LOADLIBES) \ |
| 316 | -o make-docfile | 324 | -o make-docfile |
| 317 | 325 | ||
| 318 | movemail${EXEEXT}: ${srcdir}/movemail.c pop.o ../src/config.h | 326 | movemail${EXEEXT}: ${srcdir}/movemail.c pop.o $(config_h) |
| 319 | $(CC) ${ALL_CFLAGS} ${MOVE_FLAGS} ${srcdir}/movemail.c pop.o \ | 327 | $(CC) ${ALL_CFLAGS} ${MOVE_FLAGS} ${srcdir}/movemail.c pop.o \ |
| 320 | $(LOADLIBES) $(LIBS_MOVE) -o movemail | 328 | $(LOADLIBES) $(LIBS_MOVE) -o movemail |
| 321 | 329 | ||
| 322 | pop.o: ${srcdir}/pop.c ${srcdir}/../lib/min-max.h ../src/config.h | 330 | pop.o: ${srcdir}/pop.c ${srcdir}/../lib/min-max.h $(config_h) |
| 323 | $(CC) -c ${CPP_CFLAGS} ${MOVE_FLAGS} ${srcdir}/pop.c | 331 | $(CC) -c ${CPP_CFLAGS} ${MOVE_FLAGS} ${srcdir}/pop.c |
| 324 | 332 | ||
| 325 | emacsclient${EXEEXT}: ${srcdir}/emacsclient.c ../src/config.h | 333 | emacsclient${EXEEXT}: ${srcdir}/emacsclient.c $(config_h) |
| 326 | $(CC) ${ALL_CFLAGS} ${srcdir}/emacsclient.c \ | 334 | $(CC) ${ALL_CFLAGS} ${srcdir}/emacsclient.c \ |
| 327 | -DVERSION="\"${version}\"" \ | 335 | -DVERSION="\"${version}\"" \ |
| 328 | $(LOADLIBES) -o emacsclient | 336 | $(LOADLIBES) -o emacsclient |
| 329 | 337 | ||
| 330 | hexl${EXEEXT}: ${srcdir}/hexl.c ../src/config.h | 338 | hexl${EXEEXT}: ${srcdir}/hexl.c $(config_h) |
| 331 | $(CC) ${ALL_CFLAGS} ${srcdir}/hexl.c $(LOADLIBES) -o hexl | 339 | $(CC) ${ALL_CFLAGS} ${srcdir}/hexl.c $(LOADLIBES) -o hexl |
| 332 | 340 | ||
| 333 | update-game-score${EXEEXT}: ${srcdir}/update-game-score.c ../src/config.h | 341 | update-game-score${EXEEXT}: ${srcdir}/update-game-score.c $(config_h) |
| 334 | $(CC) ${ALL_CFLAGS} -DHAVE_SHARED_GAME_DIR="\"$(gamedir)\"" \ | 342 | $(CC) ${ALL_CFLAGS} -DHAVE_SHARED_GAME_DIR="\"$(gamedir)\"" \ |
| 335 | ${srcdir}/update-game-score.c $(LOADLIBES) -o update-game-score | 343 | ${srcdir}/update-game-score.c $(LOADLIBES) -o update-game-score |
| 336 | 344 | ||
diff --git a/lib-src/ebrowse.c b/lib-src/ebrowse.c index 1c43bc6a4f1..f8569fe3747 100644 --- a/lib-src/ebrowse.c +++ b/lib-src/ebrowse.c | |||
| @@ -43,17 +43,12 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 43 | 43 | ||
| 44 | #define READ_CHUNK_SIZE (100 * 1024) | 44 | #define READ_CHUNK_SIZE (100 * 1024) |
| 45 | 45 | ||
| 46 | /* The character used as a separator in path lists (like $PATH). */ | ||
| 47 | |||
| 48 | #if defined (__MSDOS__) | 46 | #if defined (__MSDOS__) |
| 49 | #define PATH_LIST_SEPARATOR ';' | ||
| 50 | #define FILENAME_EQ(X,Y) (strcasecmp (X,Y) == 0) | 47 | #define FILENAME_EQ(X,Y) (strcasecmp (X,Y) == 0) |
| 51 | #else | 48 | #else |
| 52 | #if defined (WINDOWSNT) | 49 | #if defined (WINDOWSNT) |
| 53 | #define PATH_LIST_SEPARATOR ';' | ||
| 54 | #define FILENAME_EQ(X,Y) (stricmp (X,Y) == 0) | 50 | #define FILENAME_EQ(X,Y) (stricmp (X,Y) == 0) |
| 55 | #else | 51 | #else |
| 56 | #define PATH_LIST_SEPARATOR ':' | ||
| 57 | #define FILENAME_EQ(X,Y) (streq (X,Y)) | 52 | #define FILENAME_EQ(X,Y) (streq (X,Y)) |
| 58 | #endif | 53 | #endif |
| 59 | #endif | 54 | #endif |
| @@ -3417,7 +3412,7 @@ add_search_path (char *path_list) | |||
| 3417 | char *start = path_list; | 3412 | char *start = path_list; |
| 3418 | struct search_path *p; | 3413 | struct search_path *p; |
| 3419 | 3414 | ||
| 3420 | while (*path_list && *path_list != PATH_LIST_SEPARATOR) | 3415 | while (*path_list && *path_list != SEPCHAR) |
| 3421 | ++path_list; | 3416 | ++path_list; |
| 3422 | 3417 | ||
| 3423 | p = (struct search_path *) xmalloc (sizeof *p); | 3418 | p = (struct search_path *) xmalloc (sizeof *p); |
| @@ -3434,7 +3429,7 @@ add_search_path (char *path_list) | |||
| 3434 | else | 3429 | else |
| 3435 | search_path = search_path_tail = p; | 3430 | search_path = search_path_tail = p; |
| 3436 | 3431 | ||
| 3437 | while (*path_list == PATH_LIST_SEPARATOR) | 3432 | while (*path_list == SEPCHAR) |
| 3438 | ++path_list; | 3433 | ++path_list; |
| 3439 | } | 3434 | } |
| 3440 | } | 3435 | } |
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c index 0ba6535b79d..20afe1cad11 100644 --- a/lib-src/emacsclient.c +++ b/lib-src/emacsclient.c | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | /* Client process that communicates with GNU Emacs acting as server. | 1 | /* Client process that communicates with GNU Emacs acting as server. |
| 2 | Copyright (C) 1986-1987, 1994, 1999-2012 Free Software Foundation, Inc. | 2 | |
| 3 | Copyright (C) 1986-1987, 1994, 1999-2012 Free Software Foundation, Inc. | ||
| 3 | 4 | ||
| 4 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 5 | 6 | ||
| @@ -112,13 +113,6 @@ char *(getcwd) (char *, size_t); | |||
| 112 | /* Additional space when allocating buffers for filenames, etc. */ | 113 | /* Additional space when allocating buffers for filenames, etc. */ |
| 113 | #define EXTRA_SPACE 100 | 114 | #define EXTRA_SPACE 100 |
| 114 | 115 | ||
| 115 | /* Use this to suppress gcc's `...may be used before initialized' warnings. */ | ||
| 116 | #ifdef lint | ||
| 117 | # define IF_LINT(Code) Code | ||
| 118 | #else | ||
| 119 | # define IF_LINT(Code) /* empty */ | ||
| 120 | #endif | ||
| 121 | |||
| 122 | #ifdef min | 116 | #ifdef min |
| 123 | #undef min | 117 | #undef min |
| 124 | #endif | 118 | #endif |
| @@ -213,21 +207,6 @@ xmalloc (size_t size) | |||
| 213 | /* From sysdep.c */ | 207 | /* From sysdep.c */ |
| 214 | #if !defined (HAVE_GET_CURRENT_DIR_NAME) || defined (BROKEN_GET_CURRENT_DIR_NAME) | 208 | #if !defined (HAVE_GET_CURRENT_DIR_NAME) || defined (BROKEN_GET_CURRENT_DIR_NAME) |
| 215 | 209 | ||
| 216 | /* From lisp.h */ | ||
| 217 | #ifndef DIRECTORY_SEP | ||
| 218 | #define DIRECTORY_SEP '/' | ||
| 219 | #endif | ||
| 220 | #ifndef IS_DIRECTORY_SEP | ||
| 221 | #define IS_DIRECTORY_SEP(_c_) ((_c_) == DIRECTORY_SEP) | ||
| 222 | #endif | ||
| 223 | #ifndef IS_DEVICE_SEP | ||
| 224 | #ifndef DEVICE_SEP | ||
| 225 | #define IS_DEVICE_SEP(_c_) 0 | ||
| 226 | #else | ||
| 227 | #define IS_DEVICE_SEP(_c_) ((_c_) == DEVICE_SEP) | ||
| 228 | #endif | ||
| 229 | #endif | ||
| 230 | |||
| 231 | char *get_current_dir_name (void); | 210 | char *get_current_dir_name (void); |
| 232 | 211 | ||
| 233 | /* Return the current working directory. Returns NULL on errors. | 212 | /* Return the current working directory. Returns NULL on errors. |
diff --git a/lib-src/etags.c b/lib-src/etags.c index 69200b790fb..9c03735c954 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c | |||
| @@ -4651,7 +4651,7 @@ Pascal_functions (FILE *inf) | |||
| 4651 | /* Check if this is an "extern" declaration. */ | 4651 | /* Check if this is an "extern" declaration. */ |
| 4652 | if (*dbp == '\0') | 4652 | if (*dbp == '\0') |
| 4653 | continue; | 4653 | continue; |
| 4654 | if (lowcase (*dbp == 'e')) | 4654 | if (lowcase (*dbp) == 'e') |
| 4655 | { | 4655 | { |
| 4656 | if (nocase_tail ("extern")) /* superfluous, really! */ | 4656 | if (nocase_tail ("extern")) /* superfluous, really! */ |
| 4657 | { | 4657 | { |
diff --git a/lib-src/make-docfile.c b/lib-src/make-docfile.c index bd87b5b6524..2654387fb37 100644 --- a/lib-src/make-docfile.c +++ b/lib-src/make-docfile.c | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | /* Generate doc-string file for GNU Emacs from source files. | 1 | /* Generate doc-string file for GNU Emacs from source files. |
| 2 | Copyright (C) 1985-1986, 1992-1994, 1997, 1999-2012 | 2 | |
| 3 | Free Software Foundation, Inc. | 3 | Copyright (C) 1985-1986, 1992-1994, 1997, 1999-2012 |
| 4 | Free Software Foundation, Inc. | ||
| 4 | 5 | ||
| 5 | This file is part of GNU Emacs. | 6 | This file is part of GNU Emacs. |
| 6 | 7 | ||
| @@ -35,22 +36,26 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 35 | 36 | ||
| 36 | #include <config.h> | 37 | #include <config.h> |
| 37 | 38 | ||
| 38 | /* Defined to be emacs_main, sys_fopen, etc. in config.h. */ | ||
| 39 | #undef main | ||
| 40 | #undef fopen | ||
| 41 | #undef chdir | ||
| 42 | |||
| 43 | #include <stdio.h> | 39 | #include <stdio.h> |
| 44 | #include <stdlib.h> | 40 | #include <stdlib.h> /* config.h unconditionally includes this anyway */ |
| 45 | #ifdef MSDOS | 41 | #ifdef MSDOS |
| 46 | #include <fcntl.h> | 42 | #include <fcntl.h> |
| 47 | #endif /* MSDOS */ | 43 | #endif /* MSDOS */ |
| 48 | #ifdef WINDOWSNT | 44 | #ifdef WINDOWSNT |
| 45 | /* Defined to be sys_fopen in ms-w32.h, but only #ifdef emacs, so this | ||
| 46 | is really just insurance. */ | ||
| 47 | #undef fopen | ||
| 49 | #include <fcntl.h> | 48 | #include <fcntl.h> |
| 50 | #include <direct.h> | 49 | #include <direct.h> |
| 51 | #endif /* WINDOWSNT */ | 50 | #endif /* WINDOWSNT */ |
| 52 | 51 | ||
| 53 | #ifdef DOS_NT | 52 | #ifdef DOS_NT |
| 53 | /* Defined to be sys_chdir in ms-w32.h, but only #ifdef emacs, so this | ||
| 54 | is really just insurance. | ||
| 55 | |||
| 56 | Similarly, msdos defines this as sys_chdir, but we're not linking with the | ||
| 57 | file where that function is defined. */ | ||
| 58 | #undef chdir | ||
| 54 | #define READ_TEXT "rt" | 59 | #define READ_TEXT "rt" |
| 55 | #define READ_BINARY "rb" | 60 | #define READ_BINARY "rb" |
| 56 | #else /* not DOS_NT */ | 61 | #else /* not DOS_NT */ |
| @@ -58,33 +63,12 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 58 | #define READ_BINARY "r" | 63 | #define READ_BINARY "r" |
| 59 | #endif /* not DOS_NT */ | 64 | #endif /* not DOS_NT */ |
| 60 | 65 | ||
| 61 | #ifndef DIRECTORY_SEP | ||
| 62 | #define DIRECTORY_SEP '/' | ||
| 63 | #endif | ||
| 64 | |||
| 65 | #ifndef IS_DIRECTORY_SEP | ||
| 66 | #define IS_DIRECTORY_SEP(_c_) ((_c_) == DIRECTORY_SEP) | ||
| 67 | #endif | ||
| 68 | |||
| 69 | /* Use this to suppress gcc's `...may be used before initialized' warnings. */ | ||
| 70 | #ifdef lint | ||
| 71 | # define IF_LINT(Code) Code | ||
| 72 | #else | ||
| 73 | # define IF_LINT(Code) /* empty */ | ||
| 74 | #endif | ||
| 75 | |||
| 76 | static int scan_file (char *filename); | 66 | static int scan_file (char *filename); |
| 77 | static int scan_lisp_file (const char *filename, const char *mode); | 67 | static int scan_lisp_file (const char *filename, const char *mode); |
| 78 | static int scan_c_file (char *filename, const char *mode); | 68 | static int scan_c_file (char *filename, const char *mode); |
| 79 | static void start_globals (void); | 69 | static void start_globals (void); |
| 80 | static void write_globals (void); | 70 | static void write_globals (void); |
| 81 | 71 | ||
| 82 | #ifdef MSDOS | ||
| 83 | /* s/msdos.h defines this as sys_chdir, but we're not linking with the | ||
| 84 | file where that function is defined. */ | ||
| 85 | #undef chdir | ||
| 86 | #endif | ||
| 87 | |||
| 88 | #include <unistd.h> | 72 | #include <unistd.h> |
| 89 | 73 | ||
| 90 | /* Stdio stream for output to the DOC file. */ | 74 | /* Stdio stream for output to the DOC file. */ |
| @@ -561,14 +545,15 @@ write_c_args (FILE *out, char *func, char *buf, int minargs, int maxargs) | |||
| 561 | putc (')', out); | 545 | putc (')', out); |
| 562 | } | 546 | } |
| 563 | 547 | ||
| 564 | /* The types of globals. */ | 548 | /* The types of globals. These are sorted roughly in decreasing alignment |
| 549 | order to avoid allocation gaps, except that functions are last. */ | ||
| 565 | enum global_type | 550 | enum global_type |
| 566 | { | 551 | { |
| 567 | FUNCTION, | 552 | INVALID, |
| 553 | LISP_OBJECT, | ||
| 568 | EMACS_INTEGER, | 554 | EMACS_INTEGER, |
| 569 | BOOLEAN, | 555 | BOOLEAN, |
| 570 | LISP_OBJECT, | 556 | FUNCTION, |
| 571 | INVALID | ||
| 572 | }; | 557 | }; |
| 573 | 558 | ||
| 574 | /* A single global. */ | 559 | /* A single global. */ |
| @@ -617,13 +602,8 @@ compare_globals (const void *a, const void *b) | |||
| 617 | const struct global *ga = a; | 602 | const struct global *ga = a; |
| 618 | const struct global *gb = b; | 603 | const struct global *gb = b; |
| 619 | 604 | ||
| 620 | if (ga->type == FUNCTION) | 605 | if (ga->type != gb->type) |
| 621 | { | 606 | return ga->type - gb->type; |
| 622 | if (gb->type != FUNCTION) | ||
| 623 | return 1; | ||
| 624 | } | ||
| 625 | else if (gb->type == FUNCTION) | ||
| 626 | return -1; | ||
| 627 | 607 | ||
| 628 | return strcmp (ga->name, gb->name); | 608 | return strcmp (ga->name, gb->name); |
| 629 | } | 609 | } |
| @@ -650,7 +630,7 @@ write_globals (void) | |||
| 650 | type = "EMACS_INT"; | 630 | type = "EMACS_INT"; |
| 651 | break; | 631 | break; |
| 652 | case BOOLEAN: | 632 | case BOOLEAN: |
| 653 | type = "int"; | 633 | type = "bool"; |
| 654 | break; | 634 | break; |
| 655 | case LISP_OBJECT: | 635 | case LISP_OBJECT: |
| 656 | type = "Lisp_Object"; | 636 | type = "Lisp_Object"; |
diff --git a/lib-src/makefile.w32-in b/lib-src/makefile.w32-in index 4b2b523ea34..a03d761e7ec 100644 --- a/lib-src/makefile.w32-in +++ b/lib-src/makefile.w32-in | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # -*- Makefile -*- for GNU Emacs on the Microsoft W32 API. | 1 | # -*- Makefile -*- for GNU Emacs on the Microsoft Windows API. |
| 2 | # Copyright (C) 2000-2012 Free Software Foundation, Inc. | 2 | # Copyright (C) 2000-2012 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | # This file is part of GNU Emacs. | 4 | # This file is part of GNU Emacs. |
| @@ -23,8 +23,7 @@ ALL = $(BLD)/test-distrib.exe $(BLD)/make-docfile.exe $(BLD)/hexl.exe\ | |||
| 23 | 23 | ||
| 24 | .PHONY: make-docfile | 24 | .PHONY: make-docfile |
| 25 | 25 | ||
| 26 | LOCAL_FLAGS = -DWINDOWSNT -DDOS_NT -DNO_LDAV=1 \ | 26 | LOCAL_FLAGS = -DNO_LDAV=1 -DNO_ARCHIVES=1 -I../lib \ |
| 27 | -DNO_ARCHIVES=1 -I../lib \ | ||
| 28 | -I../nt/inc -I../src $(EMACS_EXTRA_C_FLAGS) | 27 | -I../nt/inc -I../src $(EMACS_EXTRA_C_FLAGS) |
| 29 | 28 | ||
| 30 | LIBS = $(BASE_LIBS) $(ADVAPI32) | 29 | LIBS = $(BASE_LIBS) $(ADVAPI32) |
| @@ -360,10 +359,12 @@ SRC = $(EMACS_ROOT)/src | |||
| 360 | NT_INC = $(EMACS_ROOT)/nt/inc | 359 | NT_INC = $(EMACS_ROOT)/nt/inc |
| 361 | GNU_LIB = $(EMACS_ROOT)/lib | 360 | GNU_LIB = $(EMACS_ROOT)/lib |
| 362 | 361 | ||
| 363 | MS_W32_H = $(SRC)/s/ms-w32.h \ | 362 | MS_W32_H = $(NT_INC)/ms-w32.h \ |
| 364 | $(NT_INC)/sys/stat.h | 363 | $(NT_INC)/sys/stat.h |
| 365 | CONFIG_H = $(SRC)/config.h \ | 364 | CONF_POST_H = $(SRC)/conf_post.h \ |
| 366 | $(MS_W32_H) | 365 | $(MS_W32_H) |
| 366 | CONFIG_H = $(SRC)/config.h \ | ||
| 367 | $(CONF_POST_H) | ||
| 367 | INTTYPES_H = $(NT_INC)/inttypes.h \ | 368 | INTTYPES_H = $(NT_INC)/inttypes.h \ |
| 368 | $(NT_INC)/stdint.h | 369 | $(NT_INC)/stdint.h |
| 369 | NTLIB_H = $(LIB_SRC)/ntlib.h \ | 370 | NTLIB_H = $(LIB_SRC)/ntlib.h \ |
| @@ -467,4 +468,4 @@ $(BLD)/test-distrib.$(O) $(MOVEMAILOBJS): stamp_BLD | |||
| 467 | 468 | ||
| 468 | $(BLD)/emacsclient.$(O) $(BLD)/etags.$(O) $(BLD)/regex.$(O): stamp_BLD | 469 | $(BLD)/emacsclient.$(O) $(BLD)/etags.$(O) $(BLD)/regex.$(O): stamp_BLD |
| 469 | 470 | ||
| 470 | $(BLD)/ebrowse.$(O) $(BLD)/ctags.$(O): stamp_BLD | 471 | $(BLD)/ebrowse.$(O) $(BLD)/ctags.$(O) $(BLD)/profile.$(O): stamp_BLD |
diff --git a/lib-src/movemail.c b/lib-src/movemail.c index d157aa8c0b9..32d32e69abf 100644 --- a/lib-src/movemail.c +++ b/lib-src/movemail.c | |||
| @@ -22,7 +22,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 22 | 22 | ||
| 23 | /* Important notice: defining MAIL_USE_FLOCK or MAIL_USE_LOCKF *will | 23 | /* Important notice: defining MAIL_USE_FLOCK or MAIL_USE_LOCKF *will |
| 24 | cause loss of mail* if you do it on a system that does not normally | 24 | cause loss of mail* if you do it on a system that does not normally |
| 25 | use flock as its way of interlocking access to inbox files. The | 25 | use flock/lockf as its way of interlocking access to inbox files. The |
| 26 | setting of MAIL_USE_FLOCK and MAIL_USE_LOCKF *must agree* with the | 26 | setting of MAIL_USE_FLOCK and MAIL_USE_LOCKF *must agree* with the |
| 27 | system's own conventions. It is not a choice that is up to you. | 27 | system's own conventions. It is not a choice that is up to you. |
| 28 | 28 | ||
| @@ -109,6 +109,11 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 109 | #include <sys/locking.h> | 109 | #include <sys/locking.h> |
| 110 | #endif | 110 | #endif |
| 111 | 111 | ||
| 112 | /* If your system uses the `flock' or `lockf' system call for mail locking, | ||
| 113 | define MAIL_USE_SYSTEM_LOCK. If your system type should always define | ||
| 114 | MAIL_USE_LOCKF or MAIL_USE_FLOCK but configure does not do this, | ||
| 115 | please make a bug report. */ | ||
| 116 | |||
| 112 | #ifdef MAIL_USE_LOCKF | 117 | #ifdef MAIL_USE_LOCKF |
| 113 | #define MAIL_USE_SYSTEM_LOCK | 118 | #define MAIL_USE_SYSTEM_LOCK |
| 114 | #endif | 119 | #endif |
| @@ -275,13 +280,6 @@ main (int argc, char **argv) | |||
| 275 | else | 280 | else |
| 276 | #endif | 281 | #endif |
| 277 | { | 282 | { |
| 278 | #ifndef DIRECTORY_SEP | ||
| 279 | #define DIRECTORY_SEP '/' | ||
| 280 | #endif | ||
| 281 | #ifndef IS_DIRECTORY_SEP | ||
| 282 | #define IS_DIRECTORY_SEP(_c_) ((_c_) == DIRECTORY_SEP) | ||
| 283 | #endif | ||
| 284 | |||
| 285 | /* Use a lock file named after our first argument with .lock appended: | 283 | /* Use a lock file named after our first argument with .lock appended: |
| 286 | If it exists, the mail file is locked. */ | 284 | If it exists, the mail file is locked. */ |
| 287 | /* Note: this locking mechanism is *required* by the mailer | 285 | /* Note: this locking mechanism is *required* by the mailer |
| @@ -290,20 +288,13 @@ main (int argc, char **argv) | |||
| 290 | On systems that use a lock file, extracting the mail without locking | 288 | On systems that use a lock file, extracting the mail without locking |
| 291 | WILL occasionally cause loss of mail due to timing errors! | 289 | WILL occasionally cause loss of mail due to timing errors! |
| 292 | 290 | ||
| 293 | So, if creation of the lock file fails | 291 | So, if creation of the lock file fails due to access |
| 294 | due to access permission on the mail spool directory, | 292 | permission on the mail spool directory, you simply MUST |
| 295 | you simply MUST change the permission | 293 | change the permission and/or make movemail a setgid program |
| 296 | and/or make movemail a setgid program | ||
| 297 | so it can create lock files properly. | 294 | so it can create lock files properly. |
| 298 | 295 | ||
| 299 | You might also wish to verify that your system is one | 296 | You might also wish to verify that your system is one which |
| 300 | which uses lock files for this purpose. Some systems use other methods. | 297 | uses lock files for this purpose. Some systems use other methods. */ |
| 301 | |||
| 302 | If your system uses the `flock' system call for mail locking, | ||
| 303 | define MAIL_USE_SYSTEM_LOCK in config.h or the s-*.h file | ||
| 304 | and recompile movemail. If the s- file for your system | ||
| 305 | should define MAIL_USE_SYSTEM_LOCK but does not, send a bug report | ||
| 306 | to bug-gnu-emacs@prep.ai.mit.edu so we can fix it. */ | ||
| 307 | 298 | ||
| 308 | inname_len = strlen (inname); | 299 | inname_len = strlen (inname); |
| 309 | lockname = xmalloc (inname_len + sizeof ".lock"); | 300 | lockname = xmalloc (inname_len + sizeof ".lock"); |
| @@ -560,8 +551,8 @@ main (int argc, char **argv) | |||
| 560 | wait (&wait_status); | 551 | wait (&wait_status); |
| 561 | if (!WIFEXITED (wait_status)) | 552 | if (!WIFEXITED (wait_status)) |
| 562 | exit (EXIT_FAILURE); | 553 | exit (EXIT_FAILURE); |
| 563 | else if (WRETCODE (wait_status) != 0) | 554 | else if (WEXITSTATUS (wait_status) != 0) |
| 564 | exit (WRETCODE (wait_status)); | 555 | exit (WEXITSTATUS (wait_status)); |
| 565 | 556 | ||
| 566 | #if !defined (MAIL_USE_MMDF) && !defined (MAIL_USE_SYSTEM_LOCK) | 557 | #if !defined (MAIL_USE_MMDF) && !defined (MAIL_USE_SYSTEM_LOCK) |
| 567 | #ifdef MAIL_USE_MAILLOCK | 558 | #ifdef MAIL_USE_MAILLOCK |
diff --git a/lib-src/ntlib.c b/lib-src/ntlib.c index d3b001c157c..2cc791fb56a 100644 --- a/lib-src/ntlib.c +++ b/lib-src/ntlib.c | |||
| @@ -1,5 +1,9 @@ | |||
| 1 | /* Utility and Unix shadow routines for GNU Emacs support programs on NT. | 1 | /* Utility and Unix shadow routines for GNU Emacs support programs on NT. |
| 2 | Copyright (C) 1994, 2001-2012 Free Software Foundation, Inc. | 2 | |
| 3 | Copyright (C) 1994, 2001-2012 Free Software Foundation, Inc. | ||
| 4 | |||
| 5 | Author: Geoff Voelker (voelker@cs.washington.edu) | ||
| 6 | Created: 10-8-94 | ||
| 3 | 7 | ||
| 4 | This file is part of GNU Emacs. | 8 | This file is part of GNU Emacs. |
| 5 | 9 | ||
| @@ -14,11 +18,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
| 14 | GNU General Public License for more details. | 18 | GNU General Public License for more details. |
| 15 | 19 | ||
| 16 | You should have received a copy of the GNU General Public License | 20 | You should have received a copy of the GNU General Public License |
| 17 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. | 21 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ |
| 18 | |||
| 19 | |||
| 20 | Geoff Voelker (voelker@cs.washington.edu) 10-8-94 | ||
| 21 | */ | ||
| 22 | 22 | ||
| 23 | #include <windows.h> | 23 | #include <windows.h> |
| 24 | #include <stdlib.h> | 24 | #include <stdlib.h> |
| @@ -260,6 +260,7 @@ is_exec (const char * name) | |||
| 260 | stricmp (p, ".cmd") == 0)); | 260 | stricmp (p, ".cmd") == 0)); |
| 261 | } | 261 | } |
| 262 | 262 | ||
| 263 | /* FIXME? This is in config.nt now - is this still needed? */ | ||
| 263 | #define IS_DIRECTORY_SEP(x) ((x) == '/' || (x) == '\\') | 264 | #define IS_DIRECTORY_SEP(x) ((x) == '/' || (x) == '\\') |
| 264 | 265 | ||
| 265 | /* We need this because nt/inc/sys/stat.h defines struct stat that is | 266 | /* We need this because nt/inc/sys/stat.h defines struct stat that is |
| @@ -374,3 +375,9 @@ stat (const char * path, struct stat * buf) | |||
| 374 | return 0; | 375 | return 0; |
| 375 | } | 376 | } |
| 376 | 377 | ||
| 378 | int | ||
| 379 | lstat (const char * path, struct stat * buf) | ||
| 380 | { | ||
| 381 | return stat (path, buf); | ||
| 382 | } | ||
| 383 | |||
diff --git a/lib-src/profile.c b/lib-src/profile.c index d21f2c28e58..3489e492543 100644 --- a/lib-src/profile.c +++ b/lib-src/profile.c | |||
| @@ -30,6 +30,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 30 | */ | 30 | */ |
| 31 | #include <config.h> | 31 | #include <config.h> |
| 32 | 32 | ||
| 33 | #define SYSTIME_INLINE EXTERN_INLINE | ||
| 34 | |||
| 33 | #include <inttypes.h> | 35 | #include <inttypes.h> |
| 34 | #include <stdio.h> | 36 | #include <stdio.h> |
| 35 | 37 | ||