summaryrefslogtreecommitdiffstats
path: root/lib/libalpm
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2011-12-17 21:42:35 -0500
committerDan McGee <dan@archlinux.org>2011-12-21 18:13:17 -0600
commitd6ccd4439044978a6dcc01b8c1ab880b6164f9d1 (patch)
treeba8360f6e0177fa9ad13d1b794a21cae00bdbc01 /lib/libalpm
parent6c1426842af7de1343b8360e2d0ca52846ea4a2f (diff)
downloadpacman-d6ccd4439044978a6dcc01b8c1ab880b6164f9d1.tar.xz
include config.h via Makefiles
Ensures that config.h is always ordered correctly (first) in the includes. Also means that new source files get this for free without having to remember to add it. We opt for -imacros over -include as its more portable, and the added constraint by -imacros doesn't bother us for config.h. This also touches the HACKING file to remove the explicit mention of config.h as part of the includes. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm')
-rw-r--r--lib/libalpm/Makefile.am3
-rw-r--r--lib/libalpm/add.c2
-rw-r--r--lib/libalpm/alpm.c2
-rw-r--r--lib/libalpm/backup.c2
-rw-r--r--lib/libalpm/be_local.c2
-rw-r--r--lib/libalpm/be_package.c2
-rw-r--r--lib/libalpm/be_sync.c2
-rw-r--r--lib/libalpm/conflict.c2
-rw-r--r--lib/libalpm/db.c2
-rw-r--r--lib/libalpm/delta.c2
-rw-r--r--lib/libalpm/delta.h2
-rw-r--r--lib/libalpm/deps.c2
-rw-r--r--lib/libalpm/diskspace.c2
-rw-r--r--lib/libalpm/dload.c2
-rw-r--r--lib/libalpm/error.c2
-rw-r--r--lib/libalpm/graph.c2
-rw-r--r--lib/libalpm/graph.h2
-rw-r--r--lib/libalpm/group.c2
-rw-r--r--lib/libalpm/handle.c2
-rw-r--r--lib/libalpm/log.c2
-rw-r--r--lib/libalpm/package.c2
-rw-r--r--lib/libalpm/package.h2
-rw-r--r--lib/libalpm/remove.c2
-rw-r--r--lib/libalpm/signing.c2
-rw-r--r--lib/libalpm/sync.c2
-rw-r--r--lib/libalpm/trans.c2
-rw-r--r--lib/libalpm/util.c2
-rw-r--r--lib/libalpm/util.h2
-rw-r--r--lib/libalpm/version.c2
29 files changed, 3 insertions, 56 deletions
diff --git a/lib/libalpm/Makefile.am b/lib/libalpm/Makefile.am
index 99f9c1b7..61dcb877 100644
--- a/lib/libalpm/Makefile.am
+++ b/lib/libalpm/Makefile.am
@@ -7,6 +7,9 @@ include_HEADERS = alpm_list.h alpm.h
DEFS = -DLOCALEDIR=\"@localedir@\" @DEFS@
+AM_CPPFLAGS = \
+ -imacros $(top_builddir)/config.h
+
AM_CFLAGS = -pedantic -D_GNU_SOURCE
if ENABLE_VISIBILITY_CC
diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c
index 78615bb1..014990d2 100644
--- a/lib/libalpm/add.c
+++ b/lib/libalpm/add.c
@@ -18,8 +18,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "config.h"
-
#include <stdlib.h>
#include <errno.h>
#include <string.h>
diff --git a/lib/libalpm/alpm.c b/lib/libalpm/alpm.c
index e957f1aa..3f7ab4ba 100644
--- a/lib/libalpm/alpm.c
+++ b/lib/libalpm/alpm.c
@@ -21,8 +21,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "config.h"
-
#ifdef HAVE_LIBCURL
#include <curl/curl.h>
#endif
diff --git a/lib/libalpm/backup.c b/lib/libalpm/backup.c
index 728c1d05..68856deb 100644
--- a/lib/libalpm/backup.c
+++ b/lib/libalpm/backup.c
@@ -21,8 +21,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "config.h"
-
#include <stdlib.h>
#include <string.h>
diff --git a/lib/libalpm/be_local.c b/lib/libalpm/be_local.c
index 606f9e1a..2deef22c 100644
--- a/lib/libalpm/be_local.c
+++ b/lib/libalpm/be_local.c
@@ -18,8 +18,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "config.h"
-
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
diff --git a/lib/libalpm/be_package.c b/lib/libalpm/be_package.c
index 4f530e0b..41ecc75a 100644
--- a/lib/libalpm/be_package.c
+++ b/lib/libalpm/be_package.c
@@ -18,8 +18,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "config.h"
-
#include <stdlib.h>
#include <string.h>
#include <errno.h>
diff --git a/lib/libalpm/be_sync.c b/lib/libalpm/be_sync.c
index 54c4f879..abc4a997 100644
--- a/lib/libalpm/be_sync.c
+++ b/lib/libalpm/be_sync.c
@@ -18,8 +18,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "config.h"
-
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
diff --git a/lib/libalpm/conflict.c b/lib/libalpm/conflict.c
index 5703aba8..b5c55dc7 100644
--- a/lib/libalpm/conflict.c
+++ b/lib/libalpm/conflict.c
@@ -22,8 +22,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "config.h"
-
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
diff --git a/lib/libalpm/db.c b/lib/libalpm/db.c
index 7708d18f..3e534358 100644
--- a/lib/libalpm/db.c
+++ b/lib/libalpm/db.c
@@ -22,8 +22,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "config.h"
-
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/lib/libalpm/delta.c b/lib/libalpm/delta.c
index 53c83657..1272558e 100644
--- a/lib/libalpm/delta.c
+++ b/lib/libalpm/delta.c
@@ -18,8 +18,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "config.h"
-
#include <stdlib.h>
#include <string.h>
#include <stdint.h> /* intmax_t */
diff --git a/lib/libalpm/delta.h b/lib/libalpm/delta.h
index 05df4207..42353f5f 100644
--- a/lib/libalpm/delta.h
+++ b/lib/libalpm/delta.h
@@ -20,8 +20,6 @@
#ifndef _ALPM_DELTA_H
#define _ALPM_DELTA_H
-#include "config.h" /* ensure off_t is correct length */
-
#include <sys/types.h> /* off_t */
#include "alpm.h"
diff --git a/lib/libalpm/deps.c b/lib/libalpm/deps.c
index 9f7e9028..9d7e5470 100644
--- a/lib/libalpm/deps.c
+++ b/lib/libalpm/deps.c
@@ -20,8 +20,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "config.h"
-
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
diff --git a/lib/libalpm/diskspace.c b/lib/libalpm/diskspace.c
index cfd6402c..274aa676 100644
--- a/lib/libalpm/diskspace.c
+++ b/lib/libalpm/diskspace.c
@@ -17,8 +17,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "config.h"
-
#include <errno.h>
#if defined(HAVE_MNTENT_H)
#include <mntent.h>
diff --git a/lib/libalpm/dload.c b/lib/libalpm/dload.c
index bcbc8095..a3980d65 100644
--- a/lib/libalpm/dload.c
+++ b/lib/libalpm/dload.c
@@ -18,8 +18,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "config.h"
-
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
diff --git a/lib/libalpm/error.c b/lib/libalpm/error.c
index 044dec7c..528a3dcf 100644
--- a/lib/libalpm/error.c
+++ b/lib/libalpm/error.c
@@ -18,8 +18,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "config.h"
-
#ifdef HAVE_LIBCURL
#include <curl/curl.h>
#endif
diff --git a/lib/libalpm/graph.c b/lib/libalpm/graph.c
index 3a7f24b8..d080e05b 100644
--- a/lib/libalpm/graph.c
+++ b/lib/libalpm/graph.c
@@ -17,8 +17,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "config.h"
-
#include "graph.h"
#include "util.h"
#include "log.h"
diff --git a/lib/libalpm/graph.h b/lib/libalpm/graph.h
index d4d134b5..2910b7d6 100644
--- a/lib/libalpm/graph.h
+++ b/lib/libalpm/graph.h
@@ -19,8 +19,6 @@
#ifndef _ALPM_GRAPH_H
#define _ALPM_GRAPH_H
-#include "config.h" /* ensure off_t is correct length */
-
#include <sys/types.h> /* off_t */
#include "alpm_list.h"
diff --git a/lib/libalpm/group.c b/lib/libalpm/group.c
index 47458df2..8b407b26 100644
--- a/lib/libalpm/group.c
+++ b/lib/libalpm/group.c
@@ -18,8 +18,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "config.h"
-
#include <stdlib.h>
#include <string.h>
diff --git a/lib/libalpm/handle.c b/lib/libalpm/handle.c
index 01f59555..6518b7d5 100644
--- a/lib/libalpm/handle.c
+++ b/lib/libalpm/handle.c
@@ -20,8 +20,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "config.h"
-
#include <errno.h>
#include <stdlib.h>
#include <string.h>
diff --git a/lib/libalpm/log.c b/lib/libalpm/log.c
index 692ff79c..14b454e6 100644
--- a/lib/libalpm/log.c
+++ b/lib/libalpm/log.c
@@ -18,8 +18,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "config.h"
-
#include <stdio.h>
#include <stdarg.h>
#include <errno.h>
diff --git a/lib/libalpm/package.c b/lib/libalpm/package.c
index e96177a2..68fec16a 100644
--- a/lib/libalpm/package.c
+++ b/lib/libalpm/package.c
@@ -21,8 +21,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "config.h"
-
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
diff --git a/lib/libalpm/package.h b/lib/libalpm/package.h
index 82a83264..172d2f36 100644
--- a/lib/libalpm/package.h
+++ b/lib/libalpm/package.h
@@ -24,8 +24,6 @@
#ifndef _ALPM_PACKAGE_H
#define _ALPM_PACKAGE_H
-#include "config.h" /* ensure off_t is correct length */
-
#include <sys/types.h> /* off_t */
#include "alpm.h"
diff --git a/lib/libalpm/remove.c b/lib/libalpm/remove.c
index d7e06bc8..8967eff7 100644
--- a/lib/libalpm/remove.c
+++ b/lib/libalpm/remove.c
@@ -22,8 +22,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "config.h"
-
#include <stdlib.h>
#include <errno.h>
#include <string.h>
diff --git a/lib/libalpm/signing.c b/lib/libalpm/signing.c
index 0bef4451..fbb6b134 100644
--- a/lib/libalpm/signing.c
+++ b/lib/libalpm/signing.c
@@ -17,8 +17,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "config.h"
-
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c
index 0c6ec9ea..49a3f42d 100644
--- a/lib/libalpm/sync.c
+++ b/lib/libalpm/sync.c
@@ -21,8 +21,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "config.h"
-
#include <sys/types.h> /* off_t */
#include <stdlib.h>
#include <stdio.h>
diff --git a/lib/libalpm/trans.c b/lib/libalpm/trans.c
index cb97a4aa..5ceaaa70 100644
--- a/lib/libalpm/trans.c
+++ b/lib/libalpm/trans.c
@@ -21,8 +21,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "config.h"
-
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
diff --git a/lib/libalpm/util.c b/lib/libalpm/util.c
index 4eeb0cd7..b2974a48 100644
--- a/lib/libalpm/util.c
+++ b/lib/libalpm/util.c
@@ -22,8 +22,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "config.h"
-
#include <stdlib.h>
#include <unistd.h>
#include <ctype.h>
diff --git a/lib/libalpm/util.h b/lib/libalpm/util.h
index 1e192747..54e69c19 100644
--- a/lib/libalpm/util.h
+++ b/lib/libalpm/util.h
@@ -24,8 +24,6 @@
#ifndef _ALPM_UTIL_H
#define _ALPM_UTIL_H
-#include "config.h"
-
#include "alpm_list.h"
#include "alpm.h"
#include "package.h" /* alpm_pkg_t */
diff --git a/lib/libalpm/version.c b/lib/libalpm/version.c
index 6b65a413..a88b8180 100644
--- a/lib/libalpm/version.c
+++ b/lib/libalpm/version.c
@@ -15,8 +15,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "config.h"
-
#include <string.h>
#include <ctype.h>