Commit 83c9e2ae authored by Jason Madden's avatar Jason Madden Committed by GitHub

Merge pull request #1764 from gevent/cares-1.17.1

Update to c-ares 1.17.1.
parents a7db64c4 6a6432f5
......@@ -458,6 +458,7 @@ jobs:
objdump -p build/lib*/gevent/libev/_corecffi*so | grep "NEEDED.*libev.so"
objdump -p build/lib*/gevent/libev/corecext*so | grep "NEEDED.*libev.so"
objdump -p build/lib*/gevent/libuv/_corecffi*so | grep "NEEDED.*libuv.so"
objdump -p build/lib*/gevent/resolver/cares*so | grep "NEEDED.*libcares.so"
- name: test non-embedded
run: |
# Verify that we got non-embedded builds
......
......@@ -70,6 +70,13 @@ deps/c-ares/test/config.log
deps/c-ares/test/config.status
deps/c-ares/test/libtool
deps/c-ares/test/stamp-h1
deps/c-ares/include/Makefile
deps/c-ares/include/stamp-h2
deps/c-ares/src/Makefile
deps/c-ares/src/lib/Makefile
deps/c-ares/src/lib/ares_config.h
deps/c-ares/src/lib/stamp-h1
deps/c-ares/src/tools/Makefile
deps/libev/.deps
deps/libev/Makefile
......
......@@ -41,11 +41,11 @@ cflags = ('CFLAGS="%s"' % (cflags,)) if cflags else ''
# https://github.com/gevent/gevent/issues/777
ares_configure_command = ' '.join([
"(cd ", quoted_dep_abspath('c-ares'),
" && if [ -r ares_build.h ]; then cp ares_build.h ares_build.h.orig; fi ",
" && if [ -r include/ares_build.h ]; then cp include/ares_build.h include/ares_build.h.orig; fi ",
" && sh ./configure --disable-dependency-tracking -C " + cflags,
" && cp ares_config.h ares_build.h \"$OLDPWD\" ",
" && cat ares_build.h ",
" && if [ -r ares_build.h.orig ]; then mv ares_build.h.orig ares_build.h; fi)",
" && cp src/lib/ares_config.h include/ares_build.h \"$OLDPWD\" ",
" && cat include/ares_build.h ",
" && if [ -r include/ares_build.h.orig ]; then mv include/ares_build.h.orig include/ares_build.h; fi)",
"> configure-output.txt"
])
......@@ -57,7 +57,7 @@ if 'GEVENT_MANYLINUX' in os.environ:
def configure_ares(bext, ext):
print("Embedding c-ares", bext, ext)
bdir = os.path.join(bext.build_temp, 'c-ares')
bdir = os.path.join(bext.build_temp, 'c-ares', 'include')
ext.include_dirs.insert(0, bdir)
print("Inserted ", bdir, "in include dirs", ext.include_dirs)
......@@ -65,7 +65,7 @@ def configure_ares(bext, ext):
os.makedirs(bdir)
if WIN:
src = "deps\\c-ares\\ares_build.h.dist"
src = "deps\\c-ares\\include\\ares_build.h.dist"
dest = os.path.join(bdir, "ares_build.h")
print("Copying %r to %r" % (src, dest))
shutil.copy(src, dest)
......@@ -91,7 +91,11 @@ ARES = Extension(
sources=[
'src/gevent/resolver/cares.pyx'
],
include_dirs=get_include_dirs(*([dep_abspath('c-ares')] if CARES_EMBED else [])),
include_dirs=get_include_dirs(*(
[os.path.join(dep_abspath('c-ares'), 'include'),
os.path.join(dep_abspath('c-ares'), 'src', 'lib')]
if CARES_EMBED
else [])),
libraries=list(LIBRARIES),
define_macros=list(DEFINE_MACROS),
depends=glob_many(
......@@ -103,11 +107,7 @@ ARES.optional = not ares_required
if CARES_EMBED:
ARES.sources += glob_many('deps/c-ares/*.c')
# Strip the standalone binaries that would otherwise
# cause linking issues
for bin_c in ('acountry', 'adig', 'ahost'):
ARES.sources.remove('deps/c-ares' + os.sep + bin_c + '.c')
ARES.sources += glob_many('deps/c-ares/src/lib/*.c')
ARES.configure = configure_ares
if WIN:
ARES.libraries += ['advapi32']
......
......@@ -40,17 +40,17 @@ Updating c-ares
tar -xf c-ares-$CARES_VER.tar.gz
rm -rf c-ares c-ares-$CARES_VER.tar.gz
mv c-ares-$CARES_VER c-ares
cp c-ares/ares_build.h c-ares/ares_build.h.dist
rm -f c-ares/*.3 c-ares/*.1
cp c-ares/include/ares_build.h c-ares/include/ares_build.h.dist
rm -rf c-ares/docs
rm -rf c-ares/test
rm -rf c-ares/vc
rm -f c-ares/maketgz
rm -f c-ares/CMakeLists.txt
rm -f c-ares/RELEASE-PROCEDURE.md
rm -f c-ares/RELEASE-PROCEDURE.md c-ares/CONTRIBUTING.md c-ares/SECURITY.md
rm -f c-ares/*.cmake c-ares/*.cmake.in
rm -f c-ares/buildconf.bat
git apply cares-make.patch
At this point there might be new files in libuv that need added to
At this point there might be new files in c-ares that need added to
git, evaluate them and add them.
- Follow the same 'config.guess' and 'config.sub' steps as libev.
......
This diff is collapsed.
......@@ -334,11 +334,6 @@ provided that you installed Visual C/C++ 6 in the default directory.
Further details in [README.msvc](README.msvc)
### MSVC IDEs
Details in [README.msvc](README.msvc)
### Important static c-ares usage note
When building an application that uses the static c-ares library, you must
......
AUTOMAKE_OPTIONS = foreign nostdinc
AUTOMAKE_OPTIONS = foreign nostdinc 1.9.6
ACLOCAL_AMFLAGS = -I m4 --install
ACLOCAL_AMFLAGS = -I m4
# Specify our include paths here, and do it relative to $(top_srcdir) and
# $(top_builddir), to ensure that these paths which belong to the library
# being currently built and tested are searched before the library which
# might possibly already be installed in the system.
#
# When using the low-level hard-hacking memory leak tracking code from
# libcurl the generated curl/curlbuild.h file must also be reachable.
# Using the libcurl lowlevel code from within c-ares library is ugly and
# only works when c-ares is built and linked with a similarly debug-build
# libcurl, but we do this anyway for convenience.
#
# $(top_builddir)/../include/curl for generated curlbuild.h included from curl.h
# $(top_builddir)/../include is for libcurl's generated curl/curlbuild.h file
# $(top_srcdir)/../include is for libcurl's external include files
# $(top_builddir)/../lib is for libcurl's generated lib/curl_config.h file
# $(top_srcdir)/../lib is for libcurl's lib/setup.h and other "private" files
# $(top_builddir) is for c-ares's generated ares_config.h file
# $(top_srcdir) is for c-ares's ares_setup.h and other "c-ares-private" files
if CURLDEBUG
AM_CPPFLAGS = -I$(top_builddir)/../include/curl \
-I$(top_builddir)/../include \
-I$(top_srcdir)/../include \
-I$(top_builddir)/../lib \
-I$(top_srcdir)/../lib \
-I$(top_builddir) \
-I$(top_srcdir)
else
AM_CPPFLAGS = -I$(top_builddir) \
-I$(top_srcdir)
endif
lib_LTLIBRARIES = libcares.la
man_MANS = $(MANPAGES)
MSVCFILES = vc/vc6aws.dsw vc/acountry/vc6acountry.dsp vc/adig/vc6adig.dsp \
vc/ahost/vc6ahost.dsp vc/cares/vc6cares.dsp vc/cares/vc6cares.dsw \
msvc_ver.inc
if CURLDEBUG
PROGS =
else
PROGS = ahost adig acountry
endif
noinst_PROGRAMS =$(PROGS)
MSVCFILES = msvc_ver.inc buildconf.bat
# adig and ahost are just sample programs and thus not mentioned with the
# regular sources and headers
EXTRA_DIST = AUTHORS CHANGES README.cares Makefile.inc Makefile.dj \
Makefile.m32 Makefile.netware Makefile.msvc Makefile.Watcom $(man_MANS) \
config-win32.h RELEASE-NOTES libcares.pc.in buildconf get_ver.awk maketgz \
TODO ares_build.h.in cares.rc README.msvc $(MSVCFILES) \
$(CSOURCES) $(HHEADERS) config-dos.h acountry.1 adig.1 ahost.1 INSTALL.md \
CMakeLists.txt ares_build.h.cmake ares_config.h.cmake c-ares-config.cmake.in \
libcares.pc.cmake README.md LICENSE.md RELEASE-PROCEDURE.md
EXTRA_DIST = AUTHORS CHANGES README.cares $(man_MANS) RELEASE-NOTES \
c-ares-config.cmake.in libcares.pc.cmake libcares.pc.in buildconf get_ver.awk \
maketgz TODO README.msvc $(MSVCFILES) INSTALL.md README.md LICENSE.md \
CMakeLists.txt Makefile.dj Makefile.m32 Makefile.netware Makefile.msvc \
Makefile.Watcom AUTHORS CONTRIBUTING.md SECURITY.md TODO
CLEANFILES = $(PDFPAGES) $(HTMLPAGES)
DISTCLEANFILES = ares_build.h
DISTCLEANFILES = include/ares_build.h
DIST_SUBDIRS = test
DIST_SUBDIRS = include src
SUBDIRS = @BUILD_SUBDIRS@
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libcares.pc
CARES_VERSION_INFO = -version-info 6:1:4
# This flag accepts an argument of the form current[:revision[:age]]. So,
# passing -version-info 3:12:1 sets current to 3, revision to 12, and age to
# 1.
#
# If either revision or age are omitted, they default to 0. Also note that age
# must be less than or equal to the current interface number.
#
# Here are a set of rules to help you update your library version information:
#
# 1.Start with version information of 0:0:0 for each libtool library.
#
# 2.Update the version information only immediately before a public release of
# your software. More frequent updates are unnecessary, and only guarantee
# that the current interface number gets larger faster.
#
# 3.If the library source code has changed at all since the last update, then
# increment revision (c:r+1:a)
#
# 4.If any interfaces have been added, removed, or changed since the last
# update, increment current, and set revision to 0. (c+1:r=0:a)
#
# 5.If any interfaces have been added since the last public release, then
# increment age. (c:r:a+1)
#
# 6.If any interfaces have been removed since the last public release, then
# set age to 0. (c:r:a=0)
#
AM_LDFLAGS =
libcares_la_LDFLAGS_EXTRA =
if CARES_LT_SHLIB_USE_VERSION_INFO
libcares_la_LDFLAGS_EXTRA += $(CARES_VERSION_INFO)
endif
if CARES_LT_SHLIB_USE_NO_UNDEFINED
libcares_la_LDFLAGS_EXTRA += -no-undefined
endif
if CARES_LT_SHLIB_USE_MIMPURE_TEXT
libcares_la_LDFLAGS_EXTRA += -mimpure-text
endif
libcares_la_LDFLAGS = $(AM_LDFLAGS) $(libcares_la_LDFLAGS_EXTRA)
# Add -Werror if defined
CFLAGS += @CARES_CFLAG_EXTRAS@
if USE_CPPFLAG_CARES_STATICLIB
AM_CPPFLAGS += $(CPPFLAG_CARES_STATICLIB)
endif
libcares_la_CFLAGS_EXTRA =
libcares_la_CPPFLAGS_EXTRA = -DCARES_BUILDING_LIBRARY
if DOING_CARES_SYMBOL_HIDING
libcares_la_CFLAGS_EXTRA += $(CFLAG_CARES_SYMBOL_HIDING)
libcares_la_CPPFLAGS_EXTRA += -DCARES_SYMBOL_HIDING
endif
@CODE_COVERAGE_RULES@
libcares_la_LDFLAGS += $(CODE_COVERAGE_LDFLAGS)
libcares_la_CFLAGS_EXTRA += $(CODE_COVERAGE_CFLAGS)
libcares_la_CFLAGS = $(AM_CFLAGS) $(libcares_la_CFLAGS_EXTRA)
libcares_la_CPPFLAGS = $(AM_CPPFLAGS) $(libcares_la_CPPFLAGS_EXTRA)
# Makefile.inc provides the CSOURCES and HHEADERS defines
include Makefile.inc
libcares_la_SOURCES = $(CSOURCES) $(HHEADERS)
# where to install the c-ares headers
libcares_ladir = $(includedir)
# what headers to install on 'make install':
libcares_la_HEADERS = ares.h ares_version.h ares_dns.h \
ares_build.h ares_rules.h
ahost_SOURCES = ahost.c $(SAMPLESOURCES) $(SAMPLEHEADERS)
ahost_LDADD = $(top_builddir)/libcares.la
ahost_CFLAGS = $(AM_CFLAGS)
ahost_CPPFLAGS = $(AM_CPPFLAGS)
adig_SOURCES = adig.c $(SAMPLESOURCES) $(SAMPLEHEADERS)
adig_LDADD = $(top_builddir)/libcares.la
adig_CFLAGS = $(AM_CFLAGS)
adig_CPPFLAGS = $(AM_CPPFLAGS)
acountry_SOURCES = acountry.c $(SAMPLESOURCES) $(SAMPLEHEADERS)
acountry_LDADD = $(top_builddir)/libcares.la
acountry_CFLAGS = $(AM_CFLAGS)
acountry_CPPFLAGS = $(AM_CPPFLAGS)
SOURCEDMANDIR = man3
SOURCEDMANPAGES = ares_init.3
clean-local: clean-sourced-manpages
clean-sourced-manpages:
@srcdmandir='$(SOURCEDMANDIR)'; \
echo "rm -rf $(top_builddir)/$$srcdmandir"; \
rm -rf $(top_builddir)/$$srcdmandir
sourced-manpages: clean-sourced-manpages
@srcdmandir='$(SOURCEDMANDIR)'; \
srcdmanfiles='$(SOURCEDMANPAGES)'; \
mkdir $(top_builddir)/$$srcdmandir; \
for file in $$srcdmanfiles; do \
if test -f $(top_srcdir)/$$file; then \
echo "cp $(top_srcdir)/$$file $(top_builddir)/$$srcdmandir/$$file"; \
cp $(top_srcdir)/$$file $(top_builddir)/$$srcdmandir/$$file; \
fi; \
done
MAN2HTML = roffit --mandir=. < $< >$@
SUFFIXES = .3 .html
html: sourced-manpages $(HTMLPAGES)
.3.html:
$(MAN2HTML)
pdf: sourced-manpages $(PDFPAGES)
.3.pdf:
@(foo=`echo $@ | sed -e 's/\.[0-9]$$//g'`; \
groff -Tps -man $< >$$foo.ps; \
ps2pdf $$foo.ps $@; \
rm $$foo.ps; \
echo "converted $< to $@")
# Make files named *.dist replace the file without .dist extension
dist-hook:
......
#
# c-ares Makefile for djgpp/gcc/Watt-32.
# By Gisle Vanem <gvanem@yahoo.no> 2004.
# By Gisle Vanem <gvanem@yahoo.no> 2004 - 2020.
#
include src/lib/Makefile.inc
CSOURCES := $(addprefix src/lib/, $(CSOURCES))
CSOURCES := $(filter-out src/lib/windows_port.c, $(CSOURCES))
TOPDIR = ..
VPATH = src/lib src/tools
DEPEND_PREREQ = ares_config.h
#
# Root directory for Waterloo tcp/ip.
# WATT_ROOT should be set during Watt-32 install.
#
WATT32_ROOT = $(realpath $(WATT_ROOT))
WATT32_LIB = $(WATT32_ROOT)/lib/libwatt.a
include ../packages/DOS/common.dj
include Makefile.inc
OBJ_DIR = djgpp
CFLAGS += -DWATT32 -Dselect=select_s
CFLAGS = -g -O2 -I./include -I./src/lib \
-I$(WATT32_ROOT)/inc -Wall \
-DWATT32 -DHAVE_CONFIG_H \
-Dselect=select_s
LDFLAGS = -s
ifeq ($(USE_CURLDEBUG),1)
EX_LIBS = ../lib/libcurl.a
OBJ_HACK = $(OBJECTS)
else
OBJ_HACK = libcares.a
endif
ifeq ($(OS),Windows_NT)
#
# Windows hosted djgpp cross compiler. Get it from:
# https://github.com/andrewwutw/build-djgpp/releases
#
DJ_PREFIX ?= c:/some-path/djgpp/bin/i586-pc-msdosdjgpp-
CC = $(DJ_PREFIX)gcc
ifeq ($(USE_SSL),1)
EX_LIBS += $(OPENSSL_ROOT)/lib/libssl.a $(OPENSSL_ROOT)/lib/libcrypt.a
else
#
# The normal djgpp 'gcc' for MSDOS.
#
CC = gcc
endif
ifeq ($(USE_ZLIB),1)
EX_LIBS += $(ZLIB_ROOT)/libz.a
endif
OBJECTS = $(addprefix $(OBJ_DIR)/, \
$(notdir $(CSOURCES:.c=.o)))
ifeq ($(USE_IDNA),1)
EX_LIBS += $(LIBIDN_ROOT)/lib/dj_obj/libidn.a -liconv
endif
GENERATED = src/lib/ares_config.h \
include/ares_build.h
EX_LIBS += $(WATT32_ROOT)/lib/libwatt.a
TARGETS = libcares.a acountry.exe adig.exe ahost.exe
OBJECTS = $(addprefix $(OBJ_DIR)/, $(CSOURCES:.c=.o))
.SECONDARY: $(OBJ_DIR)/ares_getopt.o
all: $(OBJ_DIR) ares_config.h libcares.a ahost.exe adig.exe acountry.exe
all: $(OBJ_DIR) $(GENERATED) $(TARGETS)
@echo Welcome to c-ares.
libcares.a: $(OBJECTS)
ar rs $@ $?
ares_config.h: config-dos.h
$(COPY) $^ $@
ar rs $@ $(OBJECTS)
ahost.exe: ahost.c $(OBJ_DIR)/ares_getopt.o $(OBJ_HACK)
$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $^ $(EX_LIBS)
src/lib/ares_config.h: src/lib/config-dos.h
cp --update $< $@
adig.exe: adig.c $(OBJ_DIR)/ares_getopt.o $(OBJ_HACK)
$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $^ $(EX_LIBS)
include/ares_build.h: include/ares_build.h.dist
cp --update $< $@
acountry.exe: acountry.c $(OBJ_DIR)/ares_getopt.o $(OBJ_HACK)
$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $^ $(EX_LIBS)
%.exe: src/tools/%.c $(OBJ_DIR)/ares_getopt.o libcares.a
$(call compile_and_link, $@, $^ $(WATT32_LIB))
# clean generated files
# Clean generated files and objects.
#
genclean:
- $(DELETE) ares_config.h
clean:
- rm -f depend.dj $(GENERATED) $(OBJ_DIR)/*.o
- rmdir $(OBJ_DIR)
# clean object files and subdir
# Clean everything
#
objclean: genclean
- $(DELETE) $(OBJ_DIR)$(DS)*.o
- $(RMDIR) $(OBJ_DIR)
realclean vclean: clean
- rm -f $(TARGETS) $(TARGETS:.exe=.map)
# clean without removing built library and programs
#
clean: objclean
- $(DELETE) depend.dj
$(OBJ_DIR):
- mkdir $@
$(OBJ_DIR)/%.o: %.c
$(CC) $(CFLAGS) -o $@ -c $<
@echo
define compile_and_link
$(CC) -o $(1) $(CFLAGS) $(LDFLAGS) -Wl,--print-map,--sort-common $(2) > $(1:.exe=.map)
@echo
endef
DEP_REPLACE = sed -e 's@\(.*\)\.o: @\n$$(OBJ_DIR)\/\1.o: @' \
-e 's@$(WATT32_ROOT)@$$(WATT32_ROOT)@g'
# clean everything
#
realclean vclean: clean
- $(DELETE) libcares.a
- $(DELETE) acountry.exe
- $(DELETE) adig.exe
- $(DELETE) ahost.exe
- $(DELETE) libcares.a
# One may have to do 'make -f Makefile.dj clean' first in case
# a foreign 'curl_config.h' is making trouble.
#
depend: $(GENERATED) Makefile.dj
$(CC) -MM $(CFLAGS) $(CSOURCES) | $(DEP_REPLACE) > depend.dj
-include depend.dj
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -8,7 +8,7 @@
########################################################
## Nothing more to do below this line!
LIB = libcares.a
LIB = src/lib/libcares.a
AR = $(CROSSPREFIX)ar
CC = $(CROSSPREFIX)gcc
......@@ -17,15 +17,15 @@ RANLIB = $(CROSSPREFIX)ranlib
#RM = rm -f
CP = cp -afv
CFLAGS = $(CARES_CFLAG_EXTRAS) -O2 -Wall -I. -D_WIN32_WINNT=0x0600
CFLAGS = $(CARES_CFLAG_EXTRAS) -O2 -Wall -I./include -I./src/lib -D_WIN32_WINNT=0x0600
CFLAGS += -DCARES_STATICLIB
LDFLAGS = $(CARES_LDFLAG_EXTRAS) -s
LIBS = -lwsock32
# Makefile.inc provides the CSOURCES and HHEADERS defines
include Makefile.inc
include src/lib/Makefile.inc
OBJLIB := $(patsubst %.c,%.o,$(strip $(CSOURCES)))
OBJLIB := $(patsubst %.c,src/lib/%.o,$(strip $(CSOURCES)))
$(LIB): $(OBJLIB)
......@@ -34,21 +34,21 @@ $(LIB): $(OBJLIB)
all: $(LIB) demos
demos: adig.exe ahost.exe acountry.exe
demos: src/tools/adig.exe src/tools/ahost.exe src/tools/acountry.exe
tags:
etags *.[ch]
%.exe: %.o ares_getopt.o $(LIB)
%.exe: %.o src/tools/ares_getopt.o $(LIB)
$(LD) $(LDFLAGS) -o $@ $^ $(LIBS)
$(OBJLIB): ares.h ares_dns.h ares_private.h ares_build.h ares_rules.h
$(OBJLIB): include/ares.h include/ares_dns.h include/ares_build.h
.c.o:
$(CC) $(CFLAGS) -c $<
$(CC) $(CFLAGS) -o $@ -c $<
ares_build.h:
$(CP) ares_build.h.dist ares_build.h
include/ares_build.h:
$(CP) include/ares_build.h.dist include/ares_build.h
check:
......@@ -59,18 +59,19 @@ install:
${INSTALL} -m 644 $(LIB) ${DESTDIR}${libdir}
${RANLIB} ${DESTDIR}${libdir}/$(LIB)
chmod u-w ${DESTDIR}${libdir}/$(LIB)
${INSTALL} -m 444 ${srcdir}/ares.h ${DESTDIR}${includedir}
${INSTALL} -m 444 ${srcdir}/ares_build.h ${DESTDIR}${includedir}
${INSTALL} -m 444 ${srcdir}/ares_rules.h ${DESTDIR}${includedir}
${INSTALL} -m 444 ${srcdir}/include/ares.h ${DESTDIR}${includedir}
${INSTALL} -m 444 ${srcdir}/include/ares_build.h ${DESTDIR}${includedir}
${INSTALL} -m 444 ${srcdir}/include/ares_rules.h ${DESTDIR}${includedir}
${INSTALL} -m 444 ${srcdir}/include/ares_version.h ${DESTDIR}${includedir}
(for man in $(MANPAGES); do \
${INSTALL} -m 444 ${srcdir}/$${man} ${DESTDIR}${mandir}/man3; \
done)
clean:
$(RM) ares_getopt.o $(OBJLIB) $(LIB) adig.exe ahost.exe acountry.exe
$(RM) src/tools/ares_getopt.o $(OBJLIB) $(LIB) src/tools/adig.exe src/tools/ahost.exe src/tools/acountry.exe
distclean: clean
$(RM) config.cache config.log config.status Makefile
ifeq "$(wildcard ares_build.h.dist)" "ares_build.h.dist"
$(RM) ares_build.h
ifeq "$(wildcard include/ares_build.h.dist)" "include/ares_build.h.dist"
$(RM) include/ares_build.h
endif
......@@ -80,7 +80,7 @@ USE_WATT32 = 0
# Verify that current subdir is the c-ares source one
# ----------------------------------------------------
!IF ! EXIST(.\ares_init.c)
!IF ! EXIST(.\src\lib\ares_init.c)
! MESSAGE Can not process Makefile.msvc from outside of c-ares source subdirectory.
! MESSAGE Change to the subdirectory where Makefile.msvc is found, and try again.
! ERROR See previous message.
......@@ -212,7 +212,7 @@ RT_ERROR_CHECKING = /RTCsu
CC_CMD_REL = cl.exe /nologo $(RTLIB) /DNDEBUG /O2
CC_CMD_DBG = cl.exe /nologo $(RTLIBD) /D_DEBUG /Od /Zi $(RT_ERROR_CHECKING)
CC_CFLAGS = $(CFLAGS) /I. /W3 /EHsc /FD
CC_CFLAGS = $(CFLAGS) /I.\src\lib /I.\include /W3 /EHsc /FD
RC_CMD_REL = rc.exe /l 0x409 /d "NDEBUG"
RC_CMD_DBG = rc.exe /l 0x409 /d "_DEBUG"
......@@ -280,7 +280,8 @@ RC_CMD = $(RC_CMD_DBG)
# Makefile.inc provides lists of source files
# --------------------------------------------
!INCLUDE .\Makefile.inc
!INCLUDE .\src\lib\Makefile.inc
!INCLUDE .\src\tools\Makefile.inc
# ----------------------------
# Build lists of object files
......@@ -308,6 +309,7 @@ CARES_OBJS = $(CARES_OBJS) $(CARES_OBJDIR)\cares.res
!ERROR Problem generating PROG1_OBJS list.
!ENDIF
PROG1_OBJS = $(PROG1_OBJS:.c=.obj)
PROG1_OBJS = $(PROG1_OBJS:/=\)
PROG1_OBJS = $(PROG1_OBJS) $(PROG1_OBJDIR)\acountry.obj
!IF [ECHO PROG2_OBJS=^$(PROG2_OBJDIR)\$(SAMPLESOURCES: = $(PROG2_OBJDIR^)\) > .\prog2_objs.inc] == 0
......@@ -318,6 +320,7 @@ PROG1_OBJS = $(PROG1_OBJS) $(PROG1_OBJDIR)\acountry.obj
!ERROR Problem generating PROG2_OBJS list.
!ENDIF
PROG2_OBJS = $(PROG2_OBJS:.c=.obj)
PROG2_OBJS = $(PROG2_OBJS:/=\)
PROG2_OBJS = $(PROG2_OBJS) $(PROG2_OBJDIR)\adig.obj
!IF [ECHO PROG3_OBJS=^$(PROG3_OBJDIR)\$(SAMPLESOURCES: = $(PROG3_OBJDIR^)\) > .\prog3_objs.inc] == 0
......@@ -328,10 +331,12 @@ PROG2_OBJS = $(PROG2_OBJS) $(PROG2_OBJDIR)\adig.obj
!ERROR Problem generating PROG3_OBJS list.
!ENDIF
PROG3_OBJS = $(PROG3_OBJS:.c=.obj)
PROG3_OBJS = $(PROG3_OBJS:/=\)
PROG3_OBJS = $(PROG3_OBJS) $(PROG3_OBJDIR)\ahost.obj
!ENDIF
# --------------------------------
# Only our custom inference rules
# --------------------------------
......@@ -339,21 +344,33 @@ PROG3_OBJS = $(PROG3_OBJS) $(PROG3_OBJDIR)\ahost.obj
.SUFFIXES:
.SUFFIXES: .c .rc
{$(SRCDIR)}.rc{$(CARES_OBJDIR)}.res:
{$(SRCDIR)\src\lib}.rc{$(CARES_OBJDIR)}.res:
$(RC_CMD) /Fo $@ $<
{$(SRCDIR)}.c{$(CARES_OBJDIR)}.obj:
{$(SRCDIR)\src\lib}.c{$(CARES_OBJDIR)}.obj:
$(CC_CMD) $(CC_CFLAGS) $(CARES_CFLAGS) /Fo$@ /Fd$(@D)\ /c $<
{$(SRCDIR)}.c{$(PROG1_OBJDIR)}.obj:
{$(SRCDIR)\src\tools}.c{$(PROG1_OBJDIR)}.obj:
$(CC_CMD) $(CC_CFLAGS) $(SPROG_CFLAGS) /Fo$@ /Fd$(@D)\ /c $<
{$(SRCDIR)}.c{$(PROG2_OBJDIR)}.obj:
{$(SRCDIR)\src\tools}.c{$(PROG2_OBJDIR)}.obj:
$(CC_CMD) $(CC_CFLAGS) $(SPROG_CFLAGS) /Fo$@ /Fd$(@D)\ /c $<
{$(SRCDIR)}.c{$(PROG3_OBJDIR)}.obj:
{$(SRCDIR)\src\tools}.c{$(PROG3_OBJDIR)}.obj:
$(CC_CMD) $(CC_CFLAGS) $(SPROG_CFLAGS) /Fo$@ /Fd$(@D)\ /c $<
# Hack Alert! we reference ../lib/ files in the Makefile.inc for tools as they
# share some files with the library itself. We need to hack around that here.
{$(SRCDIR)\src\lib}.c{$(PROG1_OBJDIR)\..\lib}.obj:
$(CC_CMD) $(CC_CFLAGS) $(SPROG_CFLAGS) /Fo$(PROG1_OBJDIR)\$(@F) /Fd$(PROG1_OBJDIR)\ /c $<
{$(SRCDIR)\src\lib}.c{$(PROG2_OBJDIR)\..\lib}.obj:
$(CC_CMD) $(CC_CFLAGS) $(SPROG_CFLAGS) /Fo$(PROG2_OBJDIR)\$(@F) /Fd$(PROG2_OBJDIR)\ /c $<
{$(SRCDIR)\src\lib}.c{$(PROG3_OBJDIR)\..\lib}.obj:
$(CC_CMD) $(CC_CFLAGS) $(SPROG_CFLAGS) /Fo$(PROG3_OBJDIR)\$(@F) /Fd$(PROG3_OBJDIR)\ /c $<
# ------------------------------------------------------------- #
# ------------------------------------------------------------- #
# Default target when no CFG library type has been specified, #
......@@ -389,22 +406,26 @@ install:
ALL: c-ares acountry adig ahost
@
c-ares: $(HHEADERS) $(CSOURCES) $(CARES_OBJDIR) $(CARES_OBJS) $(CARES_OUTDIR)
# $(HHEADERS) $(CSOURCES)
c-ares: $(CARES_OBJDIR) $(CARES_OBJS) $(CARES_OUTDIR)
$(CARES_LINK) $(CARES_LFLAGS) /out:$(CARES_OUTDIR)\$(CARES_TARGET) $(CARES_OBJS)
! IF "$(USE_RES_FILE)" == "TRUE"
@if exist $(CARES_OUTDIR)\$(CARES_TARGET).manifest mt -nologo -manifest $(CARES_OUTDIR)\$(CARES_TARGET).manifest -outputresource:$(CARES_OUTDIR)\$(CARES_TARGET);2
! ENDIF
acountry: c-ares acountry.c $(SAMPLESOURCES) $(SAMPLEHEADERS) $(PROG1_OBJDIR) $(PROG1_OBJS) $(PROG1_OUTDIR)
$(SPROG_LINK) $(SPROG_LFLAGS) /out:$(PROG1_OUTDIR)\acountry.exe $(PROG1_OBJS)
# acountry.c $(SAMPLESOURCES) $(SAMPLEHEADERS)
acountry: c-ares $(PROG1_OBJDIR) $(PROG1_OBJS) $(PROG1_OUTDIR)
$(SPROG_LINK) $(SPROG_LFLAGS) /out:$(PROG1_OUTDIR)\acountry.exe $(PROG1_OBJS:..\lib=)
@if exist $(PROG1_OUTDIR)\acountry.exe.manifest mt -nologo -manifest $(PROG1_OUTDIR)\acountry.exe.manifest -outputresource:$(PROG1_OUTDIR)\acountry.exe;1
adig: c-ares adig.c $(SAMPLESOURCES) $(SAMPLEHEADERS) $(PROG2_OBJDIR) $(PROG2_OBJS) $(PROG2_OUTDIR)
$(SPROG_LINK) $(SPROG_LFLAGS) /out:$(PROG2_OUTDIR)\adig.exe $(PROG2_OBJS)
# adig.c $(SAMPLESOURCES) $(SAMPLEHEADERS)
adig: c-ares $(PROG2_OBJDIR) $(PROG2_OBJS) $(PROG2_OUTDIR)
$(SPROG_LINK) $(SPROG_LFLAGS) /out:$(PROG2_OUTDIR)\adig.exe $(PROG2_OBJS:..\lib=)
@if exist $(PROG2_OUTDIR)\adig.exe.manifest mt -nologo -manifest $(PROG2_OUTDIR)\adig.exe.manifest -outputresource:$(PROG2_OUTDIR)\adig.exe;1
ahost: c-ares ahost.c $(SAMPLESOURCES) $(SAMPLEHEADERS) $(PROG3_OBJDIR) $(PROG3_OBJS) $(PROG3_OUTDIR)
$(SPROG_LINK) $(SPROG_LFLAGS) /out:$(PROG3_OUTDIR)\ahost.exe $(PROG3_OBJS)
# ahost.c $(SAMPLESOURCES) $(SAMPLEHEADERS)
ahost: c-ares $(PROG3_OBJDIR) $(PROG3_OBJS) $(PROG3_OUTDIR)
$(SPROG_LINK) $(SPROG_LFLAGS) /out:$(PROG3_OUTDIR)\ahost.exe $(PROG3_OBJS:..\lib=)
@if exist $(PROG3_OUTDIR)\ahost.exe.manifest mt -nologo -manifest $(PROG3_OUTDIR)\ahost.exe.manifest -outputresource:$(PROG3_OUTDIR)\ahost.exe;1
$(CARES_OUTDIR): $(CARES_DIR)
......@@ -443,11 +464,11 @@ install:
@if not exist "$(INSTALL_DIR)" mkdir "$(INSTALL_DIR)"
@if not exist "$(INSTALL_DIR_LIB)" mkdir "$(INSTALL_DIR_LIB)"
@if not exist "$(INSTALL_DIR_INC)" mkdir "$(INSTALL_DIR_INC)"
@copy /y $(CARES_OUTDIR)\*.* "$(INSTALL_DIR_LIB)" >NUL
@copy /y $(SRCDIR)\ares.h "$(INSTALL_DIR_INC)" >NUL
@copy /y $(SRCDIR)\ares_build.h "$(INSTALL_DIR_INC)" >NUL
@copy /y $(SRCDIR)\ares_rules.h "$(INSTALL_DIR_INC)" >NUL
@copy /y $(SRCDIR)\ares_version.h "$(INSTALL_DIR_INC)" >NUL
@copy /y $(CARES_OUTDIR)\*.* "$(INSTALL_DIR_LIB)" >NUL
@copy /y $(SRCDIR)\include\ares.h "$(INSTALL_DIR_INC)" >NUL
@copy /y $(SRCDIR)\include\ares_build.h "$(INSTALL_DIR_INC)" >NUL
@copy /y $(SRCDIR)\include\ares_rules.h "$(INSTALL_DIR_INC)" >NUL
@copy /y $(SRCDIR)\include\ares_version.h "$(INSTALL_DIR_INC)" >NUL
@echo Installed c-ares $(CFG)
!ENDIF
......
......@@ -34,7 +34,7 @@ ifndef LIBARCH
LIBARCH = LIBC
endif
# must be equal to NDEBUG or DEBUG, CURLDEBUG
# must be equal to NDEBUG or DEBUG
ifndef DB
DB = NDEBUG
endif
......@@ -134,9 +134,7 @@ else
# INCLUDES += -I$(SDK_CLIB)/include/nlm/obsolete
# INCLUDES += -I$(SDK_CLIB)/include
endif
ifeq ($(DB),CURLDEBUG)
INCLUDES += -I../include
endif
CFLAGS += -I. $(INCLUDES)
ifeq ($(MTSAFE),YES)
......
___ __ _ _ __ ___ ___
___ __ _ _ __ ___ ___
/ __| ___ / _` | '__/ _ \/ __|
| (_ |___| (_| | | | __/\__ \
\___| \__,_|_| \___||___/
......@@ -64,46 +64,6 @@
to c-ares source folder where Makefile.msvc file is located.
How to build using Visual Studio 6 IDE
--------------------------------------
A VC++ 6.0 reference workspace (vc6aws.dsw) is available within the 'vc'
folder to allow proper building of the library and sample programs.
1) Open the vc6aws.dsw workspace with MSVC6's IDE.
2) Select 'Build' from top menu.
3) Select 'Batch Build' from dropdown menu.
4) Make sure that the sixteen project configurations are 'checked'.
5) Click on the 'Build' button.
6) Once the sixteen project configurations are built you are done.
Dynamic and static c-ares libraries are built in debug and release flavours,
and can be located each one in its own subdirectory, dll-debug, dll-release,
lib-debug and lib-release, all of them below the 'vc\cares' subdirectory.
In the same way four executable versions of each sample program are built,
each using its respective library. The resulting sample executables are
located in its own subdirectory, dll-debug, dll-release, lib-debug and
lib-release, below the 'vc\acountry', 'vc\adig' and 'vc\ahost'folders.
These reference VC++ 6.0 configurations are generated using the dynamic CRT.
How to build using Visual Studio 2003 or newer IDE
--------------------------------------------------
First you have to convert the VC++ 6.0 reference workspace and project files
to the Visual Studio IDE version you are using, following next steps:
1) Open vc\vc6aws.dsw with VS20XX.
2) Allow VS20XX to update all projects and workspaces.
3) Save ALL and close VS20XX.
4) Open vc\vc6aws.sln with VS20XX.
5) Select batch build, check 'all' projects and click 'build' button.
Same comments relative to generated files and folders as done above for
Visual Studio 6 IDE apply here.
Relationship between c-ares library file names and versions
-----------------------------------------------------------
......@@ -139,4 +99,4 @@
Have Fun!
c-ares version 1.16.1
c-ares version 1.17.1
Due to a packaging issue with 1.17.0, we have released 1.17.1 to address that
issue. See 1.17.0 release notes below..
c-ares version 1.17.0
Security:
o Prevent possible use-after-free and double-free in ares_getaddrinfo() if
ares_destroy() is called prior to ares_getaddrinfo() completing. Reported
by Jann Horn at Google Project Zero.
o avoid read-heap-buffer-overflow in ares_parse_soa_reply found during
fuzzing [2] [3]
o Avoid theoretical buffer overflow in RC4 loop comparison [5]
o Empty hquery->name could lead to invalid memory access [15]
o ares_parse_{a,aaaa}_reply() could return a larger *naddrttls than was
passed in [17]
Changes:
o Allow TXT records on CHAOS qclass. Used for retriving things like
version.bind, version.server, authoris.bind, hostname.bind, and id.server.
[3]
o Update help information for adig, acountry, and ahost [4]
o Test Suite now uses dynamic system-assigned ports rather than hardcoded
ports to prevent failures in containers [10]
o Detect remote DNS server does not support EDNS using rules from RFC 6891 [12]
o Source tree has been reorganized to use a more modern layout [13]
o Allow parsing of CAA Resource Record [14]
Bug fixes:
o Fix Windows Unicode incompatibilities with ares_getaddrinfo() [1]
o Silence false cast-align compiler warnings due to valid casts of
struct sockaddr to struct sockaddr_in and struct sockaddr_in6.
o MacOS should use libresolv for retrieving DNS servers, like iOS
o CMake build system should populate the INCLUDE_DIRECTORIES property of
installed targets [2]
o Correct macros in use for the ares_getaddrinfo.3 man page
o readaddrinfo bad sizeof() [1]
o Test cases should honor HAVE_WRITEV flag, not depend on WIN32 [6]
o FQDN with trailing period should be queried first [7]
o ares_getaddrinfo() was returning members of the struct as garbage values if
unset, and was not honoring ai_socktype and ai_protocol hints. [8] [9]
o ares_gethostbyname() with AF_UNSPEC and an ip address would fail [11]
o Properly document ares_set_local_ip4() uses host byte order [16]
Thanks go to these friendly people for their efforts and contributions:
Brad House (@bradh352), Daniel Stenberg (@bagder), Dmitry Igrishin (@dmitigr),
Jann Horn, Shelly Vohr, Teemu R (@rytilahti)
(6 contributors)
@anonymoushelpishere
Anthony Penniston (@apenn-msft)
Brad House (@bradh352)
Bulat Gaifullin (@bgaifullin)
Daniela Sonnenschein (@lxdicted)
Daniel Stenberg (@bagder)
David Hotham (@dimbleby)
Fionn Fitzmaurice (@fionn)
Gisle Vanem (@gavenm)
Ivan Baidakou (@basiliscos)
Jonathan Maye-Hobbs (@wheelpharoah)
Łukasz Marszał (@lmarszal)
lutianxiong (@ltx2018)
Seraphime Kirkovski (@Seraphime)
(14 contributors)
References to bug reports and discussions on issues:
[1] = https://github.com/c-ares/c-ares/pull/328
[2] = https://github.com/c-ares/c-ares/pull/323
[3] = https://github.com/c-ares/c-ares/pull/321
[1] = https://github.com/c-ares/c-ares/pull/331
[2] = https://github.com/c-ares/c-ares/pull/332
[3] = https://github.com/c-ares/c-ares/issues/333
[4] = https://github.com/c-ares/c-ares/pull/334
[5] = https://github.com/c-ares/c-ares/pull/336
[6] = https://github.com/c-ares/c-ares/pull/344
[7] = https://github.com/c-ares/c-ares/pull/345
[8] = https://github.com/c-ares/c-ares/issues/343
[9] = https://github.com/c-ares/c-ares/issues/317
[10] = https://github.com/c-ares/c-ares/pull/346
[11] = https://github.com/c-ares/c-ares/pull/204
[12] = https://github.com/c-ares/c-ares/pull/244
[13] = https://github.com/c-ares/c-ares/pull/349
[14] = https://github.com/c-ares/c-ares/pull/360
[15] = https://github.com/c-ares/c-ares/pull/367
[16] = https://github.com/c-ares/c-ares/pull/368
[17] = https://github.com/c-ares/c-ares/issues/371
# generated automatically by aclocal 1.16.1 -*- Autoconf -*-
# generated automatically by aclocal 1.16.2 -*- Autoconf -*-
# Copyright (C) 1996-2018 Free Software Foundation, Inc.
# Copyright (C) 1996-2020 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -20,7 +20,7 @@ You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically 'autoreconf'.])])
# Copyright (C) 2002-2018 Free Software Foundation, Inc.
# Copyright (C) 2002-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -35,7 +35,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION],
[am__api_version='1.16'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
m4_if([$1], [1.16.1], [],
m4_if([$1], [1.16.2], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
......@@ -51,14 +51,14 @@ m4_define([_AM_AUTOCONF_VERSION], [])
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
[AM_AUTOMAKE_VERSION([1.16.1])dnl
[AM_AUTOMAKE_VERSION([1.16.2])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
# Copyright (C) 2001-2018 Free Software Foundation, Inc.
# Copyright (C) 2001-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -110,7 +110,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd`
# AM_CONDITIONAL -*- Autoconf -*-
# Copyright (C) 1997-2018 Free Software Foundation, Inc.
# Copyright (C) 1997-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -141,7 +141,7 @@ AC_CONFIG_COMMANDS_PRE(
Usually this means the macro was only invoked conditionally.]])
fi])])
# Copyright (C) 1999-2018 Free Software Foundation, Inc.
# Copyright (C) 1999-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -332,7 +332,7 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
# Generate code to set up dependency tracking. -*- Autoconf -*-
# Copyright (C) 1999-2018 Free Software Foundation, Inc.
# Copyright (C) 1999-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -371,7 +371,9 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
done
if test $am_rc -ne 0; then
AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments
for automatic dependency tracking. Try re-running configure with the
for automatic dependency tracking. If GNU make was not used, consider
re-running the configure script with MAKE="gmake" (or whatever is
necessary). You can also try re-running configure with the
'--disable-dependency-tracking' option to at least be able to build
the package (albeit without support for automatic dependency tracking).])
fi
......@@ -398,7 +400,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
# Do all the work for Automake. -*- Autoconf -*-
# Copyright (C) 1996-2018 Free Software Foundation, Inc.
# Copyright (C) 1996-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -595,7 +597,7 @@ for _am_header in $config_headers :; do
done
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
# Copyright (C) 2001-2018 Free Software Foundation, Inc.
# Copyright (C) 2001-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -616,7 +618,7 @@ if test x"${install_sh+set}" != xset; then
fi
AC_SUBST([install_sh])])
# Copyright (C) 2003-2018 Free Software Foundation, Inc.
# Copyright (C) 2003-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -638,7 +640,7 @@ AC_SUBST([am__leading_dot])])
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
# From Jim Meyering
# Copyright (C) 1996-2018 Free Software Foundation, Inc.
# Copyright (C) 1996-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -673,7 +675,7 @@ AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
# Check to see how 'make' treats includes. -*- Autoconf -*-
# Copyright (C) 2001-2018 Free Software Foundation, Inc.
# Copyright (C) 2001-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -716,7 +718,7 @@ AC_SUBST([am__quote])])
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
# Copyright (C) 1997-2018 Free Software Foundation, Inc.
# Copyright (C) 1997-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -755,7 +757,7 @@ fi
# Helper functions for option handling. -*- Autoconf -*-
# Copyright (C) 2001-2018 Free Software Foundation, Inc.
# Copyright (C) 2001-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -784,7 +786,7 @@ AC_DEFUN([_AM_SET_OPTIONS],
AC_DEFUN([_AM_IF_OPTION],
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
# Copyright (C) 1999-2018 Free Software Foundation, Inc.
# Copyright (C) 1999-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -831,7 +833,7 @@ AC_LANG_POP([C])])
# For backward compatibility.
AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
# Copyright (C) 2001-2018 Free Software Foundation, Inc.
# Copyright (C) 2001-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -850,7 +852,7 @@ AC_DEFUN([AM_RUN_LOG],
# Check to make sure that the build environment is sane. -*- Autoconf -*-
# Copyright (C) 1996-2018 Free Software Foundation, Inc.
# Copyright (C) 1996-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -931,7 +933,7 @@ AC_CONFIG_COMMANDS_PRE(
rm -f conftest.file
])
# Copyright (C) 2009-2018 Free Software Foundation, Inc.
# Copyright (C) 2009-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -991,7 +993,7 @@ AC_SUBST([AM_BACKSLASH])dnl
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
])
# Copyright (C) 2001-2018 Free Software Foundation, Inc.
# Copyright (C) 2001-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -1019,7 +1021,7 @@ fi
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])])
# Copyright (C) 2006-2018 Free Software Foundation, Inc.
# Copyright (C) 2006-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -1038,7 +1040,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
# Check how to create a tarball. -*- Autoconf -*-
# Copyright (C) 2004-2018 Free Software Foundation, Inc.
# Copyright (C) 2004-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......
#!/bin/sh
#--------------------------------------------------------------------------
# die prints argument string to stdout and exits this shell script.
#
die(){
echo "buildconf: $@"
exit 1
}
#--------------------------------------------------------------------------
# findtool works as 'which' but we use a different name to make it more
# obvious we aren't using 'which'! ;-)
#
findtool(){
file="$1"
if { echo "$file" | grep "/" >/dev/null 2>&1; } then
# when file is given with a path check it first
if test -f "$file"; then
echo "$file"
return
fi
fi
old_IFS=$IFS; IFS=':'
for path in $PATH
do
IFS=$old_IFS
# echo "checks for $file in $path" >&2
if test -f "$path/$file"; then
echo "$path/$file"
return
fi
done
IFS=$old_IFS
}
#--------------------------------------------------------------------------
# removethis() removes all files and subdirectories with the given name,
# inside and below the current subdirectory at invocation time.
#
removethis(){
if test "$#" = "1"; then
find . -depth -name $1 -print > buildconf.tmp.$$
while read fdname
do
if test -f "$fdname"; then
rm -f "$fdname"
elif test -d "$fdname"; then
rm -f -r "$fdname"
fi
done < buildconf.tmp.$$
rm -f buildconf.tmp.$$
fi
}
#--------------------------------------------------------------------------
# Ensure that buildconf runs from the subdirectory where configure.ac lives
#
if test ! -f configure.ac ||
test ! -f ares_init.c ||
test ! -f m4/cares-functions.m4; then
echo "Can not run buildconf from outside of c-ares source subdirectory!"
echo "Change to the subdirectory where buildconf is found, and try again."
exit 1
fi
#--------------------------------------------------------------------------
# GNU libtool preliminary check
#
want_lt_major=1
want_lt_minor=4
want_lt_patch=2
want_lt_version=1.4.2
# This approach that tries 'glibtoolize first is intended for systems that
# have GNU libtool named as 'glibtoolize' and libtoolize not being GNU's.
libtoolize=`findtool glibtoolize 2>/dev/null`
if test ! -x "$libtoolize"; then
libtoolize=`findtool ${LIBTOOLIZE:-libtoolize}`
fi
if test -z "$libtoolize"; then
echo "buildconf: libtoolize not found."
echo " You need GNU libtoolize $want_lt_version or newer installed."
exit 1
fi
lt_pver=`$libtoolize --version 2>/dev/null|head -n 1`
lt_qver=`echo $lt_pver|sed -e "s/([^)]*)//g" -e "s/^[^0-9]*//g"`
lt_version=`echo $lt_qver|sed -e "s/[- ].*//" -e "s/\([a-z]*\)$//"`
if test -z "$lt_version"; then
echo "buildconf: libtoolize not found."
echo " You need GNU libtoolize $want_lt_version or newer installed."
exit 1
fi
old_IFS=$IFS; IFS='.'; set $lt_version; IFS=$old_IFS
lt_major=$1
lt_minor=$2
lt_patch=$3
if test -z "$lt_major"; then
lt_status="bad"
elif test "$lt_major" -gt "$want_lt_major"; then
lt_status="good"
elif test "$lt_major" -lt "$want_lt_major"; then
lt_status="bad"
elif test -z "$lt_minor"; then
lt_status="bad"
elif test "$lt_minor" -gt "$want_lt_minor"; then
lt_status="good"
elif test "$lt_minor" -lt "$want_lt_minor"; then
lt_status="bad"
elif test -z "$lt_patch"; then
lt_status="bad"
elif test "$lt_patch" -gt "$want_lt_patch"; then
lt_status="good"
elif test "$lt_patch" -lt "$want_lt_patch"; then
lt_status="bad"
else
lt_status="good"
fi
if test "$lt_status" != "good"; then
echo "buildconf: libtoolize version $lt_version found."
echo " You need GNU libtoolize $want_lt_version or newer installed."
exit 1
fi
#--------------------------------------------------------------------------
# perl check
#
PERL=`findtool ${PERL:-perl}`
if test -z "$PERL"; then
echo "buildconf: perl not found"
exit 1
fi
#--------------------------------------------------------------------------
# Remove files generated on previous buildconf/configure run.
#
for fname in .deps \
.libs \
*.la \
*.lo \
*.a \
*.o \
Makefile \
Makefile.in \
aclocal.m4 \
aclocal.m4.bak \
ares_build.h \
ares_config.h \
ares_config.h.in \
autom4te.cache \
compile \
config.guess \
config.log \
config.lt \
config.status \
config.sub \
configure \
depcomp \
libcares.pc \
libtool \
libtool.m4 \
libtool.m4.tmp \
ltmain.sh \
ltoptions.m4 \
ltsugar.m4 \
ltversion.m4 \
lt~obsolete.m4 \
missing \
stamp-h1 \
stamp-h2 ; do
removethis "$fname"
done
#--------------------------------------------------------------------------
# run the correct scripts now
#
echo "buildconf: running libtoolize"
${libtoolize} --copy --automake --force || die "libtoolize command failed"
# When using libtool 1.5.X (X < 26) we copy libtool.m4 to our local m4
# subdirectory and this local copy is patched to fix some warnings that
# are triggered when running aclocal and using autoconf 2.62 or later.
if test "$lt_major" = "1" && test "$lt_minor" = "5"; then
if test -z "$lt_patch" || test "$lt_patch" -lt "26"; then
echo "buildconf: copying libtool.m4 to local m4 subdir"
ac_dir=`${ACLOCAL:-aclocal} --print-ac-dir`
if test -f $ac_dir/libtool.m4; then
cp -f $ac_dir/libtool.m4 m4/libtool.m4
else
echo "buildconf: $ac_dir/libtool.m4 not found"
fi
if test -f m4/libtool.m4; then
echo "buildconf: renaming some variables in local m4/libtool.m4"
$PERL -i.tmp -pe \
's/lt_prog_compiler_pic_works/lt_cv_prog_compiler_pic_works/g; \
s/lt_prog_compiler_static_works/lt_cv_prog_compiler_static_works/g;' \
m4/libtool.m4
rm -f m4/libtool.m4.tmp
fi
fi
fi
if test -f m4/libtool.m4; then
echo "buildconf: converting all mv to mv -f in local m4/libtool.m4"
$PERL -i.tmp -pe 's/\bmv +([^-\s])/mv -f $1/g' m4/libtool.m4
rm -f m4/libtool.m4.tmp
fi
echo "buildconf: running aclocal"
${ACLOCAL:-aclocal} -I m4 $ACLOCAL_FLAGS || die "aclocal command failed"
echo "buildconf: converting all mv to mv -f in local aclocal.m4"
$PERL -i.bak -pe 's/\bmv +([^-\s])/mv -f $1/g' aclocal.m4
echo "buildconf: running autoheader"
${AUTOHEADER:-autoheader} || die "autoheader command failed"
echo "buildconf: running autoconf"
${AUTOCONF:-autoconf} || die "autoconf command failed"
echo "buildconf: running automake"
${AUTOMAKE:-automake} --add-missing --copy || die "automake command failed"
#--------------------------------------------------------------------------
# GNU libtool complementary check
#
# Depending on the libtool and automake versions being used, config.guess
# might not be installed in the subdirectory until automake has finished.
# So we can not attempt to use it until this very last buildconf stage.
#
if test ! -f ./config.guess; then
echo "buildconf: config.guess not found"
else
buildhost=`./config.guess 2>/dev/null|head -n 1`
case $buildhost in
*-*-darwin*)
need_lt_major=1
need_lt_minor=5
need_lt_patch=26
need_lt_check="yes"
;;
*-*-hpux*)
need_lt_major=1
need_lt_minor=5
need_lt_patch=24
need_lt_check="yes"
;;
esac
if test ! -z "$need_lt_check"; then
if test -z "$lt_major"; then
lt_status="bad"
elif test "$lt_major" -gt "$need_lt_major"; then
lt_status="good"
elif test "$lt_major" -lt "$need_lt_major"; then
lt_status="bad"
elif test -z "$lt_minor"; then
lt_status="bad"
elif test "$lt_minor" -gt "$need_lt_minor"; then
lt_status="good"
elif test "$lt_minor" -lt "$need_lt_minor"; then
lt_status="bad"
elif test -z "$lt_patch"; then
lt_status="bad"
elif test "$lt_patch" -gt "$need_lt_patch"; then
lt_status="good"
elif test "$lt_patch" -lt "$need_lt_patch"; then
lt_status="bad"
else
lt_status="good"
fi
if test "$lt_status" != "good"; then
need_lt_version="$need_lt_major.$need_lt_minor.$need_lt_patch"
echo "buildconf: libtool version $lt_version found."
echo " $buildhost requires GNU libtool $need_lt_version or newer installed."
rm -f configure
exit 1
fi
fi
fi
#--------------------------------------------------------------------------
# Finished successfully.
#
echo "buildconf: OK"
if test -f "test/buildconf"; then
cd test && ./buildconf
fi
exit 0
echo "*** Do not use buildconf. Instead, just use: autoreconf -fi" >&2
exec ${AUTORECONF:-autoreconf} -fi "${@}"
......@@ -3,7 +3,7 @@
scriptversion=2018-03-07.03; # UTC
# Copyright (C) 1999-2018 Free Software Foundation, Inc.
# Copyright (C) 1999-2020 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>.
#
# This program is free software; you can redistribute it and/or modify
......@@ -53,7 +53,7 @@ func_file_conv ()
MINGW*)
file_conv=mingw
;;
CYGWIN*)
CYGWIN* | MSYS*)
file_conv=cygwin
;;
*)
......@@ -67,7 +67,7 @@ func_file_conv ()
mingw/*)
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
;;
cygwin/*)
cygwin/* | msys/*)
file=`cygpath -m "$file" || echo "$file"`
;;
wine/*)
......
This diff is collapsed.
AC_PREREQ(2.57)
AC_INIT([c-ares], [1.16.1],
AC_INIT([c-ares], [1.17.1],
[c-ares mailing list: http://cool.haxx.se/mailman/listinfo/c-ares])
CARES_VERSION_INFO="6:2:4"
dnl This flag accepts an argument of the form current[:revision[:age]]. So,
dnl passing -version-info 3:12:1 sets current to 3, revision to 12, and age to
dnl 1.
dnl
dnl If either revision or age are omitted, they default to 0. Also note that age
dnl must be less than or equal to the current interface number.
dnl
dnl Here are a set of rules to help you update your library version information:
dnl
dnl 1.Start with version information of 0:0:0 for each libtool library.
dnl
dnl 2.Update the version information only immediately before a public release of
dnl your software. More frequent updates are unnecessary, and only guarantee
dnl that the current interface number gets larger faster.
dnl
dnl 3.If the library source code has changed at all since the last update, then
dnl increment revision (c:r+1:a)
dnl
dnl 4.If any interfaces have been added, removed, or changed since the last
dnl update, increment current, and set revision to 0. (c+1:r=0:a)
dnl
dnl 5.If any interfaces have been added since the last public release, then
dnl increment age. (c:r:a+1)
dnl
dnl 6.If any interfaces have been removed since the last public release, then
dnl set age to 0. (c:r:a=0)
dnl
AC_SUBST([CARES_VERSION_INFO])
XC_OVR_ZZ50
XC_OVR_ZZ60
CARES_OVERRIDE_AUTOCONF
AC_CONFIG_SRCDIR([ares_ipv6.h])
AC_CONFIG_HEADERS([ares_config.h ares_build.h])
AC_CONFIG_SRCDIR([src/lib/ares_ipv6.h])
AC_CONFIG_HEADERS([src/lib/ares_config.h include/ares_build.h])
AC_CONFIG_MACRO_DIR([m4])
AM_MAINTAINER_MODE
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
......@@ -17,7 +47,6 @@ CARES_CHECK_OPTION_DEBUG
CARES_CHECK_OPTION_OPTIMIZE
CARES_CHECK_OPTION_WARNINGS
CARES_CHECK_OPTION_WERROR
CARES_CHECK_OPTION_CURLDEBUG
CARES_CHECK_OPTION_SYMBOL_HIDING
CARES_CHECK_OPTION_EXPOSE_STATICS
......@@ -70,10 +99,6 @@ AC_SUBST([AR])
AX_CODE_COVERAGE
dnl Remove non-configure distributed ares_build.h
if test -f ${srcdir}/ares_build.h; then
rm -f ${srcdir}/ares_build.h
fi
dnl
dnl Detect the canonical host and target build environment
......@@ -106,6 +131,7 @@ esac
XC_LIBTOOL
#
# Automake conditionals based on libtool related checks
#
......@@ -175,16 +201,13 @@ CARES_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE
CARES_CHECK_COMPILER_PROTOTYPE_MISMATCH
CARES_CHECK_COMPILER_SYMBOL_HIDING
CARES_CHECK_CURLDEBUG
AM_CONDITIONAL(CURLDEBUG, test x$want_curldebug = xyes)
dnl **********************************************************************
dnl Compilation based checks should not be done before this point.
dnl **********************************************************************
dnl **********************************************************************
dnl Make sure that our checks for headers windows.h winsock.h winsock2.h
dnl and ws2tcpip.h take precedence over any other further checks which
dnl Make sure that our checks for headers windows.h winsock.h winsock2.h
dnl and ws2tcpip.h take precedence over any other further checks which
dnl could be done later using AC_CHECK_HEADER or AC_CHECK_HEADERS for
dnl this specific header files. And do them before its results are used.
dnl **********************************************************************
......@@ -524,7 +547,7 @@ CURL_CHECK_STRUCT_TIMEVAL
AC_CHECK_TYPE(long long,
[AC_DEFINE(HAVE_LONGLONG, 1,
[Define to 1 if the compiler supports the 'long long' data type.])]
longlong="yes"
longlong="yes"
)
if test "xyes" = "x$longlong"; then
......@@ -628,7 +651,7 @@ CARES_CHECK_CONSTANT(
#include <sys/socket.h>
#endif
#endif
], [PF_INET6],
], [PF_INET6],
AC_DEFINE_UNQUOTED(HAVE_PF_INET6,1,[Define to 1 if you have PF_INET6.])
)
......@@ -652,7 +675,7 @@ CARES_CHECK_CONSTANT(
#include <sys/socket.h>
#endif
#endif
], [AF_INET6],
], [AF_INET6],
AC_DEFINE_UNQUOTED(HAVE_AF_INET6,1,[Define to 1 if you have AF_INET6.])
)
......@@ -680,7 +703,7 @@ CARES_CHECK_STRUCT(
#include <netinet/in.h>
#endif
#endif
], [in6_addr],
], [in6_addr],
AC_DEFINE_UNQUOTED(HAVE_STRUCT_IN6_ADDR,1,[Define to 1 if you have struct in6_addr.])
)
......@@ -707,7 +730,7 @@ CARES_CHECK_STRUCT(
#include <netinet/in.h>
#endif
#endif
], [sockaddr_in6],
], [sockaddr_in6],
AC_DEFINE_UNQUOTED(HAVE_STRUCT_SOCKADDR_IN6,1,
[Define to 1 if you have struct sockaddr_in6.]) ac_have_sockaddr_in6=yes
)
......@@ -828,7 +851,7 @@ AC_HELP_STRING([--with-random=FILE],
else
AC_MSG_WARN([cannot check for /dev/urandom while cross compiling; assuming none])
fi
]
)
if test -n "$RANDOM_FILE" && test X"$RANDOM_FILE" != Xno ; then
......@@ -885,10 +908,21 @@ if test "x$build_tests" = "xyes" ; then
fi
AC_MSG_RESULT([$build_tests])
BUILD_SUBDIRS="include src"
if test "x$build_tests" = "xyes" ; then
AC_CONFIG_SUBDIRS([test])
BUILD_SUBDIRS="${BUILD_SUBDIRS} test"
fi
AC_CONFIG_FILES([Makefile libcares.pc])
AC_SUBST(BUILD_SUBDIRS)
AC_CONFIG_FILES([Makefile \
include/Makefile \
src/Makefile \
src/lib/Makefile \
src/tools/Makefile \
libcares.pc ])
AC_OUTPUT
XC_AMEND_DISTCLEAN(['.'])
......@@ -3,7 +3,7 @@
scriptversion=2018-03-07.03; # UTC
# Copyright (C) 1999-2018 Free Software Foundation, Inc.
# Copyright (C) 1999-2020 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
......
# Write ares_build.h configuration file. This is an installed file.
CONFIGURE_FILE (ares_build.h.cmake ${PROJECT_BINARY_DIR}/ares_build.h)
# Headers installation target
IF (CARES_INSTALL)
SET (CARES_HEADERS ares.h ares_version.h "${PROJECT_BINARY_DIR}/ares_build.h" ares_rules.h ares_dns.h)
INSTALL (FILES ${CARES_HEADERS} COMPONENT Devel DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
ENDIF ()
AUTOMAKE_OPTIONS = foreign nostdinc 1.9.6
ACLOCAL_AMFLAGS = -I m4 --install
# what headers to install on 'make install':
include_HEADERS = ares.h ares_version.h ares_build.h ares_rules.h ares_dns.h
EXTRA_DIST = ares_build.h.cmake ares_build.h.in ares_build.h.dist CMakeLists.txt
This diff is collapsed.
......@@ -528,6 +528,15 @@ struct ares_addr6ttl {
int ttl;
};
struct ares_caa_reply {
struct ares_caa_reply *next;
int critical;
unsigned char *property;
size_t plength; /* plength excludes null termination */
unsigned char *value;
size_t length; /* length excludes null termination */
};
struct ares_srv_reply {
struct ares_srv_reply *next;
char *host;
......@@ -637,6 +646,10 @@ CARES_EXTERN int ares_parse_aaaa_reply(const unsigned char *abuf,
struct ares_addr6ttl *addrttls,
int *naddrttls);
CARES_EXTERN int ares_parse_caa_reply(const unsigned char* abuf,
int alen,
struct ares_caa_reply** caa_out);
CARES_EXTERN int ares_parse_ptr_reply(const unsigned char *abuf,
int alen,
const void *addr,
......
#ifndef __CARES_BUILD_H
#define __CARES_BUILD_H
#define CARES_TYPEOF_ARES_SOCKLEN_T @CARES_TYPEOF_ARES_SOCKLEN_T@
#define CARES_TYPEOF_ARES_SSIZE_T @CARES_TYPEOF_ARES_SSIZE_T@
/* Prefix names with CARES_ to make sure they don't conflict with other config.h
* files. We need to include some dependent headers that may be system specific
* for C-Ares */
#cmakedefine CARES_HAVE_SYS_TYPES_H
#cmakedefine CARES_HAVE_SYS_SOCKET_H
#cmakedefine CARES_HAVE_WINDOWS_H
#cmakedefine CARES_HAVE_WS2TCPIP_H
#cmakedefine CARES_HAVE_WINSOCK2_H
#cmakedefine CARES_HAVE_WINDOWS_H
#ifdef CARES_HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef CARES_HAVE_SYS_SOCKET_H
# include <sys/socket.h>
#endif
#ifdef CARES_HAVE_WINSOCK2_H
# include <winsock2.h>
#endif
#ifdef CARES_HAVE_WS2TCPIP_H
# include <ws2tcpip.h>
#endif
#ifdef CARES_HAVE_WINDOWS_H
# include <windows.h>
#endif
typedef CARES_TYPEOF_ARES_SOCKLEN_T ares_socklen_t;
typedef CARES_TYPEOF_ARES_SSIZE_T ares_ssize_t;
#endif /* __CARES_BUILD_H */
#ifndef __CARES_BUILD_H
#define __CARES_BUILD_H
/* Copyright (C) 2009 - 2013 by Daniel Stenberg et al
*
* Permission to use, copy, modify, and distribute this software and its
* documentation for any purpose and without fee is hereby granted, provided
* that the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation, and that the name of M.I.T. not be used in advertising or
* publicity pertaining to distribution of the software without specific,
* written prior permission. M.I.T. makes no representations about the
* suitability of this software for any purpose. It is provided "as is"
* without express or implied warranty.
*/
/* ================================================================ */
/* NOTES FOR CONFIGURE CAPABLE SYSTEMS */
/* ================================================================ */
/*
* NOTE 1:
* -------
*
* See file ares_build.h.in, run configure, and forget that this file
* exists it is only used for non-configure systems.
* But you can keep reading if you want ;-)
*
*/
/* ================================================================ */
/* NOTES FOR NON-CONFIGURE SYSTEMS */
/* ================================================================ */
/*
* NOTE 1:
* -------
*
* Nothing in this file is intended to be modified or adjusted by the
* c-ares library user nor by the c-ares library builder.
*
* If you think that something actually needs to be changed, adjusted
* or fixed in this file, then, report it on the c-ares development
* mailing list: http://cool.haxx.se/mailman/listinfo/c-ares/
*
* Try to keep one section per platform, compiler and architecture,
* otherwise, if an existing section is reused for a different one and
* later on the original is adjusted, probably the piggybacking one can
* be adversely changed.
*
* In order to differentiate between platforms/compilers/architectures
* use only compiler built in predefined preprocessor symbols.
*
* This header file shall only export symbols which are 'cares' or 'CARES'
* prefixed, otherwise public name space would be polluted.
*
* NOTE 2:
* -------
*
* Right now you might be staring at file ares_build.h.dist or ares_build.h,
* this is due to the following reason: file ares_build.h.dist is renamed
* to ares_build.h when the c-ares source code distribution archive file is
* created.
*
* File ares_build.h.dist is not included in the distribution archive.
* File ares_build.h is not present in the git tree.
*
* The distributed ares_build.h file is only intended to be used on systems
* which can not run the also distributed configure script.
*
* On systems capable of running the configure script, the configure process
* will overwrite the distributed ares_build.h file with one that is suitable
* and specific to the library being configured and built, which is generated
* from the ares_build.h.in template file.
*
* If you check out from git on a non-configure platform, you must run the
* appropriate buildconf* script to set up ares_build.h and other local files.
*
*/
/* ================================================================ */
/* DEFINITION OF THESE SYMBOLS SHALL NOT TAKE PLACE ANYWHERE ELSE */
/* ================================================================ */
#ifdef CARES_TYPEOF_ARES_SOCKLEN_T
# error "CARES_TYPEOF_ARES_SOCKLEN_T shall not be defined except in ares_build.h"
Error Compilation_aborted_CARES_TYPEOF_ARES_SOCKLEN_T_already_defined
#endif
/* ================================================================ */
/* EXTERNAL INTERFACE SETTINGS FOR NON-CONFIGURE SYSTEMS ONLY */
/* ================================================================ */
#if defined(__DJGPP__) || defined(__GO32__)
# define CARES_TYPEOF_ARES_SOCKLEN_T int
#elif defined(__SALFORDC__)
# define CARES_TYPEOF_ARES_SOCKLEN_T int
#elif defined(__BORLANDC__)
# define CARES_TYPEOF_ARES_SOCKLEN_T int
#elif defined(__TURBOC__)
# define CARES_TYPEOF_ARES_SOCKLEN_T int
#elif defined(__WATCOMC__)
# define CARES_TYPEOF_ARES_SOCKLEN_T int
#elif defined(__POCC__)
# define CARES_TYPEOF_ARES_SOCKLEN_T int
#elif defined(__LCC__)
# define CARES_TYPEOF_ARES_SOCKLEN_T int
#elif defined(__SYMBIAN32__)
# define CARES_TYPEOF_ARES_SOCKLEN_T unsigned int
#elif defined(__MWERKS__)
# define CARES_TYPEOF_ARES_SOCKLEN_T int
#elif defined(_WIN32_WCE)
# define CARES_TYPEOF_ARES_SOCKLEN_T int
#elif defined(__MINGW32__)
# define CARES_TYPEOF_ARES_SOCKLEN_T int
#elif defined(__VMS)
# define CARES_TYPEOF_ARES_SOCKLEN_T unsigned int
#elif defined(__OS400__)
# if defined(__ILEC400__)
# define CARES_TYPEOF_ARES_SOCKLEN_T socklen_t
# define CARES_PULL_SYS_TYPES_H 1
# define CARES_PULL_SYS_SOCKET_H 1
# endif
#elif defined(__MVS__)
# if defined(__IBMC__) || defined(__IBMCPP__)
# define CARES_TYPEOF_ARES_SOCKLEN_T socklen_t
# define CARES_PULL_SYS_TYPES_H 1
# define CARES_PULL_SYS_SOCKET_H 1
# endif
#elif defined(__370__)
# if defined(__IBMC__) || defined(__IBMCPP__)
# define CARES_TYPEOF_ARES_SOCKLEN_T socklen_t
# define CARES_PULL_SYS_TYPES_H 1
# define CARES_PULL_SYS_SOCKET_H 1
# endif
#elif defined(TPF)
# define CARES_TYPEOF_ARES_SOCKLEN_T int
/* ===================================== */
/* KEEP MSVC THE PENULTIMATE ENTRY */
/* ===================================== */
#elif defined(_MSC_VER)
# define CARES_TYPEOF_ARES_SOCKLEN_T int
/* ===================================== */
/* KEEP GENERIC GCC THE LAST ENTRY */
/* ===================================== */
#elif defined(__GNUC__)
# define CARES_TYPEOF_ARES_SOCKLEN_T socklen_t
# define CARES_PULL_SYS_TYPES_H 1
# define CARES_PULL_SYS_SOCKET_H 1
#else
# error "Unknown non-configure build target!"
Error Compilation_aborted_Unknown_non_configure_build_target
#endif
/* CARES_PULL_SYS_TYPES_H is defined above when inclusion of header file */
/* sys/types.h is required here to properly make type definitions below. */
#ifdef CARES_PULL_SYS_TYPES_H
# include <sys/types.h>
#endif
/* CARES_PULL_SYS_SOCKET_H is defined above when inclusion of header file */
/* sys/socket.h is required here to properly make type definitions below. */
#ifdef CARES_PULL_SYS_SOCKET_H
# include <sys/socket.h>
#endif
/* Data type definition of ares_socklen_t. */
#ifdef CARES_TYPEOF_ARES_SOCKLEN_T
typedef CARES_TYPEOF_ARES_SOCKLEN_T ares_socklen_t;
#endif
/* Data type definition of ares_ssize_t. */
#ifdef _WIN32
# ifdef _WIN64
# define CARES_TYPEOF_ARES_SSIZE_T __int64
# else
# define CARES_TYPEOF_ARES_SSIZE_T long
# endif
#else
# define CARES_TYPEOF_ARES_SSIZE_T ssize_t
#endif
typedef CARES_TYPEOF_ARES_SSIZE_T ares_ssize_t;
#endif /* __CARES_BUILD_H */
......@@ -16,6 +16,15 @@
* without express or implied warranty.
*/
/*
* NOTE TO INTEGRATORS:
*
* This header is made public due to legacy projects relying on it.
* Please do not use the macros within this header, or include this
* header in your project as it may be removed in the future.
*/
/*
* Macro DNS__16BIT reads a network short (16 bit) given in network
* byte order, and returns its value as an unsigned short.
......
......@@ -6,12 +6,12 @@
#define ARES_COPYRIGHT "2004 - 2020 Daniel Stenberg, <daniel@haxx.se>."
#define ARES_VERSION_MAJOR 1
#define ARES_VERSION_MINOR 16
#define ARES_VERSION_MINOR 17
#define ARES_VERSION_PATCH 1
#define ARES_VERSION ((ARES_VERSION_MAJOR<<16)|\
(ARES_VERSION_MINOR<<8)|\
(ARES_VERSION_PATCH))
#define ARES_VERSION_STR "1.16.1"
#define ARES_VERSION_STR "1.17.1"
#if (ARES_VERSION >= 0x010700)
# define CARES_HAVE_ARES_LIBRARY_INIT 1
......
This diff is collapsed.
......@@ -31,7 +31,7 @@
PROGRAM=libtool
PACKAGE=libtool
VERSION="2.4.6 Debian-2.4.6-11"
VERSION="2.4.6 Debian-2.4.6-14"
package_revision=2.4.6
......@@ -387,7 +387,7 @@ EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake.
# putting '$debug_cmd' at the start of all your functions, you can get
# bash to show function call trace with:
#
# debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name
# debug_cmd='echo "${FUNCNAME[0]} $*" >&2' bash your-script-name
debug_cmd=${debug_cmd-":"}
exit_cmd=:
......@@ -2141,7 +2141,7 @@ include the following information:
compiler: $LTCC
compiler flags: $LTCFLAGS
linker: $LD (gnu? $with_gnu_ld)
version: $progname $scriptversion Debian-2.4.6-11
version: $progname $scriptversion Debian-2.4.6-14
automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q`
autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q`
......@@ -7368,10 +7368,12 @@ func_mode_link ()
# -stdlib=* select c++ std lib with clang
# -fsanitize=* Clang/GCC memory and address sanitizer
# -fuse-ld=* Linker select flags for GCC
# -static-* direct GCC to link specific libraries statically
# -fcilkplus Cilk Plus language extension features for C/C++
-64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
-t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
-O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
-specs=*|-fsanitize=*|-fuse-ld=*)
-specs=*|-fsanitize=*|-fuse-ld=*|-static-*|-fcilkplus)
func_quote_for_eval "$arg"
arg=$func_quote_for_eval_result
func_append compile_command " $arg"
......
......@@ -1179,97 +1179,6 @@ squeeze() {
])
dnl CARES_CHECK_CURLDEBUG
dnl -------------------------------------------------
dnl Settings which depend on configure's curldebug given
dnl option, and other additional configure pre-requisites.
dnl Using the curl debug memory tracking feature in c-ares
dnl is a hack that actually can only be used/enabled when
dnl c-ares is built directly in curl's CVS tree, as a static
dnl library or as a shared one on those systems on which
dnl shared libraries support undefined symbols, along with
dnl an equally configured libcurl.
AC_DEFUN([CARES_CHECK_CURLDEBUG], [
AC_REQUIRE([XC_LIBTOOL])dnl
AC_REQUIRE([CARES_SHFUNC_SQUEEZE])dnl
cares_builddir=`pwd`
supports_curldebug="unknown"
if test "$want_curldebug" = "yes"; then
if test "x$enable_shared" != "xno" &&
test "x$enable_shared" != "xyes"; then
AC_MSG_WARN([unknown enable_shared setting.])
supports_curldebug="no"
fi
if test "x$enable_static" != "xno" &&
test "x$enable_static" != "xyes"; then
AC_MSG_WARN([unknown enable_static setting.])
supports_curldebug="no"
fi
if test "$supports_curldebug" != "no"; then
if test "$enable_shared" = "yes" &&
test "x$xc_lt_shlib_use_no_undefined" = 'xyes'; then
supports_curldebug="no"
AC_MSG_WARN([shared library does not support undefined symbols.])
fi
if test ! -f "$srcdir/../include/curl/curlbuild.h.dist"; then
AC_MSG_WARN([c-ares source not embedded in curl's CVS tree.])
supports_curldebug="no"
elif test ! -f "$srcdir/../include/curl/Makefile.in"; then
AC_MSG_WARN([curl's buildconf has not been run.])
supports_curldebug="no"
elif test ! -f "$cares_builddir/../libcurl.pc" ||
test ! -f "$cares_builddir/../include/curl/curlbuild.h"; then
AC_MSG_WARN([curl's configure has not been run.])
supports_curldebug="no"
elif test ! -f "$cares_builddir/../lib/curl_config.h"; then
AC_MSG_WARN([libcurl's curl_config.h is missing.])
supports_curldebug="no"
elif test ! -f "$cares_builddir/../config.status"; then
AC_MSG_WARN([curl's config.status is missing.])
supports_curldebug="no"
fi
if test "$supports_curldebug" != "no"; then
grep '^#define USE_ARES' "$cares_builddir/../lib/curl_config.h" >/dev/null
if test "$?" -ne "0"; then
AC_MSG_WARN([libcurl configured without c-ares support.])
supports_curldebug="no"
fi
fi
if test "$supports_curldebug" != "no"; then
grep 'CPPFLAGS.*CURLDEBUG' "$cares_builddir/../config.status" >/dev/null
if test "$?" -ne "0"; then
AC_MSG_WARN([libcurl configured without curldebug support.])
supports_curldebug="no"
fi
fi
fi
fi
#
if test "$want_curldebug" = "yes"; then
AC_MSG_CHECKING([if curl debug memory tracking can be enabled])
test "$supports_curldebug" = "no" || supports_curldebug="yes"
AC_MSG_RESULT([$supports_curldebug])
if test "$supports_curldebug" = "no"; then
AC_MSG_WARN([cannot enable curl debug memory tracking.])
want_curldebug="no"
fi
fi
#
if test "$want_curldebug" = "yes"; then
dnl TODO: Verify if the BUILDING_LIBCURL definition is still required.
AC_DEFINE(BUILDING_LIBCURL, 1, [when building as static part of libcurl])
CPPFLAGS="-DCURLDEBUG $CPPFLAGS"
squeeze CPPFLAGS
fi
#
if test "$want_debug" = "yes"; then
CPPFLAGS="-DDEBUGBUILD $CPPFLAGS"
squeeze CPPFLAGS
fi
])
dnl CARES_CHECK_COMPILER_HALT_ON_ERROR
dnl -------------------------------------------------
dnl Verifies if the compiler actually halts after the
......
......@@ -18,45 +18,6 @@
# serial 11
dnl CARES_CHECK_OPTION_CURLDEBUG
dnl -------------------------------------------------
dnl Verify if configure has been invoked with option
dnl --enable-curldebug or --disable-curldebug, and set
dnl shell variable want_curldebug value as appropriate.
AC_DEFUN([CARES_CHECK_OPTION_CURLDEBUG], [
AC_BEFORE([$0],[CARES_CHECK_CURLDEBUG])dnl
AC_MSG_CHECKING([whether to enable curl debug memory tracking])
OPT_CURLDEBUG_BUILD="default"
AC_ARG_ENABLE(curldebug,
AC_HELP_STRING([--enable-curldebug],[Enable curl debug memory tracking])
AC_HELP_STRING([--disable-curldebug],[Disable curl debug memory tracking]),
OPT_CURLDEBUG_BUILD=$enableval)
case "$OPT_CURLDEBUG_BUILD" in
no)
dnl --disable-curldebug option used
want_curldebug="no"
;;
default)
dnl configure option not specified
want_curldebug="no"
;;
*)
dnl --enable-curldebug option used.
dnl The use of this option value is a request to enable curl's
dnl debug memory tracking for the c-ares library. This is a big
dnl hack that can only be done when a whole bunch of requisites
dnl are simultaneously satisfied. Later on, these requisites are
dnl verified and if they are not fully satisfied the option will
dnl be ignored and act as if --disable-curldebug had been given
dnl setting shell variable want_curldebug to 'no'.
want_curldebug="yes"
;;
esac
AC_MSG_RESULT([$want_curldebug])
])
dnl CARES_CHECK_OPTION_DEBUG
dnl -------------------------------------------------
dnl Verify if configure has been invoked with option
......@@ -65,7 +26,6 @@ dnl variable want_debug value as appropriate.
AC_DEFUN([CARES_CHECK_OPTION_DEBUG], [
AC_BEFORE([$0],[CARES_CHECK_OPTION_WARNINGS])dnl
AC_BEFORE([$0],[CARES_CHECK_OPTION_CURLDEBUG])dnl
AC_BEFORE([$0],[XC_CHECK_PROG_CC])dnl
AC_MSG_CHECKING([whether to enable debug build options])
OPT_DEBUG_BUILD="default"
......
......@@ -1041,8 +1041,8 @@ int forced_loaded() { return 2;}
_LT_EOF
echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
$LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
$AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
echo "$AR cr libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
$AR cr libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
$RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
cat > conftest.c << _LT_EOF
......@@ -1492,7 +1492,7 @@ need_locks=$enable_libtool_lock
m4_defun([_LT_PROG_AR],
[AC_CHECK_TOOLS(AR, [ar], false)
: ${AR=ar}
: ${AR_FLAGS=cru}
: ${AR_FLAGS=cr}
_LT_DECL([], [AR], [1], [The archiver])
_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
......@@ -4124,7 +4124,7 @@ static const void *lt_preloaded_setup() {
#endif
_LT_EOF
# Now try linking the two files.
mv -f conftest.$ac_objext conftstm.$ac_objext
mv conftest.$ac_objext conftstm.$ac_objext
lt_globsym_save_LIBS=$LIBS
lt_globsym_save_CFLAGS=$CFLAGS
LIBS=conftstm.$ac_objext
......@@ -5683,9 +5683,9 @@ _LT_EOF
hpux9*)
if test yes = "$GCC"; then
_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv -f $output_objdir/$soname $lib'
_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
else
_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv -f $output_objdir/$soname $lib'
_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
fi
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
......@@ -6811,7 +6811,7 @@ if test yes != "$_lt_caught_CXX_error"; then
_LT_TAGVAR(ld_shlibs, $1)=no
;;
aCC*)
_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv -f $output_objdir/$soname $lib'
_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
......@@ -6824,7 +6824,7 @@ if test yes != "$_lt_caught_CXX_error"; then
;;
*)
if test yes = "$GXX"; then
_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv -f $output_objdir/$soname $lib'
_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
else
# FIXME: insert proper C++ library support
_LT_TAGVAR(ld_shlibs, $1)=no
......@@ -6960,8 +6960,8 @@ if test yes != "$_lt_caught_CXX_error"; then
# KCC will only create a shared library if the output file
# ends with ".so" (or ".sl" for HP-UX), so rename the library
# to its proper name (with version) after linking.
_LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv -f \$templib $lib'
_LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv -f \$templib $lib'
_LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
_LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib'
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
......@@ -7159,7 +7159,7 @@ if test yes != "$_lt_caught_CXX_error"; then
# KCC will only create a shared library if the output file
# ends with ".so" (or ".sl" for HP-UX), so rename the library
# to its proper name (with version) after linking.
_LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv -f \$templib $lib'
_LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
......@@ -8270,7 +8270,7 @@ for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
fi
while true; do
cat conftest.in conftest.in >conftest.tmp
mv -f conftest.tmp conftest.in
mv conftest.tmp conftest.in
cp conftest.in conftest.nl
echo >>conftest.nl
$lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
......
......@@ -3,7 +3,7 @@
scriptversion=2018-03-07.03; # UTC
# Copyright (C) 1996-2018 Free Software Foundation, Inc.
# Copyright (C) 1996-2020 Free Software Foundation, Inc.
# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify
......
#! /bin/sh
# mkinstalldirs --- make directory hierarchy
scriptversion=2009-04-28.21; # UTC
# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
# Created: 1993-05-16
# Public domain.
#
# This file is maintained in Automake, please report
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
nl='
'
IFS=" "" $nl"
errstatus=0
dirmode=
usage="\
Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
Create each directory DIR (with mode MODE, if specified), including all
leading file name components.
Report bugs to <bug-automake@gnu.org>."
# process command line arguments
while test $# -gt 0 ; do
case $1 in
-h | --help | --h*) # -h for help
echo "$usage"
exit $?
;;
-m) # -m PERM arg
shift
test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
dirmode=$1
shift
;;
--version)
echo "$0 $scriptversion"
exit $?
;;
--) # stop option processing
shift
break
;;
-*) # unknown option
echo "$usage" 1>&2
exit 1
;;
*) # first non-opt arg
break
;;
esac
done
for file
do
if test -d "$file"; then
shift
else
break
fi
done
case $# in
0) exit 0 ;;
esac
# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and
# mkdir -p a/c at the same time, both will detect that a is missing,
# one will create a, then the other will try to create a and die with
# a "File exists" error. This is a problem when calling mkinstalldirs
# from a parallel make. We use --version in the probe to restrict
# ourselves to GNU mkdir, which is thread-safe.
case $dirmode in
'')
if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
echo "mkdir -p -- $*"
exec mkdir -p -- "$@"
else
# On NextStep and OpenStep, the 'mkdir' command does not
# recognize any option. It will interpret all options as
# directories to create, and then abort because '.' already
# exists.
test -d ./-p && rmdir ./-p
test -d ./--version && rmdir ./--version
fi
;;
*)
if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 &&
test ! -d ./--version; then
echo "mkdir -m $dirmode -p -- $*"
exec mkdir -m "$dirmode" -p -- "$@"
else
# Clean up after NextStep and OpenStep mkdir.
for d in ./-m ./-p ./--version "./$dirmode";
do
test -d $d && rmdir $d
done
fi
;;
esac
for file
do
case $file in
/*) pathcomp=/ ;;
*) pathcomp= ;;
esac
oIFS=$IFS
IFS=/
set fnord $file
shift
IFS=$oIFS
for d
do
test "x$d" = x && continue
pathcomp=$pathcomp$d
case $pathcomp in
-*) pathcomp=./$pathcomp ;;
esac
if test ! -d "$pathcomp"; then
echo "mkdir $pathcomp"
mkdir "$pathcomp" || lasterr=$?
if test ! -d "$pathcomp"; then
errstatus=$lasterr
else
if test ! -z "$dirmode"; then
echo "chmod $dirmode $pathcomp"
lasterr=
chmod "$dirmode" "$pathcomp" || lasterr=$?
if test ! -z "$lasterr"; then
errstatus=$lasterr
fi
fi
fi
fi
pathcomp=$pathcomp/
done
done
exit $errstatus
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:
ADD_SUBDIRECTORY (lib)
ADD_SUBDIRECTORY (tools)
EXTRA_DIST=CMakeLists.txt
SUBDIRS=lib tools
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment