[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-25 c69cec4: Include-file tweaks for modules
From: |
Paul Eggert |
Subject: |
[Emacs-diffs] emacs-25 c69cec4: Include-file tweaks for modules |
Date: |
Fri, 20 Nov 2015 08:41:25 +0000 |
branch: emacs-25
commit c69cec404cbc6b1570c42ca03e0cb42b410d7690
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>
Include-file tweaks for modules
* 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 | 2 ++
src/dynlib.h | 1 -
src/emacs-module.c | 6 ++++--
3 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/dynlib.c b/src/dynlib.c
index ed4f157..1b66c4a 100644
--- a/src/dynlib.c
+++ b/src/dynlib.c
@@ -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
diff --git a/src/dynlib.h b/src/dynlib.h
index bd03666..1282c4f 100644
--- a/src/dynlib.h
+++ b/src/dynlib.h
@@ -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;
diff --git a/src/emacs-module.c b/src/emacs-module.c
index e885af5..25c5e01 100644
--- a/src/emacs-module.c
+++ b/src/emacs-module.c
@@ -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"
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-25 c69cec4: Include-file tweaks for modules,
Paul Eggert <=