From: Andreas Schneider Date: Thu, 9 Nov 2023 10:35:56 +0000 (+0100) Subject: Use python.h from libreplace X-Git-Tag: samba-4.19.3~21 X-Git-Url: http://git.samba.org/?a=commitdiff_plain;h=ec5885982af6ad9d2b7330f199ddc29ed1678554;p=samba.git Use python.h from libreplace BUG: https://bugzilla.samba.org/show_bug.cgi?id=15513 Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett (cherry picked from commit 9621a3d7a6949aa833425884cd22379387738cfa) --- diff --git a/auth/credentials/pycredentials.c b/auth/credentials/pycredentials.c index bd877941a9a..3687050bde9 100644 --- a/auth/credentials/pycredentials.c +++ b/auth/credentials/pycredentials.c @@ -16,7 +16,7 @@ along with this program. If not, see . */ -#include +#include "lib/replace/system/python.h" #include "python/py3compat.h" #include "includes.h" #include "python/modules.h" diff --git a/lib/compression/pycompression.c b/lib/compression/pycompression.c index 3be3620b1cf..5c3fd82a00a 100644 --- a/lib/compression/pycompression.c +++ b/lib/compression/pycompression.c @@ -26,7 +26,7 @@ #include "includes.h" #include -#include +#include "lib/replace/system/python.h" #include "lzxpress.h" #include "lzxpress_huffman.h" diff --git a/lib/crypto/py_crypto.c b/lib/crypto/py_crypto.c index 5b3c307057a..4d89e12376f 100644 --- a/lib/crypto/py_crypto.c +++ b/lib/crypto/py_crypto.c @@ -18,7 +18,7 @@ along with this program. If not, see . */ -#include +#include "lib/replace/system/python.h" #include "includes.h" #include "python/py3compat.h" diff --git a/lib/ldb-samba/pyldb.c b/lib/ldb-samba/pyldb.c index 01ed065947a..2241abc01df 100644 --- a/lib/ldb-samba/pyldb.c +++ b/lib/ldb-samba/pyldb.c @@ -19,7 +19,7 @@ License along with this library; if not, see . */ -#include +#include "lib/replace/system/python.h" #include "python/py3compat.h" #include "includes.h" #include diff --git a/lib/ldb/pyldb.c b/lib/ldb/pyldb.c index 8981e5ea45c..a0383ab8166 100644 --- a/lib/ldb/pyldb.c +++ b/lib/ldb/pyldb.c @@ -28,7 +28,7 @@ License along with this library; if not, see . */ -#include +#include "lib/replace/system/python.h" #include "ldb_private.h" #include "ldb_handlers.h" #include "pyldb.h" diff --git a/lib/ldb/pyldb_util.c b/lib/ldb/pyldb_util.c index 665e34426bc..1256b16ddad 100644 --- a/lib/ldb/pyldb_util.c +++ b/lib/ldb/pyldb_util.c @@ -23,7 +23,7 @@ License along with this library; if not, see . */ -#include +#include "lib/replace/system/python.h" #include "ldb.h" #include "pyldb.h" diff --git a/lib/smbconf/pysmbconf.c b/lib/smbconf/pysmbconf.c index 20041d3a580..2538127b1ba 100644 --- a/lib/smbconf/pysmbconf.c +++ b/lib/smbconf/pysmbconf.c @@ -18,7 +18,7 @@ * along with this program; if not, see . */ -#include +#include "lib/replace/system/python.h" #include "includes.h" #include "python/py3compat.h" diff --git a/lib/smbconf/pysmbconf.h b/lib/smbconf/pysmbconf.h index e8c6c9998e3..1e57bfb19dd 100644 --- a/lib/smbconf/pysmbconf.h +++ b/lib/smbconf/pysmbconf.h @@ -21,7 +21,7 @@ #ifndef _PYSMBCONF_H_ #define _PYSMBCONF_H_ -#include +#include "lib/replace/system/python.h" #include "lib/smbconf/smbconf.h" typedef struct { diff --git a/lib/talloc/pytalloc.c b/lib/talloc/pytalloc.c index 9d62eed455e..f6f068108d6 100644 --- a/lib/talloc/pytalloc.c +++ b/lib/talloc/pytalloc.c @@ -21,7 +21,7 @@ License along with this library; if not, see . */ -#include +#include "lib/replace/system/python.h" #include #include #include "pytalloc_private.h" diff --git a/lib/talloc/pytalloc_util.c b/lib/talloc/pytalloc_util.c index 064957ffd6f..766938a82c8 100644 --- a/lib/talloc/pytalloc_util.c +++ b/lib/talloc/pytalloc_util.c @@ -21,7 +21,7 @@ License along with this library; if not, see . */ -#include +#include "lib/replace/system/python.h" #include "replace.h" #include #include "pytalloc.h" diff --git a/lib/talloc/test_pytalloc.c b/lib/talloc/test_pytalloc.c index aa05d8c342b..fb385852a39 100644 --- a/lib/talloc/test_pytalloc.c +++ b/lib/talloc/test_pytalloc.c @@ -26,7 +26,7 @@ License along with this library; if not, see . */ -#include +#include "lib/replace/system/python.h" #include #include diff --git a/lib/tdb/pytdb.c b/lib/tdb/pytdb.c index ed22803328c..4d75d7a9041 100644 --- a/lib/tdb/pytdb.c +++ b/lib/tdb/pytdb.c @@ -24,7 +24,7 @@ License along with this library; if not, see . */ -#include +#include "lib/replace/system/python.h" #include "replace.h" #include "system/filesys.h" diff --git a/lib/tevent/pytevent.c b/lib/tevent/pytevent.c index aa2331c1d6c..bbe29f6c693 100644 --- a/lib/tevent/pytevent.c +++ b/lib/tevent/pytevent.c @@ -22,7 +22,7 @@ License along with this library; if not, see . */ -#include +#include "lib/replace/system/python.h" #include "replace.h" #include diff --git a/libcli/nbt/pynbt.c b/libcli/nbt/pynbt.c index 0908a6bce3c..e0a72fa8451 100644 --- a/libcli/nbt/pynbt.c +++ b/libcli/nbt/pynbt.c @@ -17,7 +17,7 @@ along with this program. If not, see . */ -#include +#include "lib/replace/system/python.h" #include "includes.h" #include "python/py3compat.h" #include "libcli/util/pyerrors.h" diff --git a/libcli/security/pysecurity.c b/libcli/security/pysecurity.c index 80730485242..c7eaa91a71b 100644 --- a/libcli/security/pysecurity.c +++ b/libcli/security/pysecurity.c @@ -17,7 +17,7 @@ along with this program. If not, see . */ -#include +#include "lib/replace/system/python.h" #include "python/py3compat.h" #include "includes.h" #include "python/modules.h" diff --git a/libcli/smb/py_reparse_symlink.c b/libcli/smb/py_reparse_symlink.c index 57dc6032f99..470aab8d679 100644 --- a/libcli/smb/py_reparse_symlink.c +++ b/libcli/smb/py_reparse_symlink.c @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -#include +#include "lib/replace/system/python.h" #include "replace.h" #include "python/modules.h" #include "python/py3compat.h" diff --git a/libgpo/pygpo.c b/libgpo/pygpo.c index bf63a60522f..adbd5b4688d 100644 --- a/libgpo/pygpo.c +++ b/libgpo/pygpo.c @@ -16,7 +16,7 @@ along with this program. If not, see . */ -#include +#include "lib/replace/system/python.h" #include "includes.h" #include "version.h" #include "param/pyparam.h" diff --git a/pidl/lib/Parse/Pidl/Samba4/Python.pm b/pidl/lib/Parse/Pidl/Samba4/Python.pm index 6eb59a0557e..7867eabad92 100644 --- a/pidl/lib/Parse/Pidl/Samba4/Python.pm +++ b/pidl/lib/Parse/Pidl/Samba4/Python.pm @@ -2293,7 +2293,7 @@ sub Parse($$$$$) $self->pidl_hdr(" /* Python wrapper functions auto-generated by pidl */ #define PY_SSIZE_T_CLEAN 1 /* We use Py_ssize_t for PyArg_ParseTupleAndKeywords */ -#include +#include \"lib/replace/system/python.h\" #include \"python/py3compat.h\" #include \"includes.h\" #include \"python/modules.h\" diff --git a/python/modules.c b/python/modules.c index ca563ff07d2..577eb552750 100644 --- a/python/modules.c +++ b/python/modules.c @@ -17,7 +17,7 @@ along with this program. If not, see . */ -#include +#include "lib/replace/system/python.h" #include "py3compat.h" #include "includes.h" #include "python/modules.h" diff --git a/python/py3compat.h b/python/py3compat.h index 01108214783..bfee82f92b3 100644 --- a/python/py3compat.h +++ b/python/py3compat.h @@ -19,7 +19,7 @@ #ifndef _SAMBA_PY3COMPAT_H_ #define _SAMBA_PY3COMPAT_H_ -#include +#include "lib/replace/system/python.h" /* Quick docs: * Syntax for module initialization is as in Python 3, except the entrypoint diff --git a/python/pyglue.c b/python/pyglue.c index 901a9a37be5..b35b2d21104 100644 --- a/python/pyglue.c +++ b/python/pyglue.c @@ -17,7 +17,7 @@ along with this program. If not, see . */ -#include +#include "lib/replace/system/python.h" #include "python/py3compat.h" #include "includes.h" #include "python/modules.h" diff --git a/source3/lib/smbconf/pys3smbconf.c b/source3/lib/smbconf/pys3smbconf.c index 07e75f6b579..09d4881a9b0 100644 --- a/source3/lib/smbconf/pys3smbconf.c +++ b/source3/lib/smbconf/pys3smbconf.c @@ -18,7 +18,7 @@ * along with this program; if not, see . */ -#include +#include "lib/replace/system/python.h" #include "includes.h" #include "python/py3compat.h" diff --git a/source3/libsmb/pylibsmb.c b/source3/libsmb/pylibsmb.c index 6199f7b32dc..f06f6640640 100644 --- a/source3/libsmb/pylibsmb.c +++ b/source3/libsmb/pylibsmb.c @@ -45,7 +45,7 @@ c = libsmb.Conn("127.0.0.1", ------------------------- */ -#include +#include "lib/replace/system/python.h" #include "includes.h" #include "python/py3compat.h" #include "python/modules.h" diff --git a/source3/param/pyparam.c b/source3/param/pyparam.c index 749cfe308f4..531bc2a687f 100644 --- a/source3/param/pyparam.c +++ b/source3/param/pyparam.c @@ -17,7 +17,7 @@ along with this program. If not, see . */ -#include +#include "lib/replace/system/python.h" #include "includes.h" #include "python/py3compat.h" #include "param/param.h" diff --git a/source3/param/pyparam_util.c b/source3/param/pyparam_util.c index 67ab4945d6a..bfd8d05a292 100644 --- a/source3/param/pyparam_util.c +++ b/source3/param/pyparam_util.c @@ -17,7 +17,7 @@ along with this program. If not, see . */ -#include +#include "lib/replace/system/python.h" #include "includes.h" #include "param/param.h" #include "param/pyparam.h" diff --git a/source3/passdb/py_passdb.c b/source3/passdb/py_passdb.c index 7982654b6bc..48497a34552 100644 --- a/source3/passdb/py_passdb.c +++ b/source3/passdb/py_passdb.c @@ -17,7 +17,7 @@ along with this program. If not, see . */ -#include +#include "lib/replace/system/python.h" #include #include "includes.h" #include "python/py3compat.h" diff --git a/source3/rpc_client/py_mdscli.c b/source3/rpc_client/py_mdscli.c index 2594200ecfe..ccb0342b86b 100644 --- a/source3/rpc_client/py_mdscli.c +++ b/source3/rpc_client/py_mdscli.c @@ -17,7 +17,7 @@ along with this program. If not, see . */ -#include +#include "lib/replace/system/python.h" #include #include "includes.h" #include "python/py3compat.h" diff --git a/source3/smbd/pysmbd.c b/source3/smbd/pysmbd.c index f9f5384cfb3..e1f889dad30 100644 --- a/source3/smbd/pysmbd.c +++ b/source3/smbd/pysmbd.c @@ -23,7 +23,7 @@ along with this program. If not, see . */ -#include +#include "lib/replace/system/python.h" #include "includes.h" #include "python/py3compat.h" #include "python/modules.h" diff --git a/source3/utils/py_net.c b/source3/utils/py_net.c index 6f20fdb0890..181b8f2d1ca 100644 --- a/source3/utils/py_net.c +++ b/source3/utils/py_net.c @@ -18,7 +18,7 @@ along with this program. If not, see . */ -#include +#include "lib/replace/system/python.h" #include "includes.h" #include #include "python/modules.h" diff --git a/source4/auth/gensec/pygensec.c b/source4/auth/gensec/pygensec.c index dd63fa58348..97ced8f11c4 100644 --- a/source4/auth/gensec/pygensec.c +++ b/source4/auth/gensec/pygensec.c @@ -16,7 +16,7 @@ along with this program. If not, see . */ -#include +#include "lib/replace/system/python.h" #include "python/py3compat.h" #include "includes.h" #include "python/modules.h" diff --git a/source4/auth/pyauth.c b/source4/auth/pyauth.c index b41108b7072..498b52e2bec 100644 --- a/source4/auth/pyauth.c +++ b/source4/auth/pyauth.c @@ -17,7 +17,7 @@ along with this program. If not, see . */ -#include +#include "lib/replace/system/python.h" #include "python/py3compat.h" #include "includes.h" #include "python/modules.h" diff --git a/source4/dns_server/pydns.c b/source4/dns_server/pydns.c index 7b83d7c49a1..6e99ebd6479 100644 --- a/source4/dns_server/pydns.c +++ b/source4/dns_server/pydns.c @@ -19,7 +19,7 @@ along with this program. If not, see . */ -#include +#include "lib/replace/system/python.h" #include "python/py3compat.h" #include "includes.h" #include "python/modules.h" diff --git a/source4/dsdb/pydsdb.c b/source4/dsdb/pydsdb.c index 6bf304f4f91..aac311a84ff 100644 --- a/source4/dsdb/pydsdb.c +++ b/source4/dsdb/pydsdb.c @@ -17,7 +17,7 @@ along with this program. If not, see . */ -#include +#include "lib/replace/system/python.h" #include "python/py3compat.h" #include "includes.h" #include diff --git a/source4/lib/messaging/pymessaging.c b/source4/lib/messaging/pymessaging.c index 31755ea591a..b88727c6bd2 100644 --- a/source4/lib/messaging/pymessaging.c +++ b/source4/lib/messaging/pymessaging.c @@ -19,7 +19,7 @@ along with this program. If not, see . */ -#include +#include "lib/replace/system/python.h" #include "python/py3compat.h" #include "includes.h" #include "python/modules.h" diff --git a/source4/lib/policy/pypolicy.c b/source4/lib/policy/pypolicy.c index f40d811a50f..f85ea8532bc 100644 --- a/source4/lib/policy/pypolicy.c +++ b/source4/lib/policy/pypolicy.c @@ -17,7 +17,7 @@ * along with this program; if not, see . */ -#include +#include "lib/replace/system/python.h" #include "includes.h" #include "python/py3compat.h" #include "policy.h" diff --git a/source4/lib/registry/pyregistry.c b/source4/lib/registry/pyregistry.c index f4201c3ca9e..de40d2a6669 100644 --- a/source4/lib/registry/pyregistry.c +++ b/source4/lib/registry/pyregistry.c @@ -18,7 +18,7 @@ along with this program. If not, see . */ -#include +#include "lib/replace/system/python.h" #include "python/py3compat.h" #include "includes.h" #include "python/modules.h" diff --git a/source4/libnet/py_net.c b/source4/libnet/py_net.c index 42eee509c6b..071ad0481ec 100644 --- a/source4/libnet/py_net.c +++ b/source4/libnet/py_net.c @@ -19,7 +19,7 @@ along with this program. If not, see . */ -#include +#include "lib/replace/system/python.h" #include "python/py3compat.h" #include "includes.h" #include "python/modules.h" diff --git a/source4/libnet/py_net_dckeytab.c b/source4/libnet/py_net_dckeytab.c index ad65c7d46a6..0c3df8958ab 100644 --- a/source4/libnet/py_net_dckeytab.c +++ b/source4/libnet/py_net_dckeytab.c @@ -20,7 +20,7 @@ along with this program. If not, see . */ -#include +#include "lib/replace/system/python.h" #include "includes.h" #include "python/py3compat.h" #include "python/modules.h" diff --git a/source4/librpc/ndr/py_auth.c b/source4/librpc/ndr/py_auth.c index d34a852c06d..8d233b3112c 100644 --- a/source4/librpc/ndr/py_auth.c +++ b/source4/librpc/ndr/py_auth.c @@ -18,7 +18,7 @@ along with this program. If not, see . */ -#include +#include "lib/replace/system/python.h" #include "includes.h" #include "libcli/util/pyerrors.h" #include "pyauth.h" diff --git a/source4/librpc/ndr/py_lsa.c b/source4/librpc/ndr/py_lsa.c index a59dcbf970c..c5e221fbaa0 100644 --- a/source4/librpc/ndr/py_lsa.c +++ b/source4/librpc/ndr/py_lsa.c @@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include +#include "lib/replace/system/python.h" #include "librpc/gen_ndr/lsa.h" static PyObject *py_lsa_String_str(PyObject *py_self) diff --git a/source4/librpc/ndr/py_misc.c b/source4/librpc/ndr/py_misc.c index 99100875689..16e2960a1c3 100644 --- a/source4/librpc/ndr/py_misc.c +++ b/source4/librpc/ndr/py_misc.c @@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include +#include "lib/replace/system/python.h" #include "python/py3compat.h" #include "librpc/gen_ndr/misc.h" diff --git a/source4/librpc/ndr/py_security.c b/source4/librpc/ndr/py_security.c index 217b7dc19d1..772f8ac1837 100644 --- a/source4/librpc/ndr/py_security.c +++ b/source4/librpc/ndr/py_security.c @@ -1,23 +1,23 @@ -/* +/* Unix SMB/CIFS implementation. Samba utility functions Copyright (C) Jelmer Vernooij 2008-2010 - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include +#include "lib/replace/system/python.h" #include "py3compat.h" #include "libcli/security/sddl.h" #include "libcli/security/security.h" @@ -31,11 +31,11 @@ static void PyType_AddMethods(PyTypeObject *type, PyMethodDef *methods) dict = type->tp_dict; for (i = 0; methods[i].ml_name; i++) { PyObject *descr; - if (methods[i].ml_flags & METH_CLASS) + if (methods[i].ml_flags & METH_CLASS) descr = PyCFunction_New(&methods[i], (PyObject *)type); - else + else descr = PyDescr_NewMethod(type, &methods[i]); - PyDict_SetItemString(dict, methods[i].ml_name, + PyDict_SetItemString(dict, methods[i].ml_name, descr); Py_CLEAR(descr); } @@ -414,7 +414,7 @@ static PyObject *py_token_is_anonymous(PyObject *self, PyObject *Py_UNUSED(ignored)) { struct security_token *token = pytalloc_get_ptr(self); - + return PyBool_FromLong(security_token_is_anonymous(token)); } @@ -422,7 +422,7 @@ static PyObject *py_token_is_system(PyObject *self, PyObject *Py_UNUSED(ignored)) { struct security_token *token = pytalloc_get_ptr(self); - + return PyBool_FromLong(security_token_is_system(token)); } @@ -430,7 +430,7 @@ static PyObject *py_token_has_builtin_administrators(PyObject *self, PyObject *Py_UNUSED(ignored)) { struct security_token *token = pytalloc_get_ptr(self); - + return PyBool_FromLong(security_token_has_builtin_administrators(token)); } @@ -438,7 +438,7 @@ static PyObject *py_token_has_nt_authenticated_users(PyObject *self, PyObject *Py_UNUSED(ignored)) { struct security_token *token = pytalloc_get_ptr(self); - + return PyBool_FromLong(security_token_has_nt_authenticated_users(token)); } @@ -468,7 +468,7 @@ static PyObject *py_token_set_privilege(PyObject *self, PyObject *args) static PyObject *py_token_new(PyTypeObject *self, PyObject *args, PyObject *kwargs) { return pytalloc_steal(self, security_token_initialise(NULL)); -} +} static PyMethodDef py_token_extra_methods[] = { { "is_sid", (PyCFunction)py_token_is_sid, METH_VARARGS, diff --git a/source4/librpc/ndr/py_xattr.c b/source4/librpc/ndr/py_xattr.c index 221b9771e0d..523c1ab4a19 100644 --- a/source4/librpc/ndr/py_xattr.c +++ b/source4/librpc/ndr/py_xattr.c @@ -17,7 +17,7 @@ along with this program. If not, see . */ -#include +#include "lib/replace/system/python.h" static void PyType_AddMethods(PyTypeObject *type, PyMethodDef *methods) { diff --git a/source4/librpc/rpc/pyrpc.c b/source4/librpc/rpc/pyrpc.c index 61b3c6357b0..3f1a8679d3e 100644 --- a/source4/librpc/rpc/pyrpc.c +++ b/source4/librpc/rpc/pyrpc.c @@ -17,7 +17,7 @@ along with this program. If not, see . */ -#include +#include "lib/replace/system/python.h" #include "python/py3compat.h" #include "includes.h" #include "python/modules.h" diff --git a/source4/librpc/rpc/pyrpc_util.c b/source4/librpc/rpc/pyrpc_util.c index 0d6a16518f1..6a9c8c77437 100644 --- a/source4/librpc/rpc/pyrpc_util.c +++ b/source4/librpc/rpc/pyrpc_util.c @@ -20,7 +20,7 @@ along with this program. If not, see . */ -#include +#include "lib/replace/system/python.h" #include "python/py3compat.h" #include "includes.h" #include "python/modules.h" diff --git a/source4/ntvfs/posix/python/pyposix_eadb.c b/source4/ntvfs/posix/python/pyposix_eadb.c index abf397f990c..aca92e71b7e 100644 --- a/source4/ntvfs/posix/python/pyposix_eadb.c +++ b/source4/ntvfs/posix/python/pyposix_eadb.c @@ -18,7 +18,7 @@ along with this program. If not, see . */ -#include +#include "lib/replace/system/python.h" #include "python/py3compat.h" #include "includes.h" #include "system/filesys.h" diff --git a/source4/ntvfs/posix/python/pyxattr_native.c b/source4/ntvfs/posix/python/pyxattr_native.c index 7511e5c02bf..6b237b00084 100644 --- a/source4/ntvfs/posix/python/pyxattr_native.c +++ b/source4/ntvfs/posix/python/pyxattr_native.c @@ -18,7 +18,7 @@ along with this program. If not, see . */ -#include +#include "lib/replace/system/python.h" #include "python/py3compat.h" #include "includes.h" #include "librpc/ndr/libndr.h" diff --git a/source4/ntvfs/posix/python/pyxattr_tdb.c b/source4/ntvfs/posix/python/pyxattr_tdb.c index 425fd868ca0..5f07809834c 100644 --- a/source4/ntvfs/posix/python/pyxattr_tdb.c +++ b/source4/ntvfs/posix/python/pyxattr_tdb.c @@ -18,7 +18,7 @@ along with this program. If not, see . */ -#include +#include "lib/replace/system/python.h" #include "python/py3compat.h" #include "includes.h" #include "system/filesys.h" diff --git a/source4/param/provision.c b/source4/param/provision.c index d6d120647e6..f5caf66b3c6 100644 --- a/source4/param/provision.c +++ b/source4/param/provision.c @@ -18,7 +18,7 @@ along with this program. If not, see . */ -#include +#include "lib/replace/system/python.h" #include "python/py3compat.h" #include #include diff --git a/source4/param/pyparam.c b/source4/param/pyparam.c index c91b7382ef4..2bd7b91bd50 100644 --- a/source4/param/pyparam.c +++ b/source4/param/pyparam.c @@ -17,7 +17,7 @@ along with this program. If not, see . */ -#include +#include "lib/replace/system/python.h" #include "python/py3compat.h" #include "includes.h" #include "param/param.h" diff --git a/source4/param/pyparam_util.c b/source4/param/pyparam_util.c index 9b9dcd22c90..bb7ffda1cc2 100644 --- a/source4/param/pyparam_util.c +++ b/source4/param/pyparam_util.c @@ -17,7 +17,7 @@ along with this program. If not, see . */ -#include +#include "lib/replace/system/python.h" #include "py3compat.h" #include "includes.h" #include "param/param.h" diff --git a/source4/scripting/bin/gen_ntstatus.py b/source4/scripting/bin/gen_ntstatus.py index bf0f01640b0..e4b0ad8e428 100755 --- a/source4/scripting/bin/gen_ntstatus.py +++ b/source4/scripting/bin/gen_ntstatus.py @@ -69,7 +69,7 @@ def generatePythonFile(out_file, errors): out_file.write(" * New descriptions for existing errors generated from\n") out_file.write(" * [MS-ERREF] http://msdn.microsoft.com/en-us/library/cc704588.aspx\n") out_file.write(" */\n") - out_file.write("#include \n") + out_file.write("#include \"lib/replace/system/python.h\"\n") out_file.write("#include \"python/py3compat.h\"\n") out_file.write("#include \"includes.h\"\n\n") # This is needed to avoid a missing prototype error from the C diff --git a/source4/scripting/bin/gen_werror.py b/source4/scripting/bin/gen_werror.py index 445d7994d8b..c0087d3c3f2 100755 --- a/source4/scripting/bin/gen_werror.py +++ b/source4/scripting/bin/gen_werror.py @@ -67,7 +67,7 @@ def generatePythonFile(out_file, errors): out_file.write(" * Errors generated from\n") out_file.write(" * [MS-ERREF] https://msdn.microsoft.com/en-us/library/cc231199.aspx\n") out_file.write(" */\n") - out_file.write("#include \n") + out_file.write("#include \"lib/replace/system/python.h\"\n") out_file.write("#include \"python/py3compat.h\"\n") out_file.write("#include \"includes.h\"\n\n") # This is needed to avoid a missing prototype error from the C