diff options
| author | Eli Zaretskii | 2012-10-17 21:02:44 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2012-10-17 21:02:44 +0200 |
| commit | a68089e4a4dd41c9b838d82d1d96d971b01398c8 (patch) | |
| tree | 96c0226490d77760d0f783a4646c38f23cc7a688 /src/w32.c | |
| parent | 6c24e35f04e102ce8ddc4e6f9a1bc5e117a91b45 (diff) | |
| download | emacs-a68089e4a4dd41c9b838d82d1d96d971b01398c8.tar.gz emacs-a68089e4a4dd41c9b838d82d1d96d971b01398c8.zip | |
Fix warnings when compiling on MS-Windows with -std=gnu99.
src/makefile.w32-in ($(BLD)/w32.$(O)):
($(BLD)/vm-limit.$(O)):
($(BLD)/term.$(O)):
($(BLD)/unexw32.$(O)):
($(BLD)/fileio.$(O)):
($(BLD)/dispnew.$(O)): Update dependencies.
src/w32term.h (w32_initialize_display_info, initialize_w32_display):
Add prototypes.
src/w32proc.c: Include ctype.h.
src/w32.h (init_environment, check_windows_init_file)
(syms_of_ntproc, syms_of_ntterm, dostounix_filename)
(unixtodos_filename, init_winsock, srandom, random, sys_pipe)
(set_process_dir, sys_spawnve, register_child, sys_sleep, getwd)
(sys_link): Add prototypes.
src/w32.c: Include w32select.h.
(sys_access, e_malloc, sys_select): Add prototypes.
(emacs_gnutls_pull): 'timeout' is now EMACS_TIME, not struct timeval.
src/vm-limit.c [WINDOWSNT]: Include w32heap.h.
src/unexw32.c: Include lisp.h and w32.h.
src/term.c [WINDOWSNT]: Include w32term.h.
src/process.c [WINDOWSNT]: Add prototype of sys_select.
src/fileio.c [WINDOWSNT]: Include w32.h.
src/dispnew.c [WINDOWSNT]: Include w32.h.
nt/inc/pwd.h (getuid, geteuid): Add prototypes.
nt/inc/ms-w32.h (sys_wait, _getpid, gmtgime_r, localtime_r)
(signal_handler, sys_signal, sigemptyset, sigfillset, sigprocmask)
(pthread_sigmask, sigismember, setpgrp, sigaction, alarm)
(sys_kill, getpagesize): Add prototypes for emulated functions.
nt/inc/grp.h (getgid, getegid): Add prototypes.
nt/gmake.defs (DEBUG_CFLAGS) [NOOPT]: Add -std=gnu99.
nt/configure.bat (chkapiN): Avoid compiler warning in junk.c when
compiling with -std=gnu99.
nt/config.nt (CHECK_LISP_OBJECT_TYPE): Don't undef, so that it
could be used via --cflags switch to configure.bat.
Diffstat (limited to 'src/w32.c')
| -rw-r--r-- | src/w32.c | 12 |
1 files changed, 9 insertions, 3 deletions
| @@ -175,6 +175,7 @@ typedef struct _REPARSE_DATA_BUFFER { | |||
| 175 | #include "ndir.h" | 175 | #include "ndir.h" |
| 176 | #include "w32common.h" | 176 | #include "w32common.h" |
| 177 | #include "w32heap.h" | 177 | #include "w32heap.h" |
| 178 | #include "w32select.h" | ||
| 178 | #include "systime.h" | 179 | #include "systime.h" |
| 179 | #include "dispextern.h" /* for xstrcasecmp */ | 180 | #include "dispextern.h" /* for xstrcasecmp */ |
| 180 | #include "coding.h" /* for Vlocale_coding_system */ | 181 | #include "coding.h" /* for Vlocale_coding_system */ |
| @@ -198,6 +199,12 @@ static int enable_privilege (LPCTSTR, BOOL, TOKEN_PRIVILEGES *); | |||
| 198 | static int restore_privilege (TOKEN_PRIVILEGES *); | 199 | static int restore_privilege (TOKEN_PRIVILEGES *); |
| 199 | static BOOL WINAPI revert_to_self (void); | 200 | static BOOL WINAPI revert_to_self (void); |
| 200 | 201 | ||
| 202 | extern int sys_access (const char *, int); | ||
| 203 | extern void *e_malloc (size_t); | ||
| 204 | extern int sys_select (int, SELECT_TYPE *, SELECT_TYPE *, SELECT_TYPE *, | ||
| 205 | EMACS_TIME *, void *); | ||
| 206 | |||
| 207 | |||
| 201 | 208 | ||
| 202 | /* Initialization states. | 209 | /* Initialization states. |
| 203 | 210 | ||
| @@ -6961,7 +6968,7 @@ emacs_gnutls_pull (gnutls_transport_ptr_t p, void* buf, size_t sz) | |||
| 6961 | { | 6968 | { |
| 6962 | int n, sc, err; | 6969 | int n, sc, err; |
| 6963 | SELECT_TYPE fdset; | 6970 | SELECT_TYPE fdset; |
| 6964 | struct timeval timeout; | 6971 | EMACS_TIME timeout; |
| 6965 | struct Lisp_Process *process = (struct Lisp_Process *)p; | 6972 | struct Lisp_Process *process = (struct Lisp_Process *)p; |
| 6966 | int fd = process->infd; | 6973 | int fd = process->infd; |
| 6967 | 6974 | ||
| @@ -6977,8 +6984,7 @@ emacs_gnutls_pull (gnutls_transport_ptr_t p, void* buf, size_t sz) | |||
| 6977 | if (err == EWOULDBLOCK) | 6984 | if (err == EWOULDBLOCK) |
| 6978 | { | 6985 | { |
| 6979 | /* Set a small timeout. */ | 6986 | /* Set a small timeout. */ |
| 6980 | timeout.tv_sec = 1; | 6987 | timeout = make_emacs_time (1, 0); |
| 6981 | timeout.tv_usec = 0; | ||
| 6982 | FD_ZERO (&fdset); | 6988 | FD_ZERO (&fdset); |
| 6983 | FD_SET ((int)fd, &fdset); | 6989 | FD_SET ((int)fd, &fdset); |
| 6984 | 6990 | ||