summaryrefslogtreecommitdiff
path: root/Build/source/texk/kpathsea/getopt.h
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-04-09 16:13:07 +0000
committerKarl Berry <karl@freefriends.org>2012-04-09 16:13:07 +0000
commit50f4aaa330b7549bc663dfc6701ddbc497782c47 (patch)
treed2c3b34f4a26b3155fac42ff6e24c59e72d15b09 /Build/source/texk/kpathsea/getopt.h
parent4f6fa857ec06873b5eaa5443a19e7b84b97b81c4 (diff)
do not declare getopt under C++ (http://bugs.debian.org/667392); do not declare popen/pclose at all (http://bugs.debian.org/64524)
git-svn-id: svn://tug.org/texlive/trunk@25879 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/kpathsea/getopt.h')
-rw-r--r--Build/source/texk/kpathsea/getopt.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/Build/source/texk/kpathsea/getopt.h b/Build/source/texk/kpathsea/getopt.h
index c899189bebc..a2530b8bf8f 100644
--- a/Build/source/texk/kpathsea/getopt.h
+++ b/Build/source/texk/kpathsea/getopt.h
@@ -120,8 +120,12 @@ struct option
#if defined(__GNU_LIBRARY__) || defined (WIN32) || defined (__CYGWIN__)
/* Many other libraries have conflicting prototypes for getopt, with
differences in the consts, in stdlib.h. To avoid compilation
- errors, only prototype getopt for the GNU C library. */
+ errors, only prototype getopt for the GNU C library. And not when
+ compiling with C++; g++ 4.7.0 has introduced a conflicting
+ declaration. */
+#if !defined (__cplusplus)
extern KPSEDLL int getopt (int argc, char *const *argv, const char *shortopts);
+#endif
#if defined (__MINGW32__) || defined (__CYGWIN__)
#define __GETOPT_H__ /* Avoid that <unistd.h> redeclares the getopt API. */
#endif