File tree Expand file tree Collapse file tree 8 files changed +15
-28
lines changed Expand file tree Collapse file tree 8 files changed +15
-28
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ python_dep = python.dependency()
1616libsystemd_dep = dependency (' libsystemd' )
1717
1818add_project_arguments (
19+ ' -D_GNU_SOURCE=1' ,
1920 ' -DPACKAGE_VERSION="@0@"' .format(meson .project_version()),
2021 ' -DLIBSYSTEMD_VERSION=@0@' .format(libsystemd_dep.version()),
2122 language : ' c' ,
Original file line number Diff line number Diff line change 11/* SPDX-License-Identifier: LGPL-2.1-or-later */
22
3- #include <Python.h>
4-
53#include <alloca.h>
64
75#define SD_JOURNAL_SUPPRESS_LOCATION
86#include "systemd/sd-journal.h"
97
108#include "macro.h"
9+ #include "pyutil.h"
1110
1211PyDoc_STRVAR (journal_sendv__doc__ ,
1312 "sendv('FIELD=value', 'FIELD=value', ...) -> None\n\n"
Original file line number Diff line number Diff line change 11/* SPDX-License-Identifier: LGPL-2.1-or-later */
22
3- #define PY_SSIZE_T_CLEAN
4- #pragma GCC diagnostic push
5- #pragma GCC diagnostic ignored "-Wredundant-decls"
6- #include <Python.h>
7- #pragma GCC diagnostic pop
8-
9- #include <structmember.h>
10- #include <datetime.h>
11- #include <time.h>
12- #include <stdio.h>
133#include <stdbool.h>
14-
15- #include "systemd/sd-journal.h"
4+ #include <stdio.h>
5+ #include <string.h>
6+ #include <time.h>
7+ #include <systemd/sd-journal.h>
168
179#include "pyutil.h"
1810#include "macro.h"
1911#include "strv.h"
2012
13+ /* This needs to be below Python.h include for some reason */
14+ #include <datetime.h>
15+
2116#if defined(LIBSYSTEMD_VERSION ) || LIBSYSTEMD_JOURNAL_VERSION > 204
2217# define HAVE_JOURNAL_OPEN_FILES 1
2318#else
Original file line number Diff line number Diff line change 11/* SPDX-License-Identifier: LGPL-2.1-or-later */
22
3- #include <Python.h>
4-
53/* Our include is first, so that our defines are replaced by the ones
64 * from the system header. If the system header has the same definitions
75 * (or does not have them at all), this replacement is silent. If the
1210#include "id128-defines.h"
1311#include <systemd/sd-messages.h>
1412
15- #include "pyutil.h"
1613#include "macro.h"
14+ #include "pyutil.h"
1715
1816#define HAVE_SD_ID128_GET_MACHINE_APP_SPECIFIC (LIBSYSTEMD_VERSION >= 240)
1917
Original file line number Diff line number Diff line change 11/* SPDX-License-Identifier: LGPL-2.1-or-later */
22
3- #define PY_SSIZE_T_CLEAN
4- #pragma GCC diagnostic push
5- #pragma GCC diagnostic ignored "-Wredundant-decls"
6- #include <Python.h>
7- #pragma GCC diagnostic pop
3+ #include <systemd/sd-login.h>
84
9- #include "systemd/sd-login.h"
105#include "pyutil.h"
116#include "strv.h"
127
Original file line number Diff line number Diff line change 22
33#pragma once
44
5+ #include <stdlib.h>
6+
57#define DISABLE_WARNING_MISSING_PROTOTYPES \
68 _Pragma("GCC diagnostic push"); \
79 _Pragma("GCC diagnostic ignored \"-Wmissing-prototypes\"")
Original file line number Diff line number Diff line change 11/* SPDX-License-Identifier: LGPL-2.1-or-later */
22
3- #include <Python.h>
43#include "pyutil.h"
54
65void cleanup_Py_DECREFp (PyObject * * p ) {
Original file line number Diff line number Diff line change 22
33#pragma once
44
5- #ifndef Py_TYPE
6- /* avoid duplication warnings from errors in Python 2.7 headers */
7- # include <Python.h>
8- #endif
5+ #define PY_SSIZE_T_CLEAN
6+ #include <Python.h>
97
108void cleanup_Py_DECREFp (PyObject * * p );
119PyObject * absolute_timeout (uint64_t t );
You can’t perform that action at this time.
0 commit comments