diff options
| author | Joakim Verona | 2013-07-14 11:04:49 +0200 |
|---|---|---|
| committer | Joakim Verona | 2013-07-14 11:04:49 +0200 |
| commit | 0bb9bb0841d89fff09820a57369df4cb01b16b43 (patch) | |
| tree | 832bf9fa8415eef0ce464d22b3ee1300cfa90bb1 /src/w32.c | |
| parent | 3718127221fbbc31f8ebd027ab7c95403dbe9118 (diff) | |
| parent | 3af1c8684ed6e48fbc21481d129e9aa164752c6e (diff) | |
| download | emacs-0bb9bb0841d89fff09820a57369df4cb01b16b43.tar.gz emacs-0bb9bb0841d89fff09820a57369df4cb01b16b43.zip | |
Merge branch 'trunk' into xwidget
Conflicts:
src/xdisp.c
Diffstat (limited to 'src/w32.c')
| -rw-r--r-- | src/w32.c | 15 |
1 files changed, 12 insertions, 3 deletions
| @@ -234,6 +234,8 @@ extern int sys_access (const char *, int); | |||
| 234 | extern void *e_malloc (size_t); | 234 | extern void *e_malloc (size_t); |
| 235 | extern int sys_select (int, SELECT_TYPE *, SELECT_TYPE *, SELECT_TYPE *, | 235 | extern int sys_select (int, SELECT_TYPE *, SELECT_TYPE *, SELECT_TYPE *, |
| 236 | EMACS_TIME *, void *); | 236 | EMACS_TIME *, void *); |
| 237 | extern int sys_dup (int); | ||
| 238 | |||
| 237 | 239 | ||
| 238 | 240 | ||
| 239 | 241 | ||
| @@ -6719,10 +6721,16 @@ sys_sendto (int s, const char * buf, int len, int flags, | |||
| 6719 | } | 6721 | } |
| 6720 | 6722 | ||
| 6721 | /* Windows does not have an fcntl function. Provide an implementation | 6723 | /* Windows does not have an fcntl function. Provide an implementation |
| 6722 | solely for making sockets non-blocking. */ | 6724 | good enough for Emacs. */ |
| 6723 | int | 6725 | int |
| 6724 | fcntl (int s, int cmd, int options) | 6726 | fcntl (int s, int cmd, int options) |
| 6725 | { | 6727 | { |
| 6728 | /* In the w32 Emacs port, fcntl (fd, F_DUPFD_CLOEXEC, fd1) is always | ||
| 6729 | invoked in a context where fd1 is closed and all descriptors less | ||
| 6730 | than fd1 are open, so sys_dup is an adequate implementation. */ | ||
| 6731 | if (cmd == F_DUPFD_CLOEXEC) | ||
| 6732 | return sys_dup (s); | ||
| 6733 | |||
| 6726 | if (winsock_lib == NULL) | 6734 | if (winsock_lib == NULL) |
| 6727 | { | 6735 | { |
| 6728 | errno = ENETDOWN; | 6736 | errno = ENETDOWN; |
| @@ -6864,13 +6872,14 @@ sys_dup2 (int src, int dst) | |||
| 6864 | return rc; | 6872 | return rc; |
| 6865 | } | 6873 | } |
| 6866 | 6874 | ||
| 6867 | /* Unix pipe() has only one arg */ | ||
| 6868 | int | 6875 | int |
| 6869 | sys_pipe (int * phandles) | 6876 | pipe2 (int * phandles, int pipe2_flags) |
| 6870 | { | 6877 | { |
| 6871 | int rc; | 6878 | int rc; |
| 6872 | unsigned flags; | 6879 | unsigned flags; |
| 6873 | 6880 | ||
| 6881 | eassert (pipe2_flags == O_CLOEXEC); | ||
| 6882 | |||
| 6874 | /* make pipe handles non-inheritable; when we spawn a child, we | 6883 | /* make pipe handles non-inheritable; when we spawn a child, we |
| 6875 | replace the relevant handle with an inheritable one. Also put | 6884 | replace the relevant handle with an inheritable one. Also put |
| 6876 | pipes into binary mode; we will do text mode translation ourselves | 6885 | pipes into binary mode; we will do text mode translation ourselves |