From 2462ff7eb1e003eef03dcfd546bb7299301de6d5 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Tue, 24 Jul 2012 11:05:35 -0500 Subject: [PATCH] MinGW provides getopt(), don't build our own --- src/libCom/osi/os/WIN32/epicsGetopt.c | 4 ++++ src/libCom/osi/os/WIN32/epicsGetopt.h | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/src/libCom/osi/os/WIN32/epicsGetopt.c b/src/libCom/osi/os/WIN32/epicsGetopt.c index 97bb11f47..1ea064ea2 100644 --- a/src/libCom/osi/os/WIN32/epicsGetopt.c +++ b/src/libCom/osi/os/WIN32/epicsGetopt.c @@ -1,3 +1,5 @@ +#ifndef _MINGW + /* * Copyright (c) 1987, 1993, 1994 * The Regents of the University of California. All rights reserved. @@ -121,3 +123,5 @@ int getopt(nargc, nargv, ostr) } return (optopt); /* dump back option letter */ } + +#endif /* !_MINGW */ diff --git a/src/libCom/osi/os/WIN32/epicsGetopt.h b/src/libCom/osi/os/WIN32/epicsGetopt.h index aa3bc7422..f92041085 100644 --- a/src/libCom/osi/os/WIN32/epicsGetopt.h +++ b/src/libCom/osi/os/WIN32/epicsGetopt.h @@ -12,6 +12,12 @@ #ifndef _EPICS_GETOPT_H #define _EPICS_GETOPT_H +#ifdef _MINGW + +#include + +#else /* _MINGW */ + #include "shareLib.h" #ifdef __cplusplus @@ -28,4 +34,6 @@ epicsShareExtern int optind, opterr, optopt; } #endif +#endif /* _MINGW */ + #endif /* _EPICS_GETOPT_H */