id128_la_LIBADD = \
$(PYTHON_DEVEL_LIBS) \
- libsystemd.la
+ libsystemd.la \
+ libsystemd-shared.la
_daemon_la_SOURCES = \
src/python-systemd/_daemon.c \
_daemon_la_LIBADD = \
$(PYTHON_DEVEL_LIBS) \
- libsystemd.la
+ libsystemd.la \
+ libsystemd-shared.la
_reader_la_SOURCES = \
src/python-systemd/_reader.c \
#include <systemd/sd-daemon.h>
#include "pyutil.h"
+#include "macro.h"
PyDoc_STRVAR(module__doc__,
"Python interface to the libsystemd-daemon library.\n\n"
{ 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;
PyModule_AddIntConstant(m, "LISTEN_FDS_START", SD_LISTEN_FDS_START);
PyModule_AddStringConstant(m, "__version__", PACKAGE_VERSION);
}
+REENABLE_WARNING;
#else
methods
};
+DISABLE_WARNING_MISSING_PROTOTYPES;
PyMODINIT_FUNC PyInit__daemon(void) {
PyObject *m;
return m;
}
+REENABLE_WARNING;
#endif
-
-#pragma GCC diagnostic pop
{ 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_journal(void) {
PyObject *m;
PyModule_AddStringConstant(m, "__version__", PACKAGE_VERSION);
}
+REENABLE_WARNING;
#else
methods
};
+DISABLE_WARNING_MISSING_PROTOTYPES;
PyMODINIT_FUNC PyInit__journal(void) {
PyObject *m;
return m;
}
+REENABLE_WARNING;
#endif
-
-#pragma GCC diagnostic pop
static bool initialized = false;
#endif
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
+DISABLE_WARNING_MISSING_PROTOTYPES;
PyMODINIT_FUNC
#if PY_MAJOR_VERSION >= 3
#endif
}
-#pragma GCC diagnostic pop
+REENABLE_WARNING;
#include <systemd/sd-messages.h>
#include "pyutil.h"
+#include "log.h"
+#include "util.h"
+#include "macro.h"
PyDoc_STRVAR(module__doc__,
"Python interface to the libsystemd-id128 library.\n\n"
return PyModule_AddObject(module, name, obj);
}
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
#if PY_MAJOR_VERSION < 3
+DISABLE_WARNING_MISSING_PROTOTYPES;
PyMODINIT_FUNC initid128(void) {
PyObject *m;
#undef JOINER
PyModule_AddStringConstant(m, "__version__", PACKAGE_VERSION);
}
+REENABLE_WARNING;
#else
methods
};
+DISABLE_WARNING_MISSING_PROTOTYPES;
PyMODINIT_FUNC PyInit_id128(void) {
PyObject *m;
return m;
}
+REENABLE_WARNING;
#endif
-
-#pragma GCC diagnostic pop
.tp_new = PyType_GenericNew,
};
-
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
#if PY_MAJOR_VERSION < 3
+DISABLE_WARNING_MISSING_PROTOTYPES;
PyMODINIT_FUNC initlogin(void) {
PyObject *m;
Py_INCREF(&MonitorType);
PyModule_AddObject(m, "Monitor", (PyObject *) &MonitorType);
}
+REENABLE_WARNING;
+
#else
static struct PyModuleDef module = {
methods
};
+DISABLE_WARNING_MISSING_PROTOTYPES;
PyMODINIT_FUNC PyInit_login(void) {
PyObject *m;
return m;
}
+REENABLE_WARNING;
#endif
-
-#pragma GCC diagnostic pop
_Pragma("GCC diagnostic push"); \
_Pragma("GCC diagnostic ignored \"-Wformat-nonliteral\"")
+#define DISABLE_WARNING_MISSING_PROTOTYPES \
+ _Pragma("GCC diagnostic push"); \
+ _Pragma("GCC diagnostic ignored \"-Wmissing-prototypes\"")
+
#define REENABLE_WARNING \
_Pragma("GCC diagnostic pop")