Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bddf5a5

Browse files
committed
Protect pyconfig.h from multiple inclusions.
1 parent e981a4e commit bddf5a5

3 files changed

Lines changed: 16 additions & 1 deletion

File tree

configure

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#! /bin/sh
2-
# From configure.in Revision: 1.365 .
2+
# From configure.in Revision: 1.366 .
33
# Guess values for system-dependent variables and create Makefiles.
44
# Generated by GNU Autoconf 2.53 for python 2.3.
55
#
@@ -1237,6 +1237,8 @@ ac_config_headers="$ac_config_headers pyconfig.h"
12371237
12381238
12391239
1240+
1241+
12401242
VERSION=2.3
12411243
12421244

configure.in

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,17 @@ AC_CONFIG_HEADER(pyconfig.h)
1111

1212
# This is for stuff that absolutely must end up in pyconfig.h.
1313
# Please use pyport.h instead, if possible.
14+
AH_TOP([
15+
#ifndef Py_PYCONFIG_H
16+
#define Py_PYCONFIG_H
17+
])
1418
AH_BOTTOM([
1519
/* Define the macros needed if on a UnixWare 7.x system. */
1620
#if defined(__USLC__) && defined(__SCO_VERSION__)
1721
#define STRICT_SYSV_CURSES /* Don't use ncurses extensions */
1822
#endif
23+
24+
#endif /*Py_PYCONFIG_H*/
1925
])
2026

2127
AC_SUBST(VERSION)

pyconfig.h.in

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
/* pyconfig.h.in. Generated from configure.in by autoheader. */
22

3+
4+
#ifndef Py_PYCONFIG_H
5+
#define Py_PYCONFIG_H
6+
7+
38
/* Define for AIX if your compiler is a genuine IBM xlC/xlC_r and you want
49
support for AIX C++ shared extension modules. */
510
#undef AIX_GENUINE_CPLUSPLUS
@@ -852,3 +857,5 @@
852857
#define STRICT_SYSV_CURSES /* Don't use ncurses extensions */
853858
#endif
854859

860+
#endif /*Py_PYCONFIG_H*/
861+

0 commit comments

Comments
 (0)