ares_expand_name.c ares_parse_a_reply.c windows_port.c \
ares_expand_string.c ares_parse_ptr_reply.c ares_parse_aaaa_reply.c \
ares_getnameinfo.c inet_net_pton.c bitncmp.c inet_ntop.c \
-ares_parse_ns_reply.c ares_getopt.c
+ares_parse_ns_reply.c
HHEADERS = ares.h ares_private.h setup.h ares_dns.h ares_version.h \
nameser.h inet_net_pton.h inet_ntop.h ares_ipv6.h bitncmp.h \
$(OBJ_DIR)\ares__read_line.obj \
$(OBJ_DIR)\ares_gethostbyname.obj \
$(OBJ_DIR)\ares_getnameinfo.obj \
- $(OBJ_DIR)\ares_getopt.obj \
$(OBJ_DIR)\ares_strerror.obj \
$(OBJ_DIR)\ares_cancel.obj \
$(OBJ_DIR)\ares_init.obj \
@echo ares_inet_pton >> $@
@echo ares_writev >> $@
@echo ares_getnameinfo >> $@
- @echo ares_getopt >> $@
@echo ares_gettimeofday >> $@
@echo ares_parse_aaaa_reply >> $@
-ahost.exe: $(OBJ_DIR) $(OBJ_DIR)\ahost.obj $(OBJ_DIR)\getopt.obj cares_imp.lib
- link $(LDFLAGS) -out:$@ $(OBJ_DIR)\ahost.obj $(OBJ_DIR)\getopt.obj cares_imp.lib $(EX_LIBS)
+ahost.exe: $(OBJ_DIR) $(OBJ_DIR)\ahost.obj $(OBJ_DIR)\ares_getopt.obj cares_imp.lib
+ link $(LDFLAGS) -out:$@ $(OBJ_DIR)\ahost.obj $(OBJ_DIR)\ares_getopt.obj cares_imp.lib $(EX_LIBS)
-adig.exe: $(OBJ_DIR) $(OBJ_DIR)\adig.obj $(OBJ_DIR)\getopt.obj cares_imp.lib
- link $(LDFLAGS) -out:$@ $(OBJ_DIR)\adig.obj $(OBJ_DIR)\getopt.obj cares_imp.lib $(EX_LIBS)
+adig.exe: $(OBJ_DIR) $(OBJ_DIR)\adig.obj $(OBJ_DIR)\ares_getopt.obj cares_imp.lib
+ link $(LDFLAGS) -out:$@ $(OBJ_DIR)\adig.obj $(OBJ_DIR)\ares_getopt.obj cares_imp.lib $(EX_LIBS)
clean:
- del $(OBJ_DIR)\*.obj *.ilk *.pdb *.pbt *.pbi *.pbo *._xe *.map
$(OBJ_DIR)\inet_ntop.obj: inet_ntop.c setup.h setup_once.h nameser.h \
ares_ipv6.h inet_ntop.h
-$(OBJ_DIR)\ares_getopt.obj: ares_getopt.c setup.h setup_once.h ares.h
+$(OBJ_DIR)\ares_getopt.obj: ares_getopt.c ares_getopt.h
#include "ares.h"
#include "ares_dns.h"
#include "inet_ntop.h"
+#include "ares_getopt.h"
#ifdef WATT32
#undef WIN32 /* Redefined in MingW headers */
#include "ares_dns.h"
#include "inet_ntop.h"
#include "inet_net_pton.h"
+#include "ares_getopt.h"
#ifndef optind
extern int optind;
void ares_free_string(void *str);
void ares_free_hostent(struct hostent *host);
const char *ares_strerror(int code);
-int ares_getopt(int nargc, char * const nargv[], const char *ostr);
#ifdef __cplusplus
}
* #endif
*/
-#include "setup.h"
-
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include "ares.h"
+#include "ares_getopt.h"
/* declarations to provide consistent linkage */
extern char *optarg;
--- /dev/null
+#ifndef ARES_GETOPT_H
+#define ARES_GETOPT_H
+
+/*
+ * Copyright (c) 1987-2001 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * A. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * B. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * C. Neither the names of the copyright holders nor the names of its
+ * contributors may be used to endorse or promote products derived from this
+ * software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS
+ * IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+
+int ares_getopt(int nargc, char * const nargv[], const char *ostr);
+
+
+#endif /* ARES_GETOPT_H */
\r
SOURCE=..\..\adig.c\r
# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\ares_getopt.c\r
+# End Source File\r
# End Group\r
# Begin Group "Header Files"\r
\r
# PROP Default_Filter "h;hpp;hxx;hm;inl"\r
+# Begin Source File\r
+\r
+SOURCE=..\..\ares_getopt.h\r
+# End Source File\r
# End Group\r
# Begin Group "Resource Files"\r
\r
CFG=ahost - Win32 Debug\r
!MESSAGE This is not a valid makefile. To build this project using NMAKE,\r
!MESSAGE use the Export Makefile command and run\r
-!MESSAGE\r
+!MESSAGE \r
!MESSAGE NMAKE /f "ahost.mak".\r
-!MESSAGE\r
+!MESSAGE \r
!MESSAGE You can specify a configuration when running NMAKE\r
!MESSAGE by defining the macro CFG on the command line. For example:\r
-!MESSAGE\r
+!MESSAGE \r
!MESSAGE NMAKE /f "ahost.mak" CFG="ahost - Win32 Debug"\r
-!MESSAGE\r
+!MESSAGE \r
!MESSAGE Possible choices for configuration are:\r
-!MESSAGE\r
+!MESSAGE \r
!MESSAGE "ahost - Win32 Release" (based on "Win32 (x86) Console Application")\r
!MESSAGE "ahost - Win32 Debug" (based on "Win32 (x86) Console Application")\r
-!MESSAGE\r
+!MESSAGE \r
\r
# Begin Project\r
# PROP AllowPerConfigDependencies 0\r
# ADD BASE BSC32 /nologo\r
# ADD BSC32 /nologo\r
LINK32=link.exe\r
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386\r
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386\r
# ADD LINK32 wsock32.lib areslib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\areslib\Release"\r
\r
!ELSEIF "$(CFG)" == "ahost - Win32 Debug"\r
# PROP Output_Dir "Debug"\r
# PROP Intermediate_Dir "Debug"\r
# PROP Target_Dir ""\r
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c\r
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c\r
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c\r
+# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c\r
# ADD BASE RSC /l 0x409 /d "_DEBUG"\r
# ADD RSC /l 0x409 /d "_DEBUG"\r
BSC32=bscmake.exe\r
# ADD BASE BSC32 /nologo\r
# ADD BSC32 /nologo\r
LINK32=link.exe\r
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept\r
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept\r
# ADD LINK32 wsock32.lib areslib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\areslib\Debug"\r
\r
-!ENDIF\r
+!ENDIF \r
\r
# Begin Target\r
\r
\r
SOURCE=..\..\ahost.c\r
# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\ares_getopt.c\r
+# End Source File\r
# End Group\r
# Begin Group "Header Files"\r
\r
# PROP Default_Filter "h;hpp;hxx;hm;inl"\r
+# Begin Source File\r
+\r
+SOURCE=..\..\ares_getopt.h\r
+# End Source File\r
# End Group\r
# Begin Group "Resource Files"\r
\r
# End Source File\r
# Begin Source File\r
\r
-SOURCE=..\..\ares_getopt.c\r
-# End Source File\r
-# Begin Source File\r
-\r
SOURCE=..\..\ares_getsock.c\r
# End Source File\r
# Begin Source File\r