diff options
| author | Glenn Morris | 2012-07-31 21:43:08 -0400 |
|---|---|---|
| committer | Glenn Morris | 2012-07-31 21:43:08 -0400 |
| commit | 5c0c0e8a1a3eeb60e58e9dc4b043a8db3e72ca3e (patch) | |
| tree | ba7f87ad74ff21e06e5c17cffcfacfefe4b68113 | |
| parent | 552a99b4cb5474337048053c2e7f0dd9eef9b1cb (diff) | |
| download | emacs-5c0c0e8a1a3eeb60e58e9dc4b043a8db3e72ca3e.tar.gz emacs-5c0c0e8a1a3eeb60e58e9dc4b043a8db3e72ca3e.zip | |
Move definitions of directory and device separators to configure
* configure.ac (DEVICE_SEP, IS_DEVICE_SEP, IS_DIRECTORY_SEP, IS_ANY_SEP):
Move here from src/lisp.h.
* src/lisp.h (IS_DIRECTORY_SEP, IS_DEVICE_SEP, IS_ANY_SEP):
Move to configure.ac.
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | configure.ac | 14 | ||||
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/lisp.h | 17 |
4 files changed, 24 insertions, 17 deletions
| @@ -1,3 +1,8 @@ | |||
| 1 | 2012-08-01 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * configure.ac (DEVICE_SEP, IS_DEVICE_SEP, IS_DIRECTORY_SEP) | ||
| 4 | (IS_ANY_SEP): Move here from src/lisp.h. | ||
| 5 | |||
| 1 | 2012-08-01 Juanma Barranquero <lekktu@gmail.com> | 6 | 2012-08-01 Juanma Barranquero <lekktu@gmail.com> |
| 2 | 7 | ||
| 3 | * lib/makefile.w32-in (CONFIG_H): Update dependencies. | 8 | * lib/makefile.w32-in (CONFIG_H): Update dependencies. |
diff --git a/configure.ac b/configure.ac index cf4e0540d2f..27aba36e744 100644 --- a/configure.ac +++ b/configure.ac | |||
| @@ -3158,6 +3158,20 @@ AC_DEFINE(subprocesses, 1, [Define to enable asynchronous subprocesses.]) | |||
| 3158 | AC_DEFINE(USER_FULL_NAME, [pw->pw_gecos], [How to get a user's full name.]) | 3158 | AC_DEFINE(USER_FULL_NAME, [pw->pw_gecos], [How to get a user's full name.]) |
| 3159 | 3159 | ||
| 3160 | 3160 | ||
| 3161 | dnl Only used on MS platforms. | ||
| 3162 | AH_TEMPLATE(DEVICE_SEP, [Character that separates a device in a file name.]) | ||
| 3163 | |||
| 3164 | AC_DEFINE(IS_DEVICE_SEP(_c_), 0, | ||
| 3165 | [Returns true if character is a device separator.]) | ||
| 3166 | |||
| 3167 | AC_DEFINE(IS_DIRECTORY_SEP(_c_), [((_c_) == DIRECTORY_SEP)], | ||
| 3168 | [Returns true if character is a directory separator.]) | ||
| 3169 | |||
| 3170 | dnl On MS, this also accepts IS_DEVICE_SEP. | ||
| 3171 | AC_DEFINE(IS_ANY_SEP(_c_), [(IS_DIRECTORY_SEP (_c_))], | ||
| 3172 | [Returns true if character is any form of separator.]) | ||
| 3173 | |||
| 3174 | |||
| 3161 | AH_TEMPLATE(NO_EDITRES, [Define if XEditRes should not be used.]) | 3175 | AH_TEMPLATE(NO_EDITRES, [Define if XEditRes should not be used.]) |
| 3162 | 3176 | ||
| 3163 | case $opsys in | 3177 | case $opsys in |
diff --git a/src/ChangeLog b/src/ChangeLog index bf172320eed..c810675c4a4 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2012-08-01 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * lisp.h (IS_DIRECTORY_SEP, IS_DEVICE_SEP, IS_ANY_SEP): | ||
| 4 | Move to configure.ac. | ||
| 5 | |||
| 1 | 2012-08-01 Juanma Barranquero <lekktu@gmail.com> | 6 | 2012-08-01 Juanma Barranquero <lekktu@gmail.com> |
| 2 | 7 | ||
| 3 | * makefile.w32-in (CONFIG_H): Update dependencies. | 8 | * makefile.w32-in (CONFIG_H): Update dependencies. |
diff --git a/src/lisp.h b/src/lisp.h index 147a4781937..55f8677f9a5 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -3305,24 +3305,7 @@ extern char *egetenv (const char *); | |||
| 3305 | /* Set up the name of the machine we're running on. */ | 3305 | /* Set up the name of the machine we're running on. */ |
| 3306 | extern void init_system_name (void); | 3306 | extern void init_system_name (void); |
| 3307 | 3307 | ||
| 3308 | /* Some systems (e.g., NT) use a different path separator than Unix, | ||
| 3309 | in addition to a device separator. Set the path separator | ||
| 3310 | to '/', and don't test for a device separator in IS_ANY_SEP. */ | ||
| 3311 | |||
| 3312 | static char const DIRECTORY_SEP = '/'; | 3308 | static char const DIRECTORY_SEP = '/'; |
| 3313 | #ifndef IS_DIRECTORY_SEP | ||
| 3314 | #define IS_DIRECTORY_SEP(_c_) ((_c_) == DIRECTORY_SEP) | ||
| 3315 | #endif | ||
| 3316 | #ifndef IS_DEVICE_SEP | ||
| 3317 | #ifndef DEVICE_SEP | ||
| 3318 | #define IS_DEVICE_SEP(_c_) 0 | ||
| 3319 | #else | ||
| 3320 | #define IS_DEVICE_SEP(_c_) ((_c_) == DEVICE_SEP) | ||
| 3321 | #endif | ||
| 3322 | #endif | ||
| 3323 | #ifndef IS_ANY_SEP | ||
| 3324 | #define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_)) | ||
| 3325 | #endif | ||
| 3326 | 3309 | ||
| 3327 | /* Use this to suppress gcc's warnings. */ | 3310 | /* Use this to suppress gcc's warnings. */ |
| 3328 | #ifdef lint | 3311 | #ifdef lint |