From c36a1ec83333067ce2b495c2fa4ae5ad61e40fdc Mon Sep 17 00:00:00 2001 From: Peter Breitenlohner Date: Mon, 27 Feb 2012 09:54:12 +0000 Subject: Cygwin: getopt patch from Ken Brown git-svn-id: svn://tug.org/texlive/trunk@25513 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/kpathsea/ChangeLog | 4 ++++ Build/source/texk/kpathsea/getopt.h | 11 ++++++++--- Build/source/utils/chktex/ChangeLog | 4 ++++ Build/source/utils/chktex/getopt.h | 11 ++++++++--- 4 files changed, 24 insertions(+), 6 deletions(-) (limited to 'Build') diff --git a/Build/source/texk/kpathsea/ChangeLog b/Build/source/texk/kpathsea/ChangeLog index f53fea5c337..8fd8e4f8e7d 100644 --- a/Build/source/texk/kpathsea/ChangeLog +++ b/Build/source/texk/kpathsea/ChangeLog @@ -1,3 +1,7 @@ +2012-02-27 Ken Brown + + * getopt.h: Cygwin requires getopt() prototype. + 2011-12-22 Karl Berry * texmf.cnf (TEX.pmpost, TEXINPUTS.(e)up(la)tex): new definitions, diff --git a/Build/source/texk/kpathsea/getopt.h b/Build/source/texk/kpathsea/getopt.h index af446433688..c9ca5e720a7 100644 --- a/Build/source/texk/kpathsea/getopt.h +++ b/Build/source/texk/kpathsea/getopt.h @@ -1,6 +1,6 @@ /* Declarations for getopt. - Copyright 2008, 2010, 2011 Karl Berry. + Copyright 2008, 2010-2012 Karl Berry. Copyright 1989,90,91,92,93,94,96,97,2000,05 Free Software Foundation, Inc. The original version of this file was part of the GNU C Library. @@ -112,6 +112,11 @@ struct option #define required_argument 1 #define optional_argument 2 +#if defined (__CYGWIN__) && !defined ( __GETOPT_H__) +#define __GETOPT_H__ +extern KPSEDLL int getopt (int argc, char *const *argv, const char *shortopts); +#endif + #if defined (__STDC__) && __STDC__ #ifdef __GNU_LIBRARY__ /* Many other libraries have conflicting prototypes for getopt, with @@ -119,9 +124,9 @@ struct option errors, only prototype getopt for the GNU C library. */ extern KPSEDLL int getopt (int argc, char *const *argv, const char *shortopts); #else /* not __GNU_LIBRARY__ */ -#ifndef __cplusplus +#if !defined (__cplusplus) && !defined (__CYGWIN__) extern KPSEDLL int getopt (); -#endif /* not __cplusplus */ +#endif /* not __cplusplus and not __CYGWIN__ */ #endif /* __GNU_LIBRARY__ */ extern KPSEDLL int getopt_long (int argc, char *const *argv, const char *shortopts, const struct option *longopts, int *longind); diff --git a/Build/source/utils/chktex/ChangeLog b/Build/source/utils/chktex/ChangeLog index 03e56f25890..f1740c8cc64 100644 --- a/Build/source/utils/chktex/ChangeLog +++ b/Build/source/utils/chktex/ChangeLog @@ -1,3 +1,7 @@ +2012-02-27 Ken Brown + + * getopt.h: Cygwin requires getopt() prototype. + 2011-12-06 Peter Breitenlohner * Makefile.am: Replace ${prefix}/texmf => $(datarootdir)/texmf. diff --git a/Build/source/utils/chktex/getopt.h b/Build/source/utils/chktex/getopt.h index af446433688..c9ca5e720a7 100644 --- a/Build/source/utils/chktex/getopt.h +++ b/Build/source/utils/chktex/getopt.h @@ -1,6 +1,6 @@ /* Declarations for getopt. - Copyright 2008, 2010, 2011 Karl Berry. + Copyright 2008, 2010-2012 Karl Berry. Copyright 1989,90,91,92,93,94,96,97,2000,05 Free Software Foundation, Inc. The original version of this file was part of the GNU C Library. @@ -112,6 +112,11 @@ struct option #define required_argument 1 #define optional_argument 2 +#if defined (__CYGWIN__) && !defined ( __GETOPT_H__) +#define __GETOPT_H__ +extern KPSEDLL int getopt (int argc, char *const *argv, const char *shortopts); +#endif + #if defined (__STDC__) && __STDC__ #ifdef __GNU_LIBRARY__ /* Many other libraries have conflicting prototypes for getopt, with @@ -119,9 +124,9 @@ struct option errors, only prototype getopt for the GNU C library. */ extern KPSEDLL int getopt (int argc, char *const *argv, const char *shortopts); #else /* not __GNU_LIBRARY__ */ -#ifndef __cplusplus +#if !defined (__cplusplus) && !defined (__CYGWIN__) extern KPSEDLL int getopt (); -#endif /* not __cplusplus */ +#endif /* not __cplusplus and not __CYGWIN__ */ #endif /* __GNU_LIBRARY__ */ extern KPSEDLL int getopt_long (int argc, char *const *argv, const char *shortopts, const struct option *longopts, int *longind); -- cgit v1.2.3