diff options
author | Eli Zaretskii <eliz@gnu.org> | 2013-03-30 20:00:51 +0300 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2013-03-30 20:00:51 +0300 |
commit | 7c4026b6ad03974a55a175af17c8e76c61931b69 (patch) | |
tree | eac656e59e5aa55044323a4f7fbea7377fb83d0a /lib-src | |
parent | fff1aa4e84d0568c0295711f58fa18028d100744 (diff) | |
download | emacs-7c4026b6ad03974a55a175af17c8e76c61931b69.tar.gz |
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@ LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ ## empty or -lrt or -lposix4 if HAVE_FDATASYNC LIB_FDATASYNC = @LIB_FDATASYNC@ +## empty of -lwsock32 for MinGW +LIB_WSOCK32 = @LIB_WSOCK32@ ## Extra libraries to use when linking movemail. LIBS_MOVE = $(LIBS_MAIL) $(KRB4LIB) $(DESLIB) $(KRB5LIB) $(CRYPTOLIB) \ $(COM_ERRLIB) $(LIBHESIOD) $(LIBRESOLV) +## Extra object files for linking emacsclient +NTLIB_O = @NTLIB_O@ + ## Some systems define this to request special libraries. LIBS_SYSTEM = @LIBS_SYSTEM@ @@ -292,7 +297,7 @@ TAGS: etags${EXEEXT} ## distribute Emacs. If they were clobbered, all the .elc files were ## clobbered too. test-distrib${EXEEXT}: ${srcdir}/test-distrib.c - $(CC) ${ALL_CFLAGS} -o test-distrib ${srcdir}/test-distrib.c + $(CC) ${ALL_CFLAGS} -o test-distrib${EXEEXT} ${srcdir}/test-distrib.c ./test-distrib ${srcdir}/testfile ../lib/libgnu.a: $(config_h) @@ -305,44 +310,49 @@ regex.o: $(srcdir)/../src/regex.c $(srcdir)/../src/regex.h $(config_h) etags${EXEEXT}: ${srcdir}/etags.c regex.o $(config_h) $(CC) ${ALL_CFLAGS} -DEMACS_NAME="\"GNU Emacs\"" \ -DVERSION="\"${version}\"" ${srcdir}/etags.c \ - regex.o $(LOADLIBES) -o etags + regex.o $(LOADLIBES) -o etags${EXEEXT} ebrowse${EXEEXT}: ${srcdir}/ebrowse.c ${srcdir}/../lib/min-max.h $(config_h) $(CC) ${ALL_CFLAGS} -DVERSION="\"${version}\"" \ - ${srcdir}/ebrowse.c $(LOADLIBES) -o ebrowse + ${srcdir}/ebrowse.c $(LOADLIBES) -o ebrowse${EXEEXT} ## We depend on etags to assure that parallel makes do not write two ## etags.o files on top of each other. ctags${EXEEXT}: etags${EXEEXT} $(CC) ${ALL_CFLAGS} -DCTAGS -DEMACS_NAME="\"GNU Emacs\"" \ -DVERSION="\"${version}\"" ${srcdir}/etags.c \ - regex.o $(LOADLIBES) -o ctags + regex.o $(LOADLIBES) -o ctags${EXEEXT} profile${EXEEXT}: ${srcdir}/profile.c $(config_h) $(CC) ${ALL_CFLAGS} ${srcdir}/profile.c \ - $(LOADLIBES) $(LIB_CLOCK_GETTIME) -o profile + $(LOADLIBES) $(LIB_CLOCK_GETTIME) -o profile${EXEEXT} make-docfile${EXEEXT}: ${srcdir}/make-docfile.c $(config_h) $(CC) ${ALL_CFLAGS} ${srcdir}/make-docfile.c $(LOADLIBES) \ - -o make-docfile + -o make-docfile${EXEEXT} -movemail${EXEEXT}: ${srcdir}/movemail.c pop.o $(config_h) +movemail${EXEEXT}: ${srcdir}/movemail.c pop.o $(NTLIB_O) $(config_h) $(CC) ${ALL_CFLAGS} ${MOVE_FLAGS} ${srcdir}/movemail.c pop.o \ - $(LOADLIBES) $(LIBS_MOVE) -o movemail + $(NTLIB_O) $(LIB_WSOCK32) $(LOADLIBES) $(LIBS_MOVE) \ + -o movemail${EXEEXT} pop.o: ${srcdir}/pop.c ${srcdir}/../lib/min-max.h $(config_h) $(CC) -c ${CPP_CFLAGS} ${MOVE_FLAGS} ${srcdir}/pop.c -emacsclient${EXEEXT}: ${srcdir}/emacsclient.c $(config_h) +emacsclient${EXEEXT}: ${srcdir}/emacsclient.c $(NTLIB_O) $(config_h) $(CC) ${ALL_CFLAGS} ${srcdir}/emacsclient.c \ - -DVERSION="\"${version}\"" \ - $(LOADLIBES) $(LIB_FDATASYNC) -o emacsclient + -DVERSION="\"${version}\"" $(LIB_WSOCK32) \ + $(LOADLIBES) $(LIB_FDATASYNC) -o emacsclient${EXEEXT} + +ntlib.o: ${srcdir}/ntlib.c ${srcdir}/ntlib.h + $(CC) -c ${CPP_CFLAGS} ${srcdir}/ntlib.c hexl${EXEEXT}: ${srcdir}/hexl.c $(config_h) - $(CC) ${ALL_CFLAGS} ${srcdir}/hexl.c $(LOADLIBES) -o hexl + $(CC) ${ALL_CFLAGS} ${srcdir}/hexl.c $(LOADLIBES) -o hexl${EXEEXT} -update-game-score${EXEEXT}: ${srcdir}/update-game-score.c $(config_h) +update-game-score${EXEEXT}: ${srcdir}/update-game-score.c $(NTLIB_O) $(config_h) $(CC) ${ALL_CFLAGS} -DHAVE_SHARED_GAME_DIR="\"$(gamedir)\"" \ - ${srcdir}/update-game-score.c $(LOADLIBES) -o update-game-score + ${srcdir}/update-game-score.c $(NTLIB_O) $(LOADLIBES) \ + -o update-game-score${EXEEXT} ## 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. You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ +#ifdef __MINGW32__ +/* A kludge to avoid including header files in lib/. They cannot be + configured-out, and their stuff interferes with what we have + defined in this header and in other headers in nt/inc. Yuck! */ +#define __need_system_fcntl_h +#define _GL_FCNTL_H +#define _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H +#define _GL_ALREADY_INCLUDING_SIGNAL_H +#define _GL_ALREADY_INCLUDING_STDIO_H +#define __need_system_stdlib_h +#define _GL_TIME_H +#define __need_system_sys_stat_h +#endif + #include <windows.h> #include <stdlib.h> #include <stdio.h> @@ -49,10 +63,11 @@ struct timezone /* Emulate sleep...we could have done this with a define, but that would necessitate including windows.h in the files that used it. This is much easier. */ -void -sleep (unsigned long seconds) +unsigned +sleep (unsigned seconds) { Sleep (seconds * 1000); + return 0; } /* Get the current working directory. */ @@ -138,6 +153,12 @@ getuid (void) } unsigned +geteuid (void) +{ + return getuid (); +} + +unsigned getgid (void) { return 0; @@ -415,4 +436,3 @@ lstat (const char * path, struct stat * buf) { return stat (path, buf); } - 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. You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ - #include <pwd.h> #include <malloc.h> @@ -29,12 +28,13 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #ifdef sleep #undef sleep #endif -void sleep (unsigned long seconds); +unsigned sleep (unsigned seconds); char *getwd (char *dir); int getppid (void); char * getlogin (void); char * cuserid (char * s); unsigned getuid (void); +unsigned geteuid (void); unsigned getegid (void); unsigned getgid (void); 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/>. */ #include <sys/stat.h> #include <getopt.h> +#ifdef WINDOWSNT +#include "ntlib.h" +#endif + #define MAX_ATTEMPTS 5 #define MAX_SCORES 200 #define MAX_DATA_LEN 1024 |