From: Glenn Morris Date: Fri, 10 Aug 2012 18:23:45 +0000 (-0400) Subject: Move IF_LINT from lisp.h to conf_post.h X-Git-Tag: emacs-24.2.90~733 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=25e65510a3d35524ade205c3114970c43dc6ae05;p=emacs.git 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). --- 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 @@ 2012-08-10 Glenn Morris + * make-docfile.c (IF_LINT): + * emacsclient.c (IF_LINT): Remove (in config.h now). + * make-docfile.c (main): (fopen) [!WINDOWSNT]: (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); /* Additional space when allocating buffers for filenames, etc. */ #define EXTRA_SPACE 100 -/* Use this to suppress gcc's `...may be used before initialized' warnings. */ -#ifdef lint -# define IF_LINT(Code) Code -#else -# define IF_LINT(Code) /* empty */ -#endif - #ifdef min #undef min #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 . */ #define READ_BINARY "r" #endif /* not DOS_NT */ -/* Use this to suppress gcc's `...may be used before initialized' warnings. */ -#ifdef lint -# define IF_LINT(Code) Code -#else -# define IF_LINT(Code) /* empty */ -#endif - static int scan_file (char *filename); static int scan_lisp_file (const char *filename, const char *mode); 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 @@ +2012-08-10 Glenn Morris + + * conf_post.h (IF_LINT, lint_assume): Move here from lisp.h. + * lisp.h (IF_LINT, lint_assume): Move to conf_post.h. + 2012-08-10 Dmitry Antipov 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 */ #define INLINE_HEADER_BEGIN _GL_INLINE_HEADER_BEGIN #define INLINE_HEADER_END _GL_INLINE_HEADER_END +/* Use this to suppress gcc's `...may be used before initialized' warnings. */ +#ifdef lint +/* Use CODE only if lint checking is in effect. */ +# define IF_LINT(Code) Code +/* Assume that the expression COND is true. This differs in intent + from 'assert', as it is a message from the programmer to the compiler. */ +# define lint_assume(cond) ((cond) ? (void) 0 : abort ()) +#else +# define IF_LINT(Code) /* empty */ +# define lint_assume(cond) ((void) (0 && (cond))) +#endif + /* 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 *); /* Set up the name of the machine we're running on. */ extern void init_system_name (void); -/* Use this to suppress gcc's warnings. */ -#ifdef lint - -/* Use CODE only if lint checking is in effect. */ -# define IF_LINT(Code) Code - -/* Assume that the expression COND is true. This differs in intent - from 'assert', as it is a message from the programmer to the compiler. */ -# define lint_assume(cond) ((cond) ? (void) 0 : abort ()) - -#else -# define IF_LINT(Code) /* empty */ -# define lint_assume(cond) ((void) (0 && (cond))) -#endif - /* We used to use `abs', but that clashes with system headers on some platforms, and using a name reserved by Standard C is a bad idea anyway. */