diff options
| author | Tom Tromey | 2013-06-03 12:25:05 -0600 |
|---|---|---|
| committer | Tom Tromey | 2013-06-03 12:25:05 -0600 |
| commit | 68359abba96d7ec4db8aab3d3dd9cf1105c3bab5 (patch) | |
| tree | 862703e7e1a1888170136a8296a5750d6b2ae2eb /lib-src | |
| parent | cbcba8ce7f980b01c18c0fd561ef6687b1361507 (diff) | |
| parent | e2d8a6f0a229b4ebe26484b892ec4f14888f58b6 (diff) | |
| download | emacs-68359abba96d7ec4db8aab3d3dd9cf1105c3bab5.tar.gz emacs-68359abba96d7ec4db8aab3d3dd9cf1105c3bab5.zip | |
merge from trunk; clean up some issues
Diffstat (limited to 'lib-src')
| -rw-r--r-- | lib-src/ChangeLog | 60 | ||||
| -rw-r--r-- | lib-src/Makefile.in | 85 | ||||
| -rw-r--r-- | lib-src/etags.c | 13 | ||||
| -rw-r--r-- | lib-src/make-docfile.c | 3 | ||||
| -rw-r--r-- | lib-src/makefile.w32-in | 6 | ||||
| -rw-r--r-- | lib-src/ntlib.c | 16 | ||||
| -rw-r--r-- | lib-src/ntlib.h | 4 | ||||
| -rw-r--r-- | lib-src/pop.c | 36 | ||||
| -rw-r--r-- | lib-src/update-game-score.c | 4 |
9 files changed, 155 insertions, 72 deletions
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 0d7a0a4591e..e1025fc5f6b 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog | |||
| @@ -1,13 +1,63 @@ | |||
| 1 | 2013-05-29 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * Makefile.in (mostlyclean): Remove *.res files. | ||
| 4 | |||
| 5 | 2013-05-18 Paul Eggert <eggert@cs.ucla.edu> | ||
| 6 | |||
| 7 | Port --enable-gcc-warnings to clang. | ||
| 8 | * etags.c: Omit unnecessary forward decls. | ||
| 9 | (print_version, print_help): Declare _Noreturn. | ||
| 10 | * pop.c (socket_connection) [HAVE_GETADDRINFO]: Simplify. | ||
| 11 | |||
| 12 | 2013-05-16 Eli Zaretskii <eliz@gnu.org> | ||
| 13 | |||
| 14 | * update-game-score.c [WINDOWSNT]: Include "ntlib.h". | ||
| 15 | |||
| 16 | * ntlib.h (sleep): Update prototype. | ||
| 17 | (geteuid): Add prototype. | ||
| 18 | |||
| 19 | * ntlib.c (sleep): Now returns an unsigned value. | ||
| 20 | (getgid): New function. | ||
| 21 | |||
| 22 | * Makefile.in (CLIENTW, LIB_WSOCK32, LIBS_ECLIENT, NTLIB) | ||
| 23 | (CLIENTRES, WINDRES, NTINC, NTDEPS): New variables. | ||
| 24 | (INSTALLABLES): Add $(CLIENTW). | ||
| 25 | (LIBS_MOVE): Use $(LIB_WSOCK32). | ||
| 26 | ($(DESTDIR)${archlibdir}): Use $(EXEEXT) on update-game-score. | ||
| 27 | (test-distrib${EXEEXT}): Use $(EXEEXT) on test-distrib. | ||
| 28 | (etags${EXEEXT}, ebrowse${EXEEXT}, ctags${EXEEXT}) | ||
| 29 | (profile${EXEEXT}, make-docfile${EXEEXT}, movemail${EXEEXT}) | ||
| 30 | (emacsclient${EXEEXT}, hexl${EXEEXT}, update-game-score${EXEEXT}): | ||
| 31 | Add $(NTLIB) to prerequisites. Use $(EXEEXT). | ||
| 32 | (pop.o): Add pop.h to prerequisites. | ||
| 33 | (emacsclientw${EXEEXT}, ntlib.o): New targets. | ||
| 34 | (emacsclient.res): New target. | ||
| 35 | |||
| 36 | 2013-05-15 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 37 | |||
| 38 | * makefile.w32-in ($(DOC)): Use DOC rather than DOC-X. | ||
| 39 | |||
| 40 | 2013-05-06 Paul Eggert <eggert@cs.ucla.edu> | ||
| 41 | |||
| 42 | * make-docfile.c (search_lisp_doc_at_eol) [DEBUG]: Fix typo, | ||
| 43 | by removing references to no-longer-existing locals. | ||
| 44 | |||
| 45 | 2013-03-26 Eli Zaretskii <eliz@gnu.org> | ||
| 46 | |||
| 47 | Fix incompatibilities between MinGW.org and MinGW64 headers. | ||
| 48 | * ntlib.c (struct timespec) [!_TIMEZONE_DEFINED]: Define the | ||
| 49 | struct only if _TIMEZONE_DEFINED is not defined. | ||
| 50 | |||
| 51 | 2013-03-23 cg <chengang31@gmail.com> (tiny change) | ||
| 52 | |||
| 53 | * makefile.w32-in (LIB_SRC): Move before first use. | ||
| 54 | |||
| 1 | 2013-03-16 Paul Eggert <eggert@cs.ucla.edu> | 55 | 2013-03-16 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 56 | ||
| 3 | * pop.c: Fix ERRMAX typo (Bug#13925). | 57 | * pop.c: Fix ERRMAX typo (Bug#13925). |
| 4 | (socket_connection) [!HAVE_KRB5_ERROR_TEXT && HAVE_KRB5_ERROR_E_TEXT]: | 58 | (socket_connection) [!HAVE_KRB5_ERROR_TEXT && HAVE_KRB5_ERROR_E_TEXT]: |
| 5 | Use ERROR_MAX, not ERRMAX. | 59 | Use ERROR_MAX, not ERRMAX. |
| 6 | 60 | ||
| 7 | 2013-03-16 Glenn Morris <rgm@gnu.org> | ||
| 8 | |||
| 9 | * Version 24.3 released. | ||
| 10 | |||
| 11 | 2013-03-13 Paul Eggert <eggert@cs.ucla.edu> | 61 | 2013-03-13 Paul Eggert <eggert@cs.ucla.edu> |
| 12 | 62 | ||
| 13 | File synchronization fixes (Bug#13944). | 63 | File synchronization fixes (Bug#13944). |
| @@ -3718,7 +3768,7 @@ | |||
| 3718 | 3768 | ||
| 3719 | 2002-03-05 Francesco Potortì <pot@gnu.org> | 3769 | 2002-03-05 Francesco Potortì <pot@gnu.org> |
| 3720 | 3770 | ||
| 3721 | * etags.c: Honour #line directives. | 3771 | * etags.c: Honor #line directives. |
| 3722 | (no_line_directive): New global var; set it for old behavior. | 3772 | (no_line_directive): New global var; set it for old behavior. |
| 3723 | (main): Remove some #ifdef in the getopt switch. | 3773 | (main): Remove some #ifdef in the getopt switch. |
| 3724 | (add_node, put_entries): Code added to merge different chunks of | 3774 | (add_node, put_entries): Code added to merge different chunks of |
diff --git a/lib-src/Makefile.in b/lib-src/Makefile.in index 7069af9767a..f32333fe765 100644 --- a/lib-src/Makefile.in +++ b/lib-src/Makefile.in | |||
| @@ -113,8 +113,11 @@ MKDIR_P = @MKDIR_P@ | |||
| 113 | 113 | ||
| 114 | # ========================== Lists of Files =========================== | 114 | # ========================== Lists of Files =========================== |
| 115 | 115 | ||
| 116 | # emacsclientw.exe for MinGW, empty otherwise | ||
| 117 | CLIENTW = @CLIENTW@ | ||
| 118 | |||
| 116 | # Things that a user might actually run, which should be installed in bindir. | 119 | # Things that a user might actually run, which should be installed in bindir. |
| 117 | INSTALLABLES = etags${EXEEXT} ctags${EXEEXT} emacsclient${EXEEXT} \ | 120 | INSTALLABLES = etags${EXEEXT} ctags${EXEEXT} emacsclient${EXEEXT} $(CLIENTW) \ |
| 118 | ebrowse${EXEEXT} | 121 | ebrowse${EXEEXT} |
| 119 | 122 | ||
| 120 | INSTALLABLE_SCRIPTS = grep-changelog | 123 | INSTALLABLE_SCRIPTS = grep-changelog |
| @@ -163,10 +166,21 @@ LIBS_MAIL=@LIBS_MAIL@ | |||
| 163 | LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ | 166 | LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ |
| 164 | ## empty or -lrt or -lposix4 if HAVE_FDATASYNC | 167 | ## empty or -lrt or -lposix4 if HAVE_FDATASYNC |
| 165 | LIB_FDATASYNC = @LIB_FDATASYNC@ | 168 | LIB_FDATASYNC = @LIB_FDATASYNC@ |
| 169 | ## empty or -lwsock2 for MinGW | ||
| 170 | LIB_WSOCK32=@LIB_WSOCK32@ | ||
| 166 | 171 | ||
| 167 | ## Extra libraries to use when linking movemail. | 172 | ## Extra libraries to use when linking movemail. |
| 168 | LIBS_MOVE = $(LIBS_MAIL) $(KRB4LIB) $(DESLIB) $(KRB5LIB) $(CRYPTOLIB) \ | 173 | LIBS_MOVE = $(LIBS_MAIL) $(KRB4LIB) $(DESLIB) $(KRB5LIB) $(CRYPTOLIB) \ |
| 169 | $(COM_ERRLIB) $(LIBHESIOD) $(LIBRESOLV) | 174 | $(COM_ERRLIB) $(LIBHESIOD) $(LIBRESOLV) $(LIB_WSOCK32) |
| 175 | |||
| 176 | ## Extra libraries when linking emacsclient | ||
| 177 | ## (empty or -lcomctl32 for MinGW) | ||
| 178 | LIBS_ECLIENT = @LIBS_ECLIENT@ | ||
| 179 | |||
| 180 | ## Extra object files for linking for MinGW | ||
| 181 | NTLIB = @NTLIB@ | ||
| 182 | CLIENTRES = @CLIENTRES@ | ||
| 183 | WINDRES = @WINDRES@ | ||
| 170 | 184 | ||
| 171 | ## Some systems define this to request special libraries. | 185 | ## Some systems define this to request special libraries. |
| 172 | LIBS_SYSTEM = @LIBS_SYSTEM@ | 186 | LIBS_SYSTEM = @LIBS_SYSTEM@ |
| @@ -227,7 +241,7 @@ $(DESTDIR)${archlibdir}: all | |||
| 227 | umask 022; ${MKDIR_P} $(DESTDIR)${gamedir}; \ | 241 | umask 022; ${MKDIR_P} $(DESTDIR)${gamedir}; \ |
| 228 | touch $(DESTDIR)${gamedir}/snake-scores; \ | 242 | touch $(DESTDIR)${gamedir}/snake-scores; \ |
| 229 | touch $(DESTDIR)${gamedir}/tetris-scores | 243 | touch $(DESTDIR)${gamedir}/tetris-scores |
| 230 | -if chown ${gameuser} $(DESTDIR)${archlibdir}/update-game-score && chmod u+s $(DESTDIR)${archlibdir}/update-game-score; then \ | 244 | -if chown ${gameuser} $(DESTDIR)${archlibdir}/update-game-score${EXEEXT} && chmod u+s $(DESTDIR)${archlibdir}/update-game-score${EXEEXT}; then \ |
| 231 | chown ${gameuser} $(DESTDIR)${gamedir}; \ | 245 | chown ${gameuser} $(DESTDIR)${gamedir}; \ |
| 232 | chmod u=rwx,g=rwx,o=rx $(DESTDIR)${gamedir}; \ | 246 | chmod u=rwx,g=rwx,o=rx $(DESTDIR)${gamedir}; \ |
| 233 | fi | 247 | fi |
| @@ -264,7 +278,7 @@ uninstall: | |||
| 264 | fi | 278 | fi |
| 265 | 279 | ||
| 266 | mostlyclean: | 280 | mostlyclean: |
| 267 | -rm -f core *.o | 281 | -rm -f core *.o *.res |
| 268 | 282 | ||
| 269 | clean: mostlyclean | 283 | clean: mostlyclean |
| 270 | -rm -f ${EXE_FILES} | 284 | -rm -f ${EXE_FILES} |
| @@ -292,7 +306,7 @@ TAGS: etags${EXEEXT} | |||
| 292 | ## distribute Emacs. If they were clobbered, all the .elc files were | 306 | ## distribute Emacs. If they were clobbered, all the .elc files were |
| 293 | ## clobbered too. | 307 | ## clobbered too. |
| 294 | test-distrib${EXEEXT}: ${srcdir}/test-distrib.c | 308 | test-distrib${EXEEXT}: ${srcdir}/test-distrib.c |
| 295 | $(CC) ${ALL_CFLAGS} -o test-distrib ${srcdir}/test-distrib.c | 309 | $(CC) ${ALL_CFLAGS} -o test-distrib${EXEEXT} ${srcdir}/test-distrib.c |
| 296 | ./test-distrib ${srcdir}/testfile | 310 | ./test-distrib ${srcdir}/testfile |
| 297 | 311 | ||
| 298 | ../lib/libgnu.a: $(config_h) | 312 | ../lib/libgnu.a: $(config_h) |
| @@ -302,47 +316,68 @@ regex.o: $(srcdir)/../src/regex.c $(srcdir)/../src/regex.h $(config_h) | |||
| 302 | ${CC} -c ${CPP_CFLAGS} -DCONFIG_BROKETS -DINHIBIT_STRING_HEADER \ | 316 | ${CC} -c ${CPP_CFLAGS} -DCONFIG_BROKETS -DINHIBIT_STRING_HEADER \ |
| 303 | ${srcdir}/../src/regex.c | 317 | ${srcdir}/../src/regex.c |
| 304 | 318 | ||
| 305 | etags${EXEEXT}: ${srcdir}/etags.c regex.o $(config_h) | 319 | etags${EXEEXT}: ${srcdir}/etags.c regex.o $(NTLIB) $(config_h) |
| 306 | $(CC) ${ALL_CFLAGS} -DEMACS_NAME="\"GNU Emacs\"" \ | 320 | $(CC) ${ALL_CFLAGS} -DEMACS_NAME="\"GNU Emacs\"" \ |
| 307 | -DVERSION="\"${version}\"" ${srcdir}/etags.c \ | 321 | -DVERSION="\"${version}\"" ${srcdir}/etags.c \ |
| 308 | regex.o $(LOADLIBES) -o etags | 322 | regex.o $(LOADLIBES) $(NTLIB) -o etags${EXEEXT} |
| 309 | 323 | ||
| 310 | ebrowse${EXEEXT}: ${srcdir}/ebrowse.c ${srcdir}/../lib/min-max.h $(config_h) | 324 | ebrowse${EXEEXT}: ${srcdir}/ebrowse.c ${srcdir}/../lib/min-max.h $(NTLIB) \ |
| 325 | $(config_h) | ||
| 311 | $(CC) ${ALL_CFLAGS} -DVERSION="\"${version}\"" \ | 326 | $(CC) ${ALL_CFLAGS} -DVERSION="\"${version}\"" \ |
| 312 | ${srcdir}/ebrowse.c $(LOADLIBES) -o ebrowse | 327 | ${srcdir}/ebrowse.c $(LOADLIBES) $(NTLIB) -o ebrowse${EXEEXT} |
| 313 | 328 | ||
| 314 | ## We depend on etags to assure that parallel makes do not write two | 329 | ## We depend on etags to assure that parallel makes do not write two |
| 315 | ## etags.o files on top of each other. | 330 | ## etags.o files on top of each other. |
| 316 | ctags${EXEEXT}: etags${EXEEXT} | 331 | ctags${EXEEXT}: etags${EXEEXT} |
| 317 | $(CC) ${ALL_CFLAGS} -DCTAGS -DEMACS_NAME="\"GNU Emacs\"" \ | 332 | $(CC) ${ALL_CFLAGS} -DCTAGS -DEMACS_NAME="\"GNU Emacs\"" \ |
| 318 | -DVERSION="\"${version}\"" ${srcdir}/etags.c \ | 333 | -DVERSION="\"${version}\"" ${srcdir}/etags.c \ |
| 319 | regex.o $(LOADLIBES) -o ctags | 334 | regex.o $(LOADLIBES) $(NTLIB) -o ctags${EXEEXT} |
| 320 | 335 | ||
| 321 | profile${EXEEXT}: ${srcdir}/profile.c $(config_h) | 336 | profile${EXEEXT}: ${srcdir}/profile.c $(NTLIB) $(config_h) |
| 322 | $(CC) ${ALL_CFLAGS} ${srcdir}/profile.c \ | 337 | $(CC) ${ALL_CFLAGS} ${srcdir}/profile.c \ |
| 323 | $(LOADLIBES) $(LIB_CLOCK_GETTIME) -o profile | 338 | $(LOADLIBES) $(NTLIB) $(LIB_CLOCK_GETTIME) -o profile${EXEEXT} |
| 324 | 339 | ||
| 325 | make-docfile${EXEEXT}: ${srcdir}/make-docfile.c $(config_h) | 340 | make-docfile${EXEEXT}: ${srcdir}/make-docfile.c $(NTLIB) $(config_h) |
| 326 | $(CC) ${ALL_CFLAGS} ${srcdir}/make-docfile.c $(LOADLIBES) \ | 341 | $(CC) ${ALL_CFLAGS} ${srcdir}/make-docfile.c $(LOADLIBES) $(NTLIB) \ |
| 327 | -o make-docfile | 342 | -o make-docfile${EXEEXT} |
| 328 | 343 | ||
| 329 | movemail${EXEEXT}: ${srcdir}/movemail.c pop.o $(config_h) | 344 | movemail${EXEEXT}: ${srcdir}/movemail.c pop.o $(NTLIB) $(config_h) |
| 330 | $(CC) ${ALL_CFLAGS} ${MOVE_FLAGS} ${srcdir}/movemail.c pop.o \ | 345 | $(CC) ${ALL_CFLAGS} ${MOVE_FLAGS} ${srcdir}/movemail.c pop.o \ |
| 331 | $(LOADLIBES) $(LIBS_MOVE) -o movemail | 346 | $(LOADLIBES) $(NTLIB) $(LIBS_MOVE) -o movemail${EXEEXT} |
| 332 | 347 | ||
| 333 | pop.o: ${srcdir}/pop.c ${srcdir}/../lib/min-max.h $(config_h) | 348 | pop.o: ${srcdir}/pop.c ${srcdir}/pop.h ${srcdir}/../lib/min-max.h $(config_h) |
| 334 | $(CC) -c ${CPP_CFLAGS} ${MOVE_FLAGS} ${srcdir}/pop.c | 349 | $(CC) -c ${CPP_CFLAGS} ${MOVE_FLAGS} ${srcdir}/pop.c |
| 335 | 350 | ||
| 336 | emacsclient${EXEEXT}: ${srcdir}/emacsclient.c $(config_h) | 351 | emacsclient${EXEEXT}: ${srcdir}/emacsclient.c $(NTLIB) $(config_h) |
| 337 | $(CC) ${ALL_CFLAGS} ${srcdir}/emacsclient.c \ | 352 | $(CC) ${ALL_CFLAGS} ${srcdir}/emacsclient.c \ |
| 338 | -DVERSION="\"${version}\"" \ | 353 | -DVERSION="\"${version}\"" $(NTLIB) $(LOADLIBES) $(LIB_FDATASYNC) \ |
| 339 | $(LOADLIBES) $(LIB_FDATASYNC) -o emacsclient | 354 | $(LIB_WSOCK32) $(LIBS_ECLIENT) -o emacsclient${EXEEXT} |
| 355 | |||
| 356 | emacsclientw${EXEEXT}: ${srcdir}/emacsclient.c $(NTLIB) $(CLIENTRES) $(config_h) | ||
| 357 | $(CC) ${ALL_CFLAGS} $(CLIENTRES) -mwindows ${srcdir}/emacsclient.c \ | ||
| 358 | -DVERSION="\"${version}\"" $(LOADLIBES) $(LIB_FDATASYNC) \ | ||
| 359 | $(LIB_WSOCK32) $(LIBS_ECLIENT) -o emacsclientw${EXEEXT} | ||
| 340 | 360 | ||
| 341 | hexl${EXEEXT}: ${srcdir}/hexl.c $(config_h) | 361 | NTINC = ${srcdir}/../nt/inc |
| 342 | $(CC) ${ALL_CFLAGS} ${srcdir}/hexl.c $(LOADLIBES) -o hexl | 362 | NTDEPS = $(NTINC)/ms-w32.h $(NTINC)/sys/stat.h $(NTINC)/inttypes.h \ |
| 363 | $(NTINC)/stdint.h $(NTINC)/pwd.h $(NTINC)/sys/time.h $(NTINC)/stdbool.h \ | ||
| 364 | $(NTINC)/sys/wait.h $(NTINC)/unistd.h $(NTINC)/sys/file.h $(NTINC)/netdb.h | ||
| 343 | 365 | ||
| 344 | update-game-score${EXEEXT}: ${srcdir}/update-game-score.c $(config_h) | 366 | # The dependency on $(NTDEPS) is a trick intended to cause recompile of |
| 367 | # programs on MinGW whenever some private header in nt/inc is modified. | ||
| 368 | ntlib.o: ${srcdir}/ntlib.c ${srcdir}/ntlib.h $(NTDEPS) | ||
| 369 | $(CC) -c ${CPP_CFLAGS} ${srcdir}/ntlib.c | ||
| 370 | |||
| 371 | hexl${EXEEXT}: ${srcdir}/hexl.c $(NTLIB) $(config_h) | ||
| 372 | $(CC) ${ALL_CFLAGS} ${srcdir}/hexl.c $(LOADLIBES) -o hexl${EXEEXT} | ||
| 373 | |||
| 374 | update-game-score${EXEEXT}: ${srcdir}/update-game-score.c $(NTLIB) $(config_h) | ||
| 345 | $(CC) ${ALL_CFLAGS} -DHAVE_SHARED_GAME_DIR="\"$(gamedir)\"" \ | 375 | $(CC) ${ALL_CFLAGS} -DHAVE_SHARED_GAME_DIR="\"$(gamedir)\"" \ |
| 346 | ${srcdir}/update-game-score.c $(LOADLIBES) -o update-game-score | 376 | ${srcdir}/update-game-score.c $(LOADLIBES) $(NTLIB) \ |
| 377 | -o update-game-score${EXEEXT} | ||
| 378 | |||
| 379 | emacsclient.res: $(NTINC)/../emacsclient.rc | ||
| 380 | $(WINDRES) -O coff --include-dir=$(NTINC)/.. -o emacsclient.res \ | ||
| 381 | $(NTINC)/../emacsclient.rc | ||
| 347 | 382 | ||
| 348 | ## Makefile ends here. | 383 | ## Makefile ends here. |
diff --git a/lib-src/etags.c b/lib-src/etags.c index 27a853a954a..f6b173bf465 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c | |||
| @@ -316,15 +316,7 @@ static void Texinfo_nodes (FILE *); | |||
| 316 | static void Yacc_entries (FILE *); | 316 | static void Yacc_entries (FILE *); |
| 317 | static void just_read_file (FILE *); | 317 | static void just_read_file (FILE *); |
| 318 | 318 | ||
| 319 | static void print_language_names (void); | ||
| 320 | static void print_version (void); | ||
| 321 | static void print_help (argument *); | ||
| 322 | int main (int, char **); | ||
| 323 | |||
| 324 | static compressor *get_compressor_from_suffix (char *, char **); | ||
| 325 | static language *get_language_from_langname (const char *); | 319 | static language *get_language_from_langname (const char *); |
| 326 | static language *get_language_from_interpreter (char *); | ||
| 327 | static language *get_language_from_filename (char *, bool); | ||
| 328 | static void readline (linebuffer *, FILE *); | 320 | static void readline (linebuffer *, FILE *); |
| 329 | static long readline_internal (linebuffer *, FILE *); | 321 | static long readline_internal (linebuffer *, FILE *); |
| 330 | static bool nocase_tail (const char *); | 322 | static bool nocase_tail (const char *); |
| @@ -346,7 +338,6 @@ static void find_entries (FILE *); | |||
| 346 | static void free_tree (node *); | 338 | static void free_tree (node *); |
| 347 | static void free_fdesc (fdesc *); | 339 | static void free_fdesc (fdesc *); |
| 348 | static void pfnote (char *, bool, char *, int, int, long); | 340 | static void pfnote (char *, bool, char *, int, int, long); |
| 349 | static void make_tag (const char *, int, bool, char *, int, int, long); | ||
| 350 | static void invalidate_nodes (fdesc *, node **); | 341 | static void invalidate_nodes (fdesc *, node **); |
| 351 | static void put_entries (node *); | 342 | static void put_entries (node *); |
| 352 | 343 | ||
| @@ -816,7 +807,7 @@ etags --help --lang=ada."); | |||
| 816 | #ifndef VERSION | 807 | #ifndef VERSION |
| 817 | # define VERSION "17.38.1.4" | 808 | # define VERSION "17.38.1.4" |
| 818 | #endif | 809 | #endif |
| 819 | static void | 810 | static _Noreturn void |
| 820 | print_version (void) | 811 | print_version (void) |
| 821 | { | 812 | { |
| 822 | char emacs_copyright[] = COPYRIGHT; | 813 | char emacs_copyright[] = COPYRIGHT; |
| @@ -832,7 +823,7 @@ print_version (void) | |||
| 832 | # define PRINT_UNDOCUMENTED_OPTIONS_HELP FALSE | 823 | # define PRINT_UNDOCUMENTED_OPTIONS_HELP FALSE |
| 833 | #endif | 824 | #endif |
| 834 | 825 | ||
| 835 | static void | 826 | static _Noreturn void |
| 836 | print_help (argument *argbuffer) | 827 | print_help (argument *argbuffer) |
| 837 | { | 828 | { |
| 838 | bool help_for_lang = FALSE; | 829 | bool help_for_lang = FALSE; |
diff --git a/lib-src/make-docfile.c b/lib-src/make-docfile.c index 68e5279fd15..8fa70dd430e 100644 --- a/lib-src/make-docfile.c +++ b/lib-src/make-docfile.c | |||
| @@ -1090,8 +1090,7 @@ search_lisp_doc_at_eol (FILE *infile) | |||
| 1090 | if (c2 != '"' || c1 != '\\') | 1090 | if (c2 != '"' || c1 != '\\') |
| 1091 | { | 1091 | { |
| 1092 | #ifdef DEBUG | 1092 | #ifdef DEBUG |
| 1093 | fprintf (stderr, "## non-docstring in %s (%s)\n", | 1093 | fprintf (stderr, "## non-docstring found\n"); |
| 1094 | buffer, filename); | ||
| 1095 | #endif | 1094 | #endif |
| 1096 | if (c != EOF) | 1095 | if (c != EOF) |
| 1097 | ungetc (c, infile); | 1096 | ungetc (c, infile); |
diff --git a/lib-src/makefile.w32-in b/lib-src/makefile.w32-in index 8d016bc16be..9656a3badec 100644 --- a/lib-src/makefile.w32-in +++ b/lib-src/makefile.w32-in | |||
| @@ -27,6 +27,7 @@ LOCAL_FLAGS = -DNO_LDAV=1 -DNO_ARCHIVES=1 -I../lib \ | |||
| 27 | -I../nt/inc -I../src $(EMACS_EXTRA_C_FLAGS) | 27 | -I../nt/inc -I../src $(EMACS_EXTRA_C_FLAGS) |
| 28 | 28 | ||
| 29 | LIBS = $(BASE_LIBS) $(ADVAPI32) | 29 | LIBS = $(BASE_LIBS) $(ADVAPI32) |
| 30 | LIB_SRC = . | ||
| 30 | 31 | ||
| 31 | # The following target is used by makefile.w32-in files in other directories. | 32 | # The following target is used by makefile.w32-in files in other directories. |
| 32 | make-docfile: $(BLD)/make-docfile.exe | 33 | make-docfile: $(BLD)/make-docfile.exe |
| @@ -291,10 +292,10 @@ $(DOC): stamp_BLD $(BLD)/make-docfile.exe ../src/$(BLD)/temacs.exe $(lisp1) $(l | |||
| 291 | "$(THISDIR)/$(BLD)/make-docfile" -a $(DOC) -d ../src $(lisp1) | 292 | "$(THISDIR)/$(BLD)/make-docfile" -a $(DOC) -d ../src $(lisp1) |
| 292 | "$(THISDIR)/$(BLD)/make-docfile" -a $(DOC) -d ../src $(lisp2) | 293 | "$(THISDIR)/$(BLD)/make-docfile" -a $(DOC) -d ../src $(lisp2) |
| 293 | "$(THISDIR)/$(BLD)/make-docfile" -a $(DOC) -d ../src $(OTHER_PLATFORM_SUPPORT) | 294 | "$(THISDIR)/$(BLD)/make-docfile" -a $(DOC) -d ../src $(OTHER_PLATFORM_SUPPORT) |
| 294 | $(CP) $(DOC) ../etc/DOC-X | 295 | $(CP) $(DOC) ../etc/DOC |
| 295 | - mkdir "../src/$(OBJDIR)" | 296 | - mkdir "../src/$(OBJDIR)" |
| 296 | - mkdir "../src/$(OBJDIR)/etc" | 297 | - mkdir "../src/$(OBJDIR)/etc" |
| 297 | $(CP) $(DOC) ../src/$(OBJDIR)/etc/DOC-X | 298 | $(CP) $(DOC) ../src/$(OBJDIR)/etc/DOC |
| 298 | 299 | ||
| 299 | {$(BLD)}.$(O){$(BLD)}.exe: | 300 | {$(BLD)}.$(O){$(BLD)}.exe: |
| 300 | $(LINK) $(LINK_OUT)$@ $(LINK_FLAGS) $*.$(O) $(LIBS) | 301 | $(LINK) $(LINK_OUT)$@ $(LINK_FLAGS) $*.$(O) $(LIBS) |
| @@ -360,7 +361,6 @@ TAGS: $(BLD)/etags.exe *.c *.h | |||
| 360 | ### DEPENDENCIES ### | 361 | ### DEPENDENCIES ### |
| 361 | 362 | ||
| 362 | EMACS_ROOT = .. | 363 | EMACS_ROOT = .. |
| 363 | LIB_SRC = . | ||
| 364 | SRC = $(EMACS_ROOT)/src | 364 | SRC = $(EMACS_ROOT)/src |
| 365 | NT_INC = $(EMACS_ROOT)/nt/inc | 365 | NT_INC = $(EMACS_ROOT)/nt/inc |
| 366 | GNU_LIB = $(EMACS_ROOT)/lib | 366 | GNU_LIB = $(EMACS_ROOT)/lib |
diff --git a/lib-src/ntlib.c b/lib-src/ntlib.c index f43117457cb..41b4e3a0cbc 100644 --- a/lib-src/ntlib.c +++ b/lib-src/ntlib.c | |||
| @@ -34,21 +34,26 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 34 | 34 | ||
| 35 | #include "ntlib.h" | 35 | #include "ntlib.h" |
| 36 | 36 | ||
| 37 | /* MinGW64 defines _TIMEZONE_DEFINED and defines 'struct timespec' in | ||
| 38 | its system headers. */ | ||
| 39 | #ifndef _TIMEZONE_DEFINED | ||
| 37 | struct timezone | 40 | struct timezone |
| 38 | { | 41 | { |
| 39 | int tz_minuteswest; /* minutes west of Greenwich */ | 42 | int tz_minuteswest; /* minutes west of Greenwich */ |
| 40 | int tz_dsttime; /* type of dst correction */ | 43 | int tz_dsttime; /* type of dst correction */ |
| 41 | }; | 44 | }; |
| 45 | #endif | ||
| 42 | 46 | ||
| 43 | #define MAXPATHLEN _MAX_PATH | 47 | #define MAXPATHLEN _MAX_PATH |
| 44 | 48 | ||
| 45 | /* Emulate sleep...we could have done this with a define, but that | 49 | /* Emulate sleep...we could have done this with a define, but that |
| 46 | would necessitate including windows.h in the files that used it. | 50 | would necessitate including windows.h in the files that used it. |
| 47 | This is much easier. */ | 51 | This is much easier. */ |
| 48 | void | 52 | unsigned |
| 49 | sleep (unsigned long seconds) | 53 | sleep (unsigned seconds) |
| 50 | { | 54 | { |
| 51 | Sleep (seconds * 1000); | 55 | Sleep (seconds * 1000); |
| 56 | return 0; | ||
| 52 | } | 57 | } |
| 53 | 58 | ||
| 54 | /* Get the current working directory. */ | 59 | /* Get the current working directory. */ |
| @@ -134,6 +139,12 @@ getuid (void) | |||
| 134 | } | 139 | } |
| 135 | 140 | ||
| 136 | unsigned | 141 | unsigned |
| 142 | geteuid (void) | ||
| 143 | { | ||
| 144 | return getuid (); | ||
| 145 | } | ||
| 146 | |||
| 147 | unsigned | ||
| 137 | getgid (void) | 148 | getgid (void) |
| 138 | { | 149 | { |
| 139 | return 0; | 150 | return 0; |
| @@ -411,4 +422,3 @@ lstat (const char * path, struct stat * buf) | |||
| 411 | { | 422 | { |
| 412 | return stat (path, buf); | 423 | return stat (path, buf); |
| 413 | } | 424 | } |
| 414 | |||
diff --git a/lib-src/ntlib.h b/lib-src/ntlib.h index 1b2f57f35e5..3e48d2997e0 100644 --- a/lib-src/ntlib.h +++ b/lib-src/ntlib.h | |||
| @@ -16,7 +16,6 @@ GNU General Public License for more details. | |||
| 16 | You should have received a copy of the GNU General Public License | 16 | 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/>. */ | 17 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ |
| 18 | 18 | ||
| 19 | |||
| 20 | #include <pwd.h> | 19 | #include <pwd.h> |
| 21 | #include <malloc.h> | 20 | #include <malloc.h> |
| 22 | 21 | ||
| @@ -29,12 +28,13 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 29 | #ifdef sleep | 28 | #ifdef sleep |
| 30 | #undef sleep | 29 | #undef sleep |
| 31 | #endif | 30 | #endif |
| 32 | void sleep (unsigned long seconds); | 31 | unsigned sleep (unsigned seconds); |
| 33 | char *getwd (char *dir); | 32 | char *getwd (char *dir); |
| 34 | int getppid (void); | 33 | int getppid (void); |
| 35 | char * getlogin (void); | 34 | char * getlogin (void); |
| 36 | char * cuserid (char * s); | 35 | char * cuserid (char * s); |
| 37 | unsigned getuid (void); | 36 | unsigned getuid (void); |
| 37 | unsigned geteuid (void); | ||
| 38 | unsigned getegid (void); | 38 | unsigned getegid (void); |
| 39 | unsigned getgid (void); | 39 | unsigned getgid (void); |
| 40 | int setuid (unsigned uid); | 40 | int setuid (unsigned uid); |
diff --git a/lib-src/pop.c b/lib-src/pop.c index 1f3f82baa68..a269144c915 100644 --- a/lib-src/pop.c +++ b/lib-src/pop.c | |||
| @@ -1075,28 +1075,22 @@ socket_connection (char *host, int flags) | |||
| 1075 | } | 1075 | } |
| 1076 | } while (ret != 0); | 1076 | } while (ret != 0); |
| 1077 | 1077 | ||
| 1078 | if (ret == 0) | 1078 | for (it = res; it; it = it->ai_next) |
| 1079 | { | 1079 | if (it->ai_addrlen == sizeof addr) |
| 1080 | it = res; | 1080 | { |
| 1081 | while (it) | 1081 | struct sockaddr_in *in_a = (struct sockaddr_in *) it->ai_addr; |
| 1082 | { | 1082 | addr.sin_addr = in_a->sin_addr; |
| 1083 | if (it->ai_addrlen == sizeof (addr)) | 1083 | if (! connect (sock, (struct sockaddr *) &addr, sizeof addr)) |
| 1084 | { | 1084 | break; |
| 1085 | struct sockaddr_in *in_a = (struct sockaddr_in *) it->ai_addr; | 1085 | } |
| 1086 | addr.sin_addr = in_a->sin_addr; | 1086 | connect_ok = it != NULL; |
| 1087 | if (! connect (sock, (struct sockaddr *) &addr, sizeof (addr))) | 1087 | if (connect_ok) |
| 1088 | break; | 1088 | { |
| 1089 | } | 1089 | realhost = alloca (strlen (it->ai_canonname) + 1); |
| 1090 | it = it->ai_next; | 1090 | strcpy (realhost, it->ai_canonname); |
| 1091 | } | ||
| 1092 | connect_ok = it != NULL; | ||
| 1093 | if (connect_ok) | ||
| 1094 | { | ||
| 1095 | realhost = alloca (strlen (it->ai_canonname) + 1); | ||
| 1096 | strcpy (realhost, it->ai_canonname); | ||
| 1097 | } | ||
| 1098 | freeaddrinfo (res); | ||
| 1099 | } | 1091 | } |
| 1092 | freeaddrinfo (res); | ||
| 1093 | |||
| 1100 | #else /* !HAVE_GETADDRINFO */ | 1094 | #else /* !HAVE_GETADDRINFO */ |
| 1101 | do | 1095 | do |
| 1102 | { | 1096 | { |
diff --git a/lib-src/update-game-score.c b/lib-src/update-game-score.c index 29c81a8936c..ec8b4317770 100644 --- a/lib-src/update-game-score.c +++ b/lib-src/update-game-score.c | |||
| @@ -46,6 +46,10 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 46 | #include <sys/stat.h> | 46 | #include <sys/stat.h> |
| 47 | #include <getopt.h> | 47 | #include <getopt.h> |
| 48 | 48 | ||
| 49 | #ifdef WINDOWSNT | ||
| 50 | #include "ntlib.h" | ||
| 51 | #endif | ||
| 52 | |||
| 49 | #define MAX_ATTEMPTS 5 | 53 | #define MAX_ATTEMPTS 5 |
| 50 | #define MAX_SCORES 200 | 54 | #define MAX_SCORES 200 |
| 51 | #define MAX_DATA_LEN 1024 | 55 | #define MAX_DATA_LEN 1024 |