mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
python: Enable C compiler warnings.
This commit is contained in:
@@ -42,7 +42,7 @@ python_LTLIBRARIES = libguestfsmod.la
|
||||
libguestfsmod_la_SOURCES = guestfs-py.c guestfs-py.h guestfs-py-byhand.c
|
||||
libguestfsmod_la_CFLAGS = \
|
||||
-DGUESTFS_PRIVATE_FUNCTIONS=1 \
|
||||
-Wall \
|
||||
$(WARN_CFLAGS) $(WERROR_CFLAGS) \
|
||||
-I$(PYTHON_INCLUDEDIR) \
|
||||
-I$(top_srcdir)/src -I$(top_builddir)/src
|
||||
libguestfsmod_la_LIBADD = $(top_builddir)/src/libguestfs.la
|
||||
|
||||
@@ -21,6 +21,12 @@
|
||||
* guestfs-py.c).
|
||||
*/
|
||||
|
||||
/* This has to be included first, else definitions conflict with
|
||||
* glibc header files. Python is broken.
|
||||
*/
|
||||
#define PY_SSIZE_T_CLEAN 1
|
||||
#include <Python.h>
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
@@ -21,9 +21,6 @@
|
||||
|
||||
#include "guestfs.h"
|
||||
|
||||
#define PY_SSIZE_T_CLEAN 1
|
||||
#include <Python.h>
|
||||
|
||||
#if PY_VERSION_HEX < 0x02050000
|
||||
typedef int Py_ssize_t;
|
||||
#define PY_SSIZE_T_MAX INT_MAX
|
||||
|
||||
Reference in New Issue
Block a user