diff options
| author | Eli Zaretskii | 2016-12-09 18:23:04 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2016-12-09 18:23:04 +0200 |
| commit | 7399f53a3706c8cb6ce27f7fe51fb5dc79e39bc1 (patch) | |
| tree | 88e4212341ca08f9da3d8c1ea71cf033c11b1324 /src | |
| parent | ae490069eafa68356405fc9719910a4c533f14ea (diff) | |
| download | emacs-7399f53a3706c8cb6ce27f7fe51fb5dc79e39bc1.tar.gz emacs-7399f53a3706c8cb6ce27f7fe51fb5dc79e39bc1.zip | |
Fix compilation warnings due to prototype of thread_select
* src/thread.h <int select_func>: Make the 5th and 6th arguments
be 'const'.
* src/process.c [WINDOWSNT]:
* src/w32proc.c: Make the 5th and 6th argument to sys_select be
'const'.
Diffstat (limited to 'src')
| -rw-r--r-- | src/process.c | 2 | ||||
| -rw-r--r-- | src/thread.h | 2 | ||||
| -rw-r--r-- | src/w32.c | 2 | ||||
| -rw-r--r-- | src/w32proc.c | 4 |
4 files changed, 5 insertions, 5 deletions
diff --git a/src/process.c b/src/process.c index 7d3cf19d57f..a60814b2386 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -138,7 +138,7 @@ static struct rlimit nofile_limit; | |||
| 138 | 138 | ||
| 139 | #ifdef WINDOWSNT | 139 | #ifdef WINDOWSNT |
| 140 | extern int sys_select (int, fd_set *, fd_set *, fd_set *, | 140 | extern int sys_select (int, fd_set *, fd_set *, fd_set *, |
| 141 | struct timespec *, sigset_t *); | 141 | const struct timespec *, const sigset_t *); |
| 142 | #endif | 142 | #endif |
| 143 | 143 | ||
| 144 | /* Work around GCC 4.3.0 bug with strict overflow checking; see | 144 | /* Work around GCC 4.3.0 bug with strict overflow checking; see |
diff --git a/src/thread.h b/src/thread.h index 64448007531..a9de754d6b4 100644 --- a/src/thread.h +++ b/src/thread.h | |||
| @@ -226,7 +226,7 @@ extern void init_threads (void); | |||
| 226 | extern void syms_of_threads (void); | 226 | extern void syms_of_threads (void); |
| 227 | 227 | ||
| 228 | typedef int select_func (int, fd_set *, fd_set *, fd_set *, | 228 | typedef int select_func (int, fd_set *, fd_set *, fd_set *, |
| 229 | struct timespec *, sigset_t *); | 229 | const struct timespec *, const sigset_t *); |
| 230 | 230 | ||
| 231 | int thread_select (select_func *func, int max_fds, fd_set *rfds, | 231 | int thread_select (select_func *func, int max_fds, fd_set *rfds, |
| 232 | fd_set *wfds, fd_set *efds, struct timespec *timeout, | 232 | fd_set *wfds, fd_set *efds, struct timespec *timeout, |
| @@ -272,7 +272,7 @@ static BOOL WINAPI revert_to_self (void); | |||
| 272 | static int sys_access (const char *, int); | 272 | static int sys_access (const char *, int); |
| 273 | extern void *e_malloc (size_t); | 273 | extern void *e_malloc (size_t); |
| 274 | extern int sys_select (int, SELECT_TYPE *, SELECT_TYPE *, SELECT_TYPE *, | 274 | extern int sys_select (int, SELECT_TYPE *, SELECT_TYPE *, SELECT_TYPE *, |
| 275 | struct timespec *, sigset_t *); | 275 | const struct timespec *, const sigset_t *); |
| 276 | extern int sys_dup (int); | 276 | extern int sys_dup (int); |
| 277 | 277 | ||
| 278 | 278 | ||
diff --git a/src/w32proc.c b/src/w32proc.c index 3ff52c37fbd..6f3a6e0efca 100644 --- a/src/w32proc.c +++ b/src/w32proc.c | |||
| @@ -72,7 +72,7 @@ extern BOOL g_b_init_compare_string_w; | |||
| 72 | extern BOOL g_b_init_debug_break_process; | 72 | extern BOOL g_b_init_debug_break_process; |
| 73 | 73 | ||
| 74 | int sys_select (int, SELECT_TYPE *, SELECT_TYPE *, SELECT_TYPE *, | 74 | int sys_select (int, SELECT_TYPE *, SELECT_TYPE *, SELECT_TYPE *, |
| 75 | struct timespec *, sigset_t *); | 75 | const struct timespec *, const sigset_t *); |
| 76 | 76 | ||
| 77 | /* Signal handlers...SIG_DFL == 0 so this is initialized correctly. */ | 77 | /* Signal handlers...SIG_DFL == 0 so this is initialized correctly. */ |
| 78 | static signal_handler sig_handlers[NSIG]; | 78 | static signal_handler sig_handlers[NSIG]; |
| @@ -2096,7 +2096,7 @@ extern int proc_buffered_char[]; | |||
| 2096 | 2096 | ||
| 2097 | int | 2097 | int |
| 2098 | sys_select (int nfds, SELECT_TYPE *rfds, SELECT_TYPE *wfds, SELECT_TYPE *efds, | 2098 | sys_select (int nfds, SELECT_TYPE *rfds, SELECT_TYPE *wfds, SELECT_TYPE *efds, |
| 2099 | struct timespec *timeout, sigset_t *ignored) | 2099 | const struct timespec *timeout, const sigset_t *ignored) |
| 2100 | { | 2100 | { |
| 2101 | SELECT_TYPE orfds, owfds; | 2101 | SELECT_TYPE orfds, owfds; |
| 2102 | DWORD timeout_ms, start_time; | 2102 | DWORD timeout_ms, start_time; |