diff options
| author | Eli Zaretskii | 2012-11-24 18:02:07 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2012-11-24 18:02:07 +0200 |
| commit | 9e821c83d328207d418ade2a5fb36168dd0fa9c6 (patch) | |
| tree | 113be2961dc1c1082216b8ca578ad02aee2a21aa /nt | |
| parent | bc9ce0d9c9e5c49737685523c2ac172f90c9e5f7 (diff) | |
| download | emacs-9e821c83d328207d418ade2a5fb36168dd0fa9c6.tar.gz emacs-9e821c83d328207d418ade2a5fb36168dd0fa9c6.zip | |
Fixed configure.ac and headers in nt/inc. Emulated functions not handled yet.
Diffstat (limited to 'nt')
| -rw-r--r-- | nt/inc/sys/socket.h | 12 | ||||
| -rw-r--r-- | nt/inc/sys/time.h | 11 | ||||
| -rw-r--r-- | nt/inc/unistd.h | 3 |
3 files changed, 22 insertions, 4 deletions
diff --git a/nt/inc/sys/socket.h b/nt/inc/sys/socket.h index 95fee4c4659..1c8be6c452f 100644 --- a/nt/inc/sys/socket.h +++ b/nt/inc/sys/socket.h | |||
| @@ -43,8 +43,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 43 | #undef FD_ZERO | 43 | #undef FD_ZERO |
| 44 | #endif | 44 | #endif |
| 45 | 45 | ||
| 46 | /* avoid duplicate definition of timeval */ | 46 | /* Avoid duplicate definition of timeval. MinGW uses _TIMEVAL_DEFINED |
| 47 | #ifdef HAVE_TIMEVAL | 47 | in sys/time.h to avoid that. */ |
| 48 | #if defined (HAVE_TIMEVAL) && defined (_MSC_VER) | ||
| 48 | #define timeval ws_timeval | 49 | #define timeval ws_timeval |
| 49 | #endif | 50 | #endif |
| 50 | 51 | ||
| @@ -62,7 +63,9 @@ typedef unsigned short uint16_t; | |||
| 62 | #undef MUST_REDEF_SELECT | 63 | #undef MUST_REDEF_SELECT |
| 63 | #endif | 64 | #endif |
| 64 | 65 | ||
| 65 | /* revert to our version of FD_SET */ | 66 | /* Revert to our version of FD_SET, but not when included from test |
| 67 | programs run by configure. */ | ||
| 68 | #ifdef EMACS_CONFIG_H | ||
| 66 | #undef FD_SET | 69 | #undef FD_SET |
| 67 | #undef FD_CLR | 70 | #undef FD_CLR |
| 68 | #undef FD_ISSET | 71 | #undef FD_ISSET |
| @@ -71,8 +74,9 @@ typedef unsigned short uint16_t; | |||
| 71 | /* allow us to provide our own version of fd_set */ | 74 | /* allow us to provide our own version of fd_set */ |
| 72 | #define fd_set ws_fd_set | 75 | #define fd_set ws_fd_set |
| 73 | #include "w32.h" | 76 | #include "w32.h" |
| 77 | #endif /* EMACS_CONFIG_H */ | ||
| 74 | 78 | ||
| 75 | #ifdef HAVE_TIMEVAL | 79 | #if defined (HAVE_TIMEVAL) && defined (_MSC_VER) |
| 76 | #undef timeval | 80 | #undef timeval |
| 77 | #endif | 81 | #endif |
| 78 | 82 | ||
diff --git a/nt/inc/sys/time.h b/nt/inc/sys/time.h index c12c194fd2a..2d2c3abe222 100644 --- a/nt/inc/sys/time.h +++ b/nt/inc/sys/time.h | |||
| @@ -6,11 +6,22 @@ | |||
| 6 | * have the below stuff. | 6 | * have the below stuff. |
| 7 | */ | 7 | */ |
| 8 | 8 | ||
| 9 | /* Allow inclusion of sys/time.h and winsock2.h in any order. Needed | ||
| 10 | for running the configure test, which is only relevant to MinGW. */ | ||
| 11 | #ifndef _TIMEVAL_DEFINED | ||
| 12 | #define _TIMEVAL_DEFINED | ||
| 9 | struct timeval | 13 | struct timeval |
| 10 | { | 14 | { |
| 11 | long tv_sec; /* seconds */ | 15 | long tv_sec; /* seconds */ |
| 12 | long tv_usec; /* microseconds */ | 16 | long tv_usec; /* microseconds */ |
| 13 | }; | 17 | }; |
| 18 | #define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec) | ||
| 19 | #define timercmp(tvp, uvp, cmp) \ | ||
| 20 | (((tvp)->tv_sec != (uvp)->tv_sec) ? \ | ||
| 21 | ((tvp)->tv_sec cmp (uvp)->tv_sec) : \ | ||
| 22 | ((tvp)->tv_usec cmp (uvp)->tv_usec)) | ||
| 23 | #define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0 | ||
| 24 | #endif /* _TIMEVAL_DEFINED */ | ||
| 14 | 25 | ||
| 15 | struct timezone | 26 | struct timezone |
| 16 | { | 27 | { |
diff --git a/nt/inc/unistd.h b/nt/inc/unistd.h index e751ed124d3..b75e7d7d6bf 100644 --- a/nt/inc/unistd.h +++ b/nt/inc/unistd.h | |||
| @@ -3,6 +3,9 @@ | |||
| 3 | #ifndef _UNISTD_H | 3 | #ifndef _UNISTD_H |
| 4 | #define _UNISTD_H | 4 | #define _UNISTD_H |
| 5 | 5 | ||
| 6 | #include <sys/types.h> | ||
| 7 | #include <pwd.h> | ||
| 8 | |||
| 6 | /* On Microsoft platforms, <stdlib.h> declares 'environ'; on POSIX | 9 | /* On Microsoft platforms, <stdlib.h> declares 'environ'; on POSIX |
| 7 | platforms, <unistd.h> does. Every file in Emacs that includes | 10 | platforms, <unistd.h> does. Every file in Emacs that includes |
| 8 | <unistd.h> also includes <stdlib.h>, so there's no need to declare | 11 | <unistd.h> also includes <stdlib.h>, so there's no need to declare |