chiark / gitweb /
Remove src/path
[elogind.git] / src / python-systemd / _daemon.c
index 3982e854264becf18b1b734651c1d973d627b4bc..65cfec7ce8a804d163f58871b11e535f38c7189e 100644 (file)
@@ -29,8 +29,9 @@
 #include <assert.h>
 #include <sys/socket.h>
 
-#include <systemd/sd-daemon.h>
+#include "systemd/sd-daemon.h"
 #include "pyutil.h"
+#include "macro.h"
 
 PyDoc_STRVAR(module__doc__,
         "Python interface to the libsystemd-daemon library.\n\n"
@@ -284,11 +285,9 @@ static PyMethodDef methods[] = {
         { NULL, NULL, 0, NULL }        /* Sentinel */
 };
 
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
 #if PY_MAJOR_VERSION < 3
 
+DISABLE_WARNING_MISSING_PROTOTYPES;
 PyMODINIT_FUNC init_daemon(void) {
         PyObject *m;
 
@@ -299,6 +298,7 @@ PyMODINIT_FUNC init_daemon(void) {
         PyModule_AddIntConstant(m, "LISTEN_FDS_START", SD_LISTEN_FDS_START);
         PyModule_AddStringConstant(m, "__version__", PACKAGE_VERSION);
 }
+REENABLE_WARNING;
 
 #else
 
@@ -310,6 +310,7 @@ static struct PyModuleDef module = {
         methods
 };
 
+DISABLE_WARNING_MISSING_PROTOTYPES;
 PyMODINIT_FUNC PyInit__daemon(void) {
         PyObject *m;
 
@@ -325,7 +326,6 @@ PyMODINIT_FUNC PyInit__daemon(void) {
 
         return m;
 }
+REENABLE_WARNING;
 
 #endif
-
-#pragma GCC diagnostic pop