summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore85
-rw-r--r--ares_build.h.dist254
-rw-r--r--ares_set_servers_csv.313
-rw-r--r--buildconf.bat20
-rwxr-xr-xgit2changes.pl77
-rw-r--r--m4/.gitignore6
-rw-r--r--packaging/LICENSE10
-rw-r--r--packaging/baselibs.conf1
-rw-r--r--packaging/c-ares.changes3
-rw-r--r--packaging/c-ares.manifest5
-rw-r--r--packaging/c-ares.spec71
11 files changed, 545 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..0b1087a
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,85 @@
+.deps
+.libs
+*.lib
+*.pdb
+*.dll
+*.exe
+*.obj
+.*.swp
+Debug
+Release
+*.exp
+Makefile
+Makefile.in
+aclocal.m4
+autom4te.cache
+config.guess
+config.log
+config.status
+config.sub
+configure
+depcomp
+libtool
+ltmain.sh
+compile
+libcares.pc
+missing
+c-ares-*.tar.gz
+INSTALL
+install-sh
+*.o
+*.lo
+*.la
+mkinstalldirs
+tags
+TAGS
+*~
+aclocal.m4.bak
+acountry
+adig
+ahost
+ares_build.h
+ares_config.h
+ares_config.h.in
+stamp-h1
+stamp-h2
+ares_cancel.pdf
+ares_destroy.pdf
+ares_destroy_options.pdf
+ares_dup.pdf
+ares_expand_name.pdf
+ares_expand_string.pdf
+ares_fds.pdf
+ares_free_data.pdf
+ares_free_hostent.pdf
+ares_free_string.pdf
+ares_get_servers.pdf
+ares_gethostbyaddr.pdf
+ares_gethostbyname.pdf
+ares_gethostbyname_file.pdf
+ares_getnameinfo.pdf
+ares_getsock.pdf
+ares_init.pdf
+ares_init_options.pdf
+ares_library_cleanup.pdf
+ares_library_init.pdf
+ares_mkquery.pdf
+ares_parse_a_reply.pdf
+ares_parse_aaaa_reply.pdf
+ares_parse_ns_reply.pdf
+ares_parse_ptr_reply.pdf
+ares_parse_srv_reply.pdf
+ares_parse_txt_reply.pdf
+ares_process.pdf
+ares_query.pdf
+ares_save_options.pdf
+ares_search.pdf
+ares_send.pdf
+ares_set_servers.pdf
+ares_set_socket_callback.pdf
+ares_strerror.pdf
+ares_timeout.pdf
+ares_version.pdf
+c-ares-*.tar.gz.asc
+ares_parse_mx_reply.pdf
+/[0-9]*.patch
diff --git a/ares_build.h.dist b/ares_build.h.dist
new file mode 100644
index 0000000..afcb75a
--- /dev/null
+++ b/ares_build.h.dist
@@ -0,0 +1,254 @@
+#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_SIZEOF_LONG
+# error "CARES_SIZEOF_LONG shall not be defined except in ares_build.h"
+ Error Compilation_aborted_CARES_SIZEOF_LONG_already_defined
+#endif
+
+#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
+
+#ifdef CARES_SIZEOF_ARES_SOCKLEN_T
+# error "CARES_SIZEOF_ARES_SOCKLEN_T shall not be defined except in ares_build.h"
+ Error Compilation_aborted_CARES_SIZEOF_ARES_SOCKLEN_T_already_defined
+#endif
+
+/* ================================================================ */
+/* EXTERNAL INTERFACE SETTINGS FOR NON-CONFIGURE SYSTEMS ONLY */
+/* ================================================================ */
+
+#if defined(__DJGPP__) || defined(__GO32__)
+# define CARES_SIZEOF_LONG 4
+# define CARES_TYPEOF_ARES_SOCKLEN_T int
+# define CARES_SIZEOF_ARES_SOCKLEN_T 4
+
+#elif defined(__SALFORDC__)
+# define CARES_SIZEOF_LONG 4
+# define CARES_TYPEOF_ARES_SOCKLEN_T int
+# define CARES_SIZEOF_ARES_SOCKLEN_T 4
+
+#elif defined(__BORLANDC__)
+# define CARES_SIZEOF_LONG 4
+# define CARES_TYPEOF_ARES_SOCKLEN_T int
+# define CARES_SIZEOF_ARES_SOCKLEN_T 4
+
+#elif defined(__TURBOC__)
+# define CARES_SIZEOF_LONG 4
+# define CARES_TYPEOF_ARES_SOCKLEN_T int
+# define CARES_SIZEOF_ARES_SOCKLEN_T 4
+
+#elif defined(__WATCOMC__)
+# define CARES_SIZEOF_LONG 4
+# define CARES_TYPEOF_ARES_SOCKLEN_T int
+# define CARES_SIZEOF_ARES_SOCKLEN_T 4
+
+#elif defined(__POCC__)
+# define CARES_SIZEOF_LONG 4
+# define CARES_TYPEOF_ARES_SOCKLEN_T int
+# define CARES_SIZEOF_ARES_SOCKLEN_T 4
+
+#elif defined(__LCC__)
+# define CARES_SIZEOF_LONG 4
+# define CARES_TYPEOF_ARES_SOCKLEN_T int
+# define CARES_SIZEOF_ARES_SOCKLEN_T 4
+
+#elif defined(__SYMBIAN32__)
+# define CARES_SIZEOF_LONG 4
+# define CARES_TYPEOF_ARES_SOCKLEN_T unsigned int
+# define CARES_SIZEOF_ARES_SOCKLEN_T 4
+
+#elif defined(__MWERKS__)
+# define CARES_SIZEOF_LONG 4
+# define CARES_TYPEOF_ARES_SOCKLEN_T int
+# define CARES_SIZEOF_ARES_SOCKLEN_T 4
+
+#elif defined(_WIN32_WCE)
+# define CARES_SIZEOF_LONG 4
+# define CARES_TYPEOF_ARES_SOCKLEN_T int
+# define CARES_SIZEOF_ARES_SOCKLEN_T 4
+
+#elif defined(__MINGW32__)
+# define CARES_SIZEOF_LONG 4
+# define CARES_TYPEOF_ARES_SOCKLEN_T int
+# define CARES_SIZEOF_ARES_SOCKLEN_T 4
+
+#elif defined(__VMS)
+# define CARES_SIZEOF_LONG 4
+# define CARES_TYPEOF_ARES_SOCKLEN_T unsigned int
+# define CARES_SIZEOF_ARES_SOCKLEN_T 4
+
+#elif defined(__OS400__)
+# if defined(__ILEC400__)
+# define CARES_SIZEOF_LONG 4
+# define CARES_TYPEOF_ARES_SOCKLEN_T socklen_t
+# define CARES_SIZEOF_ARES_SOCKLEN_T 4
+# define CARES_PULL_SYS_TYPES_H 1
+# define CARES_PULL_SYS_SOCKET_H 1
+# endif
+
+#elif defined(__MVS__)
+# if defined(__IBMC__) || defined(__IBMCPP__)
+# if defined(_ILP32)
+# define CARES_SIZEOF_LONG 4
+# elif defined(_LP64)
+# define CARES_SIZEOF_LONG 8
+# endif
+# define CARES_TYPEOF_ARES_SOCKLEN_T socklen_t
+# define CARES_SIZEOF_ARES_SOCKLEN_T 4
+# define CARES_PULL_SYS_TYPES_H 1
+# define CARES_PULL_SYS_SOCKET_H 1
+# endif
+
+#elif defined(__370__)
+# if defined(__IBMC__) || defined(__IBMCPP__)
+# if defined(_ILP32)
+# define CARES_SIZEOF_LONG 4
+# elif defined(_LP64)
+# define CARES_SIZEOF_LONG 8
+# endif
+# define CARES_TYPEOF_ARES_SOCKLEN_T socklen_t
+# define CARES_SIZEOF_ARES_SOCKLEN_T 4
+# define CARES_PULL_SYS_TYPES_H 1
+# define CARES_PULL_SYS_SOCKET_H 1
+# endif
+
+#elif defined(TPF)
+# define CARES_SIZEOF_LONG 8
+# define CARES_TYPEOF_ARES_SOCKLEN_T int
+# define CARES_SIZEOF_ARES_SOCKLEN_T 4
+
+/* ===================================== */
+/* KEEP MSVC THE PENULTIMATE ENTRY */
+/* ===================================== */
+
+#elif defined(_MSC_VER)
+# define CARES_SIZEOF_LONG 4
+# define CARES_TYPEOF_ARES_SOCKLEN_T int
+# define CARES_SIZEOF_ARES_SOCKLEN_T 4
+
+/* ===================================== */
+/* KEEP GENERIC GCC THE LAST ENTRY */
+/* ===================================== */
+
+#elif defined(__GNUC__)
+# if defined(__ILP32__) || \
+ defined(__i386__) || defined(__ppc__) || defined(__arm__)
+# define CARES_SIZEOF_LONG 4
+# elif defined(__LP64__) || \
+ defined(__x86_64__) || defined(__ppc64__)
+# define CARES_SIZEOF_LONG 8
+# endif
+# define CARES_TYPEOF_ARES_SOCKLEN_T socklen_t
+# define CARES_SIZEOF_ARES_SOCKLEN_T 4
+# 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
+
+#endif /* __CARES_BUILD_H */
diff --git a/ares_set_servers_csv.3 b/ares_set_servers_csv.3
index 8fd2511..cad2078 100644
--- a/ares_set_servers_csv.3
+++ b/ares_set_servers_csv.3
@@ -20,6 +20,11 @@ ares_set_servers_csv, ares_set_servers_ports_csv \- Set list of DNS servers to b
.nf
.B #include <ares.h>
.PP
+.B void ares_set_servers_csv(ares_channel \fIchannel\fP, const char* \fIservers\fP)
+.fi
+.SH DESCRIPTION
+The \fBares_set_servers_csv\fP function sets the list of DNS servers
+that ARES will query. The format of the servers option is:
.B int ares_set_servers_csv(ares_channel \fIchannel\fP, const char* \fIservers\fP)
.B int ares_set_servers_ports_csv(ares_channel \fIchannel\fP, const char* \fIservers\fP)
.fi
@@ -32,6 +37,14 @@ host[:port][,host[:port]]...
For example:
192.168.1.100,192.168.1.101,3.4.5.6
+
+.SH SEE ALSO
+.BR ares_set_servers (3)
+.SH NOTES
+The port option is currently ignored by c-ares internals
+and the standard port is always used.
+
+This function was added in c-ares 1.7.2
.PP
The \fBares_set_servers_csv\fP function will ignore any port values specified in
the input string, whereare the \fBares_set_servers_ports_csv\fP function will
diff --git a/buildconf.bat b/buildconf.bat
new file mode 100644
index 0000000..7097b72
--- /dev/null
+++ b/buildconf.bat
@@ -0,0 +1,20 @@
+@echo off
+REM
+REM
+REM This batch file must be used to set up a git tree to build on
+REM systems where there is no autotools support (i.e. Microsoft).
+REM
+REM This file is not included nor needed for c-ares' release
+REM archives, neither for c-ares' daily snapshot archives.
+
+if exist GIT-INFO goto start_doing
+ECHO ERROR: This file shall only be used with a c-ares git checkout.
+goto end_all
+:start_doing
+
+if not exist ares_build.h.dist goto end_ares_build_h
+copy /Y ares_build.h.dist ares_build.h
+:end_ares_build_h
+
+:end_all
+
diff --git a/git2changes.pl b/git2changes.pl
new file mode 100755
index 0000000..21880b7
--- /dev/null
+++ b/git2changes.pl
@@ -0,0 +1,77 @@
+#!/usr/bin/perl
+
+# git log --pretty=fuller --no-color --date=short --decorate=full
+
+my @mname = ('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
+ 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' );
+
+sub nicedate {
+ my ($date)=$_;
+
+ if($date =~ /(\d\d\d\d)-(\d\d)-(\d\d)/) {
+ return sprintf("%d %s %4d", $3, $mname[$2-1], $1);
+ }
+ return $date;
+}
+
+print
+' Changelog for the c-ares project. Generated with git2changes.pl
+';
+
+my $line;
+my $tag;
+while(<STDIN>) {
+ my $l = $_;
+
+ if($l =~/^commit ([[:xdigit:]]*) ?(.*)/) {
+ $co = $1;
+ my $ref = $2;
+ if ($ref =~ /refs\/tags\/c[-]*ares-([0-9._]*)/) {
+ $tag = $1;
+ $tag =~ s/_/./g;
+ } else {
+ $tag = '';
+ }
+ }
+ elsif($l =~ /^Author: *(.*) +</) {
+ $a = $1;
+ }
+ elsif($l =~ /^Commit: *(.*) +</) {
+ $c = $1;
+ }
+ elsif($l =~ /^CommitDate: (.*)/) {
+ $date = nicedate($1);
+ }
+ elsif($l =~ /^( )(.*)/) {
+ my $extra;
+ if ($tag) {
+ # Version entries have a special format
+ print "\nVersion " . $tag." ($date)\n";
+ $oldc = "";
+ $tag = "";
+ }
+ if($a ne $c) {
+ $extra=sprintf("\n- [%s brought this change]\n\n ", $a);
+ }
+ else {
+ $extra="\n- ";
+ }
+ if($co ne $oldco) {
+ if($c ne $oldc) {
+ print "\n$c ($date)$extra";
+ }
+ else {
+ print "$extra";
+ }
+ $line =0;
+ }
+
+ $oldco = $co;
+ $oldc = $c;
+ $olddate = $date;
+ if($line++) {
+ print " ";
+ }
+ print $2."\n";
+ }
+}
diff --git a/m4/.gitignore b/m4/.gitignore
new file mode 100644
index 0000000..f0f1d4d
--- /dev/null
+++ b/m4/.gitignore
@@ -0,0 +1,6 @@
+libtool.m4
+libtool.m4.tmp
+ltoptions.m4
+ltsugar.m4
+ltversion.m4
+lt~obsolete.m4
diff --git a/packaging/LICENSE b/packaging/LICENSE
new file mode 100644
index 0000000..e3f5b64
--- /dev/null
+++ b/packaging/LICENSE
@@ -0,0 +1,10 @@
+Copyright 1998 by the Massachusetts Institute of Technology.
+
+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.
diff --git a/packaging/baselibs.conf b/packaging/baselibs.conf
new file mode 100644
index 0000000..2ae68fa
--- /dev/null
+++ b/packaging/baselibs.conf
@@ -0,0 +1 @@
+libcares
diff --git a/packaging/c-ares.changes b/packaging/c-ares.changes
new file mode 100644
index 0000000..85c850f
--- /dev/null
+++ b/packaging/c-ares.changes
@@ -0,0 +1,3 @@
+* Wed Feb 06 2013 Anas Nashif <anas.nashif@intel.com> upstream/1.7.5@ecc507e
+- Fixed packaging per rpmlint
+
diff --git a/packaging/c-ares.manifest b/packaging/c-ares.manifest
new file mode 100644
index 0000000..017d22d
--- /dev/null
+++ b/packaging/c-ares.manifest
@@ -0,0 +1,5 @@
+<manifest>
+ <request>
+ <domain name="_"/>
+ </request>
+</manifest>
diff --git a/packaging/c-ares.spec b/packaging/c-ares.spec
new file mode 100644
index 0000000..92b72a8
--- /dev/null
+++ b/packaging/c-ares.spec
@@ -0,0 +1,71 @@
+Name: c-ares
+Version: 1.10.0
+Release: 0
+License: MIT
+Summary: Library for asynchronous name resolves
+Group: Development/Libraries/C and C++
+Source: http://daniel.haxx.se/projects/c-ares/%{name}-%{version}.tar.bz2
+Source2: baselibs.conf
+Source1001: c-ares.manifest
+Source1002: LICENSE
+BuildRequires: pkg-config
+BuildRequires: libtool
+Url: http://daniel.haxx.se/projects/c-ares
+
+%description
+c-ares is a C library that performs DNS requests and name resolves
+asynchronously. c-ares is a fork of the library named 'ares', written
+by Greg Hudson at MIT.
+
+%package -n libcares
+Summary: Library for asynchronous name resolves
+Group: Development/Libraries/C and C++
+
+%description -n libcares
+c-ares is a C library that performs DNS requests and name resolves
+asynchronously. c-ares is a fork of the library named 'ares', written
+by Greg Hudson at MIT.
+
+%package -n libcares-devel
+Summary: Library for asynchronous name resolves
+Group: Development/Libraries/C and C++
+Requires: libcares = %{version}
+Requires: glibc-devel
+
+%description -n libcares-devel
+c-ares is a C library that performs DNS requests and name resolves
+asynchronously. c-ares is a fork of the library named 'ares', written
+by Greg Hudson at MIT.
+
+%prep
+%setup -q -n %{name}-%{version}
+cp %{SOURCE1001} .
+cp %{SOURCE1002} .
+
+%build
+autoreconf -fiv
+%configure --enable-symbol-hiding --enable-nonblocking --enable-shared --disable-static --with-pic
+sed -i -e 's@-g0@-g@g' Makefile
+make %{?_smp_mflags}
+
+%install
+%make_install
+
+%post -p /sbin/ldconfig -n libcares
+
+%postun -p /sbin/ldconfig -n libcares
+
+%files -n libcares
+%license LICENSE
+%manifest %{name}.manifest
+%defattr(-,root,root)
+%{_libdir}/libcares.so.2*
+
+%files -n libcares-devel
+%license LICENSE
+%manifest %{name}.manifest
+%defattr(-,root,root)
+%{_libdir}/libcares.so
+%{_includedir}/*.h
+%{_mandir}/man3/ares_*
+%{_libdir}/pkgconfig/libcares.pc