summaryrefslogtreecommitdiff
path: root/soltools
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2013-08-20 09:15:26 +0300
committerCaolán McNamara <caolanm@redhat.com>2013-08-21 07:44:38 +0000
commitcabd23916f3057b2c5f40aae0df6360342b6ea46 (patch)
treed90eb089dfeba0309ce45d577f7f72809f92a821 /soltools
parent654d97d3bb6e39c3c86ab3b338bb657985d36512 (diff)
We don't seem to actually need glibc getopt
Change-Id: I1f221533f5ea684d113bdc45c04bf84405140f9f Reviewed-on: https://gerrit.libreoffice.org/5539 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'soltools')
-rw-r--r--soltools/Executable_cpp.mk8
-rw-r--r--soltools/cpp/_unix.c4
2 files changed, 3 insertions, 9 deletions
diff --git a/soltools/Executable_cpp.mk b/soltools/Executable_cpp.mk
index 4225319ab462..21ede303fcb0 100644
--- a/soltools/Executable_cpp.mk
+++ b/soltools/Executable_cpp.mk
@@ -21,16 +21,10 @@ $(eval $(call gb_Executable_add_cobjects,cpp,\
soltools/cpp/_unix \
))
-ifneq ($(or $(filter AIX MACOSX,$(OS)),$(filter NO,$(HAVE_GETOPT))),)
+ifneq ($(filter AIX MACOSX WNT,$(OS)),)
$(eval $(call gb_Executable_add_cobjects,cpp,\
soltools/cpp/_getopt \
))
endif
-ifeq ($(HAVE_GETOPT),YES)
-$(eval $(call gb_Executable_add_defs,cpp,\
- -DHAVE_GETOPT \
-))
-endif
-
# vim:set noet sw=4 ts=4:
diff --git a/soltools/cpp/_unix.c b/soltools/cpp/_unix.c
index c3ba3dc176cb..d29970a450b3 100644
--- a/soltools/cpp/_unix.c
+++ b/soltools/cpp/_unix.c
@@ -31,7 +31,7 @@
#include "cpp.h"
-#if defined MACOSX || defined AIX || !defined HAVE_GETOPT
+#if defined MACOSX || defined AIX || defined WNT
extern int stgetopt(int, char *const *, const char *);
extern char *optarg;
extern int optind;
@@ -59,7 +59,7 @@ void
Tokenrow tr;
setup_kwtab();
-#if defined MACOSX || defined(AIX) || !defined HAVE_GETOPT
+#if defined MACOSX || defined(AIX) || defined WNT
while ((c = stgetopt(argc, argv, "NOPV:I:D:U:F:A:X:u:l:+")) != -1)
#else
while ((c = getopt(argc, argv, "NOPV:I:D:U:F:A:X:u:l:+")) != -1)