]> code.delx.au - gnu-emacs/commitdiff
Include-file tweaks for modules
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 20 Nov 2015 08:40:45 +0000 (00:40 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 20 Nov 2015 08:41:21 +0000 (00:41 -0800)
* src/dynlib.c, src/emacs-module.c: Include <config.h> first.
* src/dynlib.h: Do not include config.h.
It’s every .c file’s responsibility to include config.h first.
* src/emacs-module.c: Include emacs-module.h immediately after
config.h, to test that emacs-module.h doesn’t depend on
include files other than config.h.

src/dynlib.c
src/dynlib.h
src/emacs-module.c

index ed4f157d0fe417feeb00d918312a437ce4dc184c..1b66c4ad8e84062c0429581b7b3a0373b350dcb1 100644 (file)
@@ -24,6 +24,8 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
    If you think the abstraction is too leaky use libltdl (libtool),
    don't reinvent the wheel by fixing this one.  */
 
+#include <config.h>
+
 #include "dynlib.h"
 
 #if defined _WIN32
index bd03666b860a10ccafeb95c5f6571767bf1d6d3b..1282c4fd719147a1fa8b272c43374bc3a2184c8b 100644 (file)
@@ -20,7 +20,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #ifndef DYNLIB_H
 #define DYNLIB_H
 
-#include <config.h>
 #include <stdbool.h>
 
 typedef void *dynlib_handle_ptr;
index e885af5de8f32e1fecd52e0248b4926f7d3cda3e..25c5e019881d46f008a17b92ece8567148e47629 100644 (file)
@@ -17,14 +17,16 @@ GNU General Public License for more details.
 You should have received a copy of the GNU General Public License
 along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
+#include <config.h>
+
+#include "emacs-module.h"
+
 #include <stdbool.h>
 #include <stddef.h>
 #include <stdint.h>
 #include <stdio.h>
 
-#include <config.h>
 #include "lisp.h"
-#include "emacs-module.h"
 #include "dynlib.h"
 #include "coding.h"
 #include "verify.h"