diff options
| author | Paul Eggert | 2016-12-25 10:02:27 -0800 |
|---|---|---|
| committer | Paul Eggert | 2016-12-25 10:03:34 -0800 |
| commit | 615cec1dfe9a808141096d20c763d89ed406e64d (patch) | |
| tree | 2384a7e09648cb2d9fce82c319ac35420a84482d /src | |
| parent | f5b9c1e59653ac687806f6f84181fc3f5020e6ba (diff) | |
| download | emacs-615cec1dfe9a808141096d20c763d89ed406e64d.tar.gz emacs-615cec1dfe9a808141096d20c763d89ed406e64d.zip | |
regex.h now includes sys/types.h
* src/dired.c, src/emacs.c, src/search.c, src/syntax.c, src/thread.h:
Do not include sys/types.h; no longer needed.
* src/regex.h: Include <sys/types.h>, as that's what Gnulib and
glibc regex.h does, and POSIX has blessed this since 2008.
Diffstat (limited to 'src')
| -rw-r--r-- | src/dired.c | 1 | ||||
| -rw-r--r-- | src/emacs.c | 1 | ||||
| -rw-r--r-- | src/regex.h | 14 | ||||
| -rw-r--r-- | src/search.c | 1 | ||||
| -rw-r--r-- | src/syntax.c | 2 | ||||
| -rw-r--r-- | src/thread.h | 1 |
6 files changed, 6 insertions, 14 deletions
diff --git a/src/dired.c b/src/dired.c index e468147e8b2..702917ea704 100644 --- a/src/dired.c +++ b/src/dired.c | |||
| @@ -21,7 +21,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 21 | #include <config.h> | 21 | #include <config.h> |
| 22 | 22 | ||
| 23 | #include <stdio.h> | 23 | #include <stdio.h> |
| 24 | #include <sys/types.h> | ||
| 25 | #include <sys/stat.h> | 24 | #include <sys/stat.h> |
| 26 | 25 | ||
| 27 | #ifdef HAVE_PWD_H | 26 | #ifdef HAVE_PWD_H |
diff --git a/src/emacs.c b/src/emacs.c index dc13b15ca7b..eff3f9dcb87 100644 --- a/src/emacs.c +++ b/src/emacs.c | |||
| @@ -26,7 +26,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 26 | #include <stdio.h> | 26 | #include <stdio.h> |
| 27 | #include <stdlib.h> | 27 | #include <stdlib.h> |
| 28 | 28 | ||
| 29 | #include <sys/types.h> | ||
| 30 | #include <sys/file.h> | 29 | #include <sys/file.h> |
| 31 | #include <unistd.h> | 30 | #include <unistd.h> |
| 32 | 31 | ||
diff --git a/src/regex.h b/src/regex.h index 2d720e68f22..4219943033e 100644 --- a/src/regex.h +++ b/src/regex.h | |||
| @@ -27,14 +27,13 @@ | |||
| 27 | # error "_REGEX_RE_COMP nor _LIBC can be defined if emacs is defined." | 27 | # error "_REGEX_RE_COMP nor _LIBC can be defined if emacs is defined." |
| 28 | #endif | 28 | #endif |
| 29 | 29 | ||
| 30 | #include <sys/types.h> | ||
| 31 | |||
| 30 | /* Allow the use in C++ code. */ | 32 | /* Allow the use in C++ code. */ |
| 31 | #ifdef __cplusplus | 33 | #ifdef __cplusplus |
| 32 | extern "C" { | 34 | extern "C" { |
| 33 | #endif | 35 | #endif |
| 34 | 36 | ||
| 35 | /* POSIX says that <sys/types.h> must be included (by the caller) before | ||
| 36 | <regex.h>. */ | ||
| 37 | |||
| 38 | #if !defined _POSIX_C_SOURCE && !defined _POSIX_SOURCE && defined VMS | 37 | #if !defined _POSIX_C_SOURCE && !defined _POSIX_SOURCE && defined VMS |
| 39 | /* VMS doesn't have `size_t' in <sys/types.h>, even though POSIX says it | 38 | /* VMS doesn't have `size_t' in <sys/types.h>, even though POSIX says it |
| 40 | should be there. */ | 39 | should be there. */ |
| @@ -430,11 +429,10 @@ struct re_pattern_buffer | |||
| 430 | 429 | ||
| 431 | typedef struct re_pattern_buffer regex_t; | 430 | typedef struct re_pattern_buffer regex_t; |
| 432 | 431 | ||
| 433 | /* Type for byte offsets within the string. POSIX mandates this to be an int, | 432 | /* POSIX 1003.1-2008 requires that regoff_t be at least as wide as |
| 434 | but the Open Group has signaled its intention to change the requirement to | 433 | ptrdiff_t and ssize_t. We don't know of any hosts where ptrdiff_t |
| 435 | be that regoff_t be at least as wide as ptrdiff_t and ssize_t. Current | 434 | is wider than ssize_t, so ssize_t is safe. ptrdiff_t is not |
| 436 | gnulib sources also use ssize_t, and we need this for supporting buffers and | 435 | necessarily visible here, so use ssize_t. */ |
| 437 | strings > 2GB on 64-bit hosts. */ | ||
| 438 | typedef ssize_t regoff_t; | 436 | typedef ssize_t regoff_t; |
| 439 | 437 | ||
| 440 | 438 | ||
diff --git a/src/search.c b/src/search.c index 9d2c8cb04fd..e499109555c 100644 --- a/src/search.c +++ b/src/search.c | |||
| @@ -30,7 +30,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 30 | #include "blockinput.h" | 30 | #include "blockinput.h" |
| 31 | #include "intervals.h" | 31 | #include "intervals.h" |
| 32 | 32 | ||
| 33 | #include <sys/types.h> | ||
| 34 | #include "regex.h" | 33 | #include "regex.h" |
| 35 | 34 | ||
| 36 | #define REGEXP_CACHE_SIZE 20 | 35 | #define REGEXP_CACHE_SIZE 20 |
diff --git a/src/syntax.c b/src/syntax.c index 338dd854f22..7c15e774f05 100644 --- a/src/syntax.c +++ b/src/syntax.c | |||
| @@ -20,8 +20,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 20 | 20 | ||
| 21 | #include <config.h> | 21 | #include <config.h> |
| 22 | 22 | ||
| 23 | #include <sys/types.h> | ||
| 24 | |||
| 25 | #include "lisp.h" | 23 | #include "lisp.h" |
| 26 | #include "character.h" | 24 | #include "character.h" |
| 27 | #include "buffer.h" | 25 | #include "buffer.h" |
diff --git a/src/thread.h b/src/thread.h index 6d1af5caa9c..9472ae30512 100644 --- a/src/thread.h +++ b/src/thread.h | |||
| @@ -19,7 +19,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 19 | #ifndef THREAD_H | 19 | #ifndef THREAD_H |
| 20 | #define THREAD_H | 20 | #define THREAD_H |
| 21 | 21 | ||
| 22 | #include <sys/types.h> /* for ssize_t used by regex.h */ | ||
| 23 | #include "regex.h" | 22 | #include "regex.h" |
| 24 | 23 | ||
| 25 | #ifdef WINDOWSNT | 24 | #ifdef WINDOWSNT |