diff options
| author | Eli Zaretskii | 2013-03-30 20:00:51 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2013-03-30 20:00:51 +0300 |
| commit | 7c4026b6ad03974a55a175af17c8e76c61931b69 (patch) | |
| tree | eac656e59e5aa55044323a4f7fbea7377fb83d0a /lib-src | |
| parent | fff1aa4e84d0568c0295711f58fa18028d100744 (diff) | |
| download | emacs-7c4026b6ad03974a55a175af17c8e76c61931b69.tar.gz emacs-7c4026b6ad03974a55a175af17c8e76c61931b69.zip | |
Finished with lib-src compilation, except emacsclientw and emacsclient.res.
Next -- compilation in nt/, and then problems in src/.
Diffstat (limited to 'lib-src')
| -rw-r--r-- | lib-src/Makefile.in | 38 | ||||
| -rw-r--r-- | lib-src/ntlib.c | 26 | ||||
| -rw-r--r-- | lib-src/ntlib.h | 4 | ||||
| -rw-r--r-- | lib-src/update-game-score.c | 4 |
4 files changed, 53 insertions, 19 deletions
diff --git a/lib-src/Makefile.in b/lib-src/Makefile.in index 7069af9767a..903dbfcf7b9 100644 --- a/lib-src/Makefile.in +++ b/lib-src/Makefile.in | |||
| @@ -163,11 +163,16 @@ LIBS_MAIL=@LIBS_MAIL@ | |||
| 163 | LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ | 163 | LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ |
| 164 | ## empty or -lrt or -lposix4 if HAVE_FDATASYNC | 164 | ## empty or -lrt or -lposix4 if HAVE_FDATASYNC |
| 165 | LIB_FDATASYNC = @LIB_FDATASYNC@ | 165 | LIB_FDATASYNC = @LIB_FDATASYNC@ |
| 166 | ## empty of -lwsock32 for MinGW | ||
| 167 | LIB_WSOCK32 = @LIB_WSOCK32@ | ||
| 166 | 168 | ||
| 167 | ## Extra libraries to use when linking movemail. | 169 | ## Extra libraries to use when linking movemail. |
| 168 | LIBS_MOVE = $(LIBS_MAIL) $(KRB4LIB) $(DESLIB) $(KRB5LIB) $(CRYPTOLIB) \ | 170 | LIBS_MOVE = $(LIBS_MAIL) $(KRB4LIB) $(DESLIB) $(KRB5LIB) $(CRYPTOLIB) \ |
| 169 | $(COM_ERRLIB) $(LIBHESIOD) $(LIBRESOLV) | 171 | $(COM_ERRLIB) $(LIBHESIOD) $(LIBRESOLV) |
| 170 | 172 | ||
| 173 | ## Extra object files for linking emacsclient | ||
| 174 | NTLIB_O = @NTLIB_O@ | ||
| 175 | |||
| 171 | ## Some systems define this to request special libraries. | 176 | ## Some systems define this to request special libraries. |
| 172 | LIBS_SYSTEM = @LIBS_SYSTEM@ | 177 | LIBS_SYSTEM = @LIBS_SYSTEM@ |
| 173 | 178 | ||
| @@ -292,7 +297,7 @@ TAGS: etags${EXEEXT} | |||
| 292 | ## distribute Emacs. If they were clobbered, all the .elc files were | 297 | ## distribute Emacs. If they were clobbered, all the .elc files were |
| 293 | ## clobbered too. | 298 | ## clobbered too. |
| 294 | test-distrib${EXEEXT}: ${srcdir}/test-distrib.c | 299 | test-distrib${EXEEXT}: ${srcdir}/test-distrib.c |
| 295 | $(CC) ${ALL_CFLAGS} -o test-distrib ${srcdir}/test-distrib.c | 300 | $(CC) ${ALL_CFLAGS} -o test-distrib${EXEEXT} ${srcdir}/test-distrib.c |
| 296 | ./test-distrib ${srcdir}/testfile | 301 | ./test-distrib ${srcdir}/testfile |
| 297 | 302 | ||
| 298 | ../lib/libgnu.a: $(config_h) | 303 | ../lib/libgnu.a: $(config_h) |
| @@ -305,44 +310,49 @@ regex.o: $(srcdir)/../src/regex.c $(srcdir)/../src/regex.h $(config_h) | |||
| 305 | etags${EXEEXT}: ${srcdir}/etags.c regex.o $(config_h) | 310 | etags${EXEEXT}: ${srcdir}/etags.c regex.o $(config_h) |
| 306 | $(CC) ${ALL_CFLAGS} -DEMACS_NAME="\"GNU Emacs\"" \ | 311 | $(CC) ${ALL_CFLAGS} -DEMACS_NAME="\"GNU Emacs\"" \ |
| 307 | -DVERSION="\"${version}\"" ${srcdir}/etags.c \ | 312 | -DVERSION="\"${version}\"" ${srcdir}/etags.c \ |
| 308 | regex.o $(LOADLIBES) -o etags | 313 | regex.o $(LOADLIBES) -o etags${EXEEXT} |
| 309 | 314 | ||
| 310 | ebrowse${EXEEXT}: ${srcdir}/ebrowse.c ${srcdir}/../lib/min-max.h $(config_h) | 315 | ebrowse${EXEEXT}: ${srcdir}/ebrowse.c ${srcdir}/../lib/min-max.h $(config_h) |
| 311 | $(CC) ${ALL_CFLAGS} -DVERSION="\"${version}\"" \ | 316 | $(CC) ${ALL_CFLAGS} -DVERSION="\"${version}\"" \ |
| 312 | ${srcdir}/ebrowse.c $(LOADLIBES) -o ebrowse | 317 | ${srcdir}/ebrowse.c $(LOADLIBES) -o ebrowse${EXEEXT} |
| 313 | 318 | ||
| 314 | ## We depend on etags to assure that parallel makes do not write two | 319 | ## We depend on etags to assure that parallel makes do not write two |
| 315 | ## etags.o files on top of each other. | 320 | ## etags.o files on top of each other. |
| 316 | ctags${EXEEXT}: etags${EXEEXT} | 321 | ctags${EXEEXT}: etags${EXEEXT} |
| 317 | $(CC) ${ALL_CFLAGS} -DCTAGS -DEMACS_NAME="\"GNU Emacs\"" \ | 322 | $(CC) ${ALL_CFLAGS} -DCTAGS -DEMACS_NAME="\"GNU Emacs\"" \ |
| 318 | -DVERSION="\"${version}\"" ${srcdir}/etags.c \ | 323 | -DVERSION="\"${version}\"" ${srcdir}/etags.c \ |
| 319 | regex.o $(LOADLIBES) -o ctags | 324 | regex.o $(LOADLIBES) -o ctags${EXEEXT} |
| 320 | 325 | ||
| 321 | profile${EXEEXT}: ${srcdir}/profile.c $(config_h) | 326 | profile${EXEEXT}: ${srcdir}/profile.c $(config_h) |
| 322 | $(CC) ${ALL_CFLAGS} ${srcdir}/profile.c \ | 327 | $(CC) ${ALL_CFLAGS} ${srcdir}/profile.c \ |
| 323 | $(LOADLIBES) $(LIB_CLOCK_GETTIME) -o profile | 328 | $(LOADLIBES) $(LIB_CLOCK_GETTIME) -o profile${EXEEXT} |
| 324 | 329 | ||
| 325 | make-docfile${EXEEXT}: ${srcdir}/make-docfile.c $(config_h) | 330 | make-docfile${EXEEXT}: ${srcdir}/make-docfile.c $(config_h) |
| 326 | $(CC) ${ALL_CFLAGS} ${srcdir}/make-docfile.c $(LOADLIBES) \ | 331 | $(CC) ${ALL_CFLAGS} ${srcdir}/make-docfile.c $(LOADLIBES) \ |
| 327 | -o make-docfile | 332 | -o make-docfile${EXEEXT} |
| 328 | 333 | ||
| 329 | movemail${EXEEXT}: ${srcdir}/movemail.c pop.o $(config_h) | 334 | movemail${EXEEXT}: ${srcdir}/movemail.c pop.o $(NTLIB_O) $(config_h) |
| 330 | $(CC) ${ALL_CFLAGS} ${MOVE_FLAGS} ${srcdir}/movemail.c pop.o \ | 335 | $(CC) ${ALL_CFLAGS} ${MOVE_FLAGS} ${srcdir}/movemail.c pop.o \ |
| 331 | $(LOADLIBES) $(LIBS_MOVE) -o movemail | 336 | $(NTLIB_O) $(LIB_WSOCK32) $(LOADLIBES) $(LIBS_MOVE) \ |
| 337 | -o movemail${EXEEXT} | ||
| 332 | 338 | ||
| 333 | pop.o: ${srcdir}/pop.c ${srcdir}/../lib/min-max.h $(config_h) | 339 | pop.o: ${srcdir}/pop.c ${srcdir}/../lib/min-max.h $(config_h) |
| 334 | $(CC) -c ${CPP_CFLAGS} ${MOVE_FLAGS} ${srcdir}/pop.c | 340 | $(CC) -c ${CPP_CFLAGS} ${MOVE_FLAGS} ${srcdir}/pop.c |
| 335 | 341 | ||
| 336 | emacsclient${EXEEXT}: ${srcdir}/emacsclient.c $(config_h) | 342 | emacsclient${EXEEXT}: ${srcdir}/emacsclient.c $(NTLIB_O) $(config_h) |
| 337 | $(CC) ${ALL_CFLAGS} ${srcdir}/emacsclient.c \ | 343 | $(CC) ${ALL_CFLAGS} ${srcdir}/emacsclient.c \ |
| 338 | -DVERSION="\"${version}\"" \ | 344 | -DVERSION="\"${version}\"" $(LIB_WSOCK32) \ |
| 339 | $(LOADLIBES) $(LIB_FDATASYNC) -o emacsclient | 345 | $(LOADLIBES) $(LIB_FDATASYNC) -o emacsclient${EXEEXT} |
| 346 | |||
| 347 | ntlib.o: ${srcdir}/ntlib.c ${srcdir}/ntlib.h | ||
| 348 | $(CC) -c ${CPP_CFLAGS} ${srcdir}/ntlib.c | ||
| 340 | 349 | ||
| 341 | hexl${EXEEXT}: ${srcdir}/hexl.c $(config_h) | 350 | hexl${EXEEXT}: ${srcdir}/hexl.c $(config_h) |
| 342 | $(CC) ${ALL_CFLAGS} ${srcdir}/hexl.c $(LOADLIBES) -o hexl | 351 | $(CC) ${ALL_CFLAGS} ${srcdir}/hexl.c $(LOADLIBES) -o hexl${EXEEXT} |
| 343 | 352 | ||
| 344 | update-game-score${EXEEXT}: ${srcdir}/update-game-score.c $(config_h) | 353 | update-game-score${EXEEXT}: ${srcdir}/update-game-score.c $(NTLIB_O) $(config_h) |
| 345 | $(CC) ${ALL_CFLAGS} -DHAVE_SHARED_GAME_DIR="\"$(gamedir)\"" \ | 354 | $(CC) ${ALL_CFLAGS} -DHAVE_SHARED_GAME_DIR="\"$(gamedir)\"" \ |
| 346 | ${srcdir}/update-game-score.c $(LOADLIBES) -o update-game-score | 355 | ${srcdir}/update-game-score.c $(NTLIB_O) $(LOADLIBES) \ |
| 356 | -o update-game-score${EXEEXT} | ||
| 347 | 357 | ||
| 348 | ## Makefile ends here. | 358 | ## Makefile ends here. |
diff --git a/lib-src/ntlib.c b/lib-src/ntlib.c index 849abc2ede5..9dbfda90e00 100644 --- a/lib-src/ntlib.c +++ b/lib-src/ntlib.c | |||
| @@ -20,6 +20,20 @@ GNU General Public License for more details. | |||
| 20 | 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 |
| 21 | 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/>. */ |
| 22 | 22 | ||
| 23 | #ifdef __MINGW32__ | ||
| 24 | /* A kludge to avoid including header files in lib/. They cannot be | ||
| 25 | configured-out, and their stuff interferes with what we have | ||
| 26 | defined in this header and in other headers in nt/inc. Yuck! */ | ||
| 27 | #define __need_system_fcntl_h | ||
| 28 | #define _GL_FCNTL_H | ||
| 29 | #define _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H | ||
| 30 | #define _GL_ALREADY_INCLUDING_SIGNAL_H | ||
| 31 | #define _GL_ALREADY_INCLUDING_STDIO_H | ||
| 32 | #define __need_system_stdlib_h | ||
| 33 | #define _GL_TIME_H | ||
| 34 | #define __need_system_sys_stat_h | ||
| 35 | #endif | ||
| 36 | |||
| 23 | #include <windows.h> | 37 | #include <windows.h> |
| 24 | #include <stdlib.h> | 38 | #include <stdlib.h> |
| 25 | #include <stdio.h> | 39 | #include <stdio.h> |
| @@ -49,10 +63,11 @@ struct timezone | |||
| 49 | /* Emulate sleep...we could have done this with a define, but that | 63 | /* Emulate sleep...we could have done this with a define, but that |
| 50 | would necessitate including windows.h in the files that used it. | 64 | would necessitate including windows.h in the files that used it. |
| 51 | This is much easier. */ | 65 | This is much easier. */ |
| 52 | void | 66 | unsigned |
| 53 | sleep (unsigned long seconds) | 67 | sleep (unsigned seconds) |
| 54 | { | 68 | { |
| 55 | Sleep (seconds * 1000); | 69 | Sleep (seconds * 1000); |
| 70 | return 0; | ||
| 56 | } | 71 | } |
| 57 | 72 | ||
| 58 | /* Get the current working directory. */ | 73 | /* Get the current working directory. */ |
| @@ -138,6 +153,12 @@ getuid (void) | |||
| 138 | } | 153 | } |
| 139 | 154 | ||
| 140 | unsigned | 155 | unsigned |
| 156 | geteuid (void) | ||
| 157 | { | ||
| 158 | return getuid (); | ||
| 159 | } | ||
| 160 | |||
| 161 | unsigned | ||
| 141 | getgid (void) | 162 | getgid (void) |
| 142 | { | 163 | { |
| 143 | return 0; | 164 | return 0; |
| @@ -415,4 +436,3 @@ lstat (const char * path, struct stat * buf) | |||
| 415 | { | 436 | { |
| 416 | return stat (path, buf); | 437 | return stat (path, buf); |
| 417 | } | 438 | } |
| 418 | |||
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/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 |