diff options
| author | Glenn Morris | 2012-08-10 14:23:45 -0400 |
|---|---|---|
| committer | Glenn Morris | 2012-08-10 14:23:45 -0400 |
| commit | 25e65510a3d35524ade205c3114970c43dc6ae05 (patch) | |
| tree | d7a273c6b8cc4fbecaaae8d237950d26acaf8d66 | |
| parent | 1530c98e56d331a21ba7ef2c940d1441442ac798 (diff) | |
| download | emacs-25e65510a3d35524ade205c3114970c43dc6ae05.tar.gz emacs-25e65510a3d35524ade205c3114970c43dc6ae05.zip | |
Move IF_LINT from lisp.h to conf_post.h
* src/conf_post.h (IF_LINT, lint_assume): Move here from lisp.h.
* src/lisp.h (IF_LINT, lint_assume): Move to conf_post.h.
* lib-src/make-docfile.c (IF_LINT):
* lib-src/emacsclient.c (IF_LINT): Remove (in config.h now).
| -rw-r--r-- | lib-src/ChangeLog | 3 | ||||
| -rw-r--r-- | lib-src/emacsclient.c | 7 | ||||
| -rw-r--r-- | lib-src/make-docfile.c | 7 | ||||
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/conf_post.h | 12 | ||||
| -rw-r--r-- | src/lisp.h | 15 |
6 files changed, 20 insertions, 29 deletions
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index f3946f1f6c9..98a7b2529b9 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2012-08-10 Glenn Morris <rgm@gnu.org> | 1 | 2012-08-10 Glenn Morris <rgm@gnu.org> |
| 2 | 2 | ||
| 3 | * make-docfile.c (IF_LINT): | ||
| 4 | * emacsclient.c (IF_LINT): Remove (in config.h now). | ||
| 5 | |||
| 3 | * make-docfile.c (main): | 6 | * make-docfile.c (main): |
| 4 | (fopen) [!WINDOWSNT]: | 7 | (fopen) [!WINDOWSNT]: |
| 5 | (chdir) [!DOS_NT]: No more need to undef. | 8 | (chdir) [!DOS_NT]: No more need to undef. |
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c index ef9bc9c6afd..20afe1cad11 100644 --- a/lib-src/emacsclient.c +++ b/lib-src/emacsclient.c | |||
| @@ -113,13 +113,6 @@ char *(getcwd) (char *, size_t); | |||
| 113 | /* Additional space when allocating buffers for filenames, etc. */ | 113 | /* Additional space when allocating buffers for filenames, etc. */ |
| 114 | #define EXTRA_SPACE 100 | 114 | #define EXTRA_SPACE 100 |
| 115 | 115 | ||
| 116 | /* Use this to suppress gcc's `...may be used before initialized' warnings. */ | ||
| 117 | #ifdef lint | ||
| 118 | # define IF_LINT(Code) Code | ||
| 119 | #else | ||
| 120 | # define IF_LINT(Code) /* empty */ | ||
| 121 | #endif | ||
| 122 | |||
| 123 | #ifdef min | 116 | #ifdef min |
| 124 | #undef min | 117 | #undef min |
| 125 | #endif | 118 | #endif |
diff --git a/lib-src/make-docfile.c b/lib-src/make-docfile.c index 627f4639aaa..dafb7c0afd9 100644 --- a/lib-src/make-docfile.c +++ b/lib-src/make-docfile.c | |||
| @@ -63,13 +63,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 63 | #define READ_BINARY "r" | 63 | #define READ_BINARY "r" |
| 64 | #endif /* not DOS_NT */ | 64 | #endif /* not DOS_NT */ |
| 65 | 65 | ||
| 66 | /* Use this to suppress gcc's `...may be used before initialized' warnings. */ | ||
| 67 | #ifdef lint | ||
| 68 | # define IF_LINT(Code) Code | ||
| 69 | #else | ||
| 70 | # define IF_LINT(Code) /* empty */ | ||
| 71 | #endif | ||
| 72 | |||
| 73 | static int scan_file (char *filename); | 66 | static int scan_file (char *filename); |
| 74 | static int scan_lisp_file (const char *filename, const char *mode); | 67 | static int scan_lisp_file (const char *filename, const char *mode); |
| 75 | static int scan_c_file (char *filename, const char *mode); | 68 | static int scan_c_file (char *filename, const char *mode); |
diff --git a/src/ChangeLog b/src/ChangeLog index 82b761a29c0..3b88f5c94e9 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2012-08-10 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * conf_post.h (IF_LINT, lint_assume): Move here from lisp.h. | ||
| 4 | * lisp.h (IF_LINT, lint_assume): Move to conf_post.h. | ||
| 5 | |||
| 1 | 2012-08-10 Dmitry Antipov <dmantipov@yandex.ru> | 6 | 2012-08-10 Dmitry Antipov <dmantipov@yandex.ru> |
| 2 | 7 | ||
| 3 | Fix last change to allow compilation with low optimization levels. | 8 | Fix last change to allow compilation with low optimization levels. |
diff --git a/src/conf_post.h b/src/conf_post.h index e935940e54a..ead7298e98d 100644 --- a/src/conf_post.h +++ b/src/conf_post.h | |||
| @@ -218,4 +218,16 @@ You lose; /* Emacs for DOS must be compiled with DJGPP */ | |||
| 218 | #define INLINE_HEADER_BEGIN _GL_INLINE_HEADER_BEGIN | 218 | #define INLINE_HEADER_BEGIN _GL_INLINE_HEADER_BEGIN |
| 219 | #define INLINE_HEADER_END _GL_INLINE_HEADER_END | 219 | #define INLINE_HEADER_END _GL_INLINE_HEADER_END |
| 220 | 220 | ||
| 221 | /* Use this to suppress gcc's `...may be used before initialized' warnings. */ | ||
| 222 | #ifdef lint | ||
| 223 | /* Use CODE only if lint checking is in effect. */ | ||
| 224 | # define IF_LINT(Code) Code | ||
| 225 | /* Assume that the expression COND is true. This differs in intent | ||
| 226 | from 'assert', as it is a message from the programmer to the compiler. */ | ||
| 227 | # define lint_assume(cond) ((cond) ? (void) 0 : abort ()) | ||
| 228 | #else | ||
| 229 | # define IF_LINT(Code) /* empty */ | ||
| 230 | # define lint_assume(cond) ((void) (0 && (cond))) | ||
| 231 | #endif | ||
| 232 | |||
| 221 | /* conf_post.h ends here */ | 233 | /* conf_post.h ends here */ |
diff --git a/src/lisp.h b/src/lisp.h index e23093f56c9..3dbea6e0f72 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -3418,21 +3418,6 @@ extern char *egetenv (const char *); | |||
| 3418 | /* Set up the name of the machine we're running on. */ | 3418 | /* Set up the name of the machine we're running on. */ |
| 3419 | extern void init_system_name (void); | 3419 | extern void init_system_name (void); |
| 3420 | 3420 | ||
| 3421 | /* Use this to suppress gcc's warnings. */ | ||
| 3422 | #ifdef lint | ||
| 3423 | |||
| 3424 | /* Use CODE only if lint checking is in effect. */ | ||
| 3425 | # define IF_LINT(Code) Code | ||
| 3426 | |||
| 3427 | /* Assume that the expression COND is true. This differs in intent | ||
| 3428 | from 'assert', as it is a message from the programmer to the compiler. */ | ||
| 3429 | # define lint_assume(cond) ((cond) ? (void) 0 : abort ()) | ||
| 3430 | |||
| 3431 | #else | ||
| 3432 | # define IF_LINT(Code) /* empty */ | ||
| 3433 | # define lint_assume(cond) ((void) (0 && (cond))) | ||
| 3434 | #endif | ||
| 3435 | |||
| 3436 | /* We used to use `abs', but that clashes with system headers on some | 3421 | /* We used to use `abs', but that clashes with system headers on some |
| 3437 | platforms, and using a name reserved by Standard C is a bad idea | 3422 | platforms, and using a name reserved by Standard C is a bad idea |
| 3438 | anyway. */ | 3423 | anyway. */ |