Upgrade to 1.21.0 70/301370/1
authorSeonah Moon <seonah1.moon@samsung.com>
Wed, 15 Nov 2023 03:31:44 +0000 (12:31 +0900)
committerSeonah Moon <seonah1.moon@samsung.com>
Wed, 15 Nov 2023 03:32:20 +0000 (12:32 +0900)
Change-Id: Idf92dc66f0720a0d50187326f70f38a451ff466e

12 files changed:
.gitignore [new file with mode: 0644]
COPYING [new file with mode: 0644]
LICENSE.BSD [new file with mode: 0644]
ares_build.h.dist [new file with mode: 0644]
docs/ares_set_servers_csv.3
git2changes.pl [new file with mode: 0755]
m4/.gitignore [new file with mode: 0644]
packaging/LICENSE [new file with mode: 0644]
packaging/baselibs.conf [new file with mode: 0644]
packaging/c-ares.changes [new file with mode: 0644]
packaging/c-ares.manifest [new file with mode: 0644]
packaging/c-ares.spec [new file with mode: 0644]

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..0b1087a
--- /dev/null
@@ -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/COPYING b/COPYING
new file mode 100644 (file)
index 0000000..e3f5b64
--- /dev/null
+++ b/COPYING
@@ -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/LICENSE.BSD b/LICENSE.BSD
new file mode 100644 (file)
index 0000000..8a70427
--- /dev/null
@@ -0,0 +1,26 @@
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+    1. Redistributions of source code must retain the above copyright
+       notice, this list of conditions and the following disclaimer.
+
+    2. Redistributions in binary form must reproduce the above
+       copyright notice, this list of conditions and the following
+       disclaimer in the documentation and/or other materials provided
+       with the distribution.
+
+    3. The name of the author may not be used to endorse or promote
+       products derived from this software without specific prior
+       written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
diff --git a/ares_build.h.dist b/ares_build.h.dist
new file mode 100644 (file)
index 0000000..afcb75a
--- /dev/null
@@ -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 */
index fd37a17..45deebf 100644 (file)
@@ -20,6 +20,7 @@
 ares_set_servers_csv, ares_set_servers_ports_csv \- Set list of DNS servers to be used.
 .SH SYNOPSIS
 .nf
+
 #include <ares.h>
 
 int ares_set_servers_csv(ares_channel \fIchannel\fP, const char* \fIservers\fP)
@@ -35,6 +36,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/git2changes.pl b/git2changes.pl
new file mode 100755 (executable)
index 0000000..21880b7
--- /dev/null
@@ -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 (file)
index 0000000..f0f1d4d
--- /dev/null
@@ -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 (file)
index 0000000..e3f5b64
--- /dev/null
@@ -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 (file)
index 0000000..2ae68fa
--- /dev/null
@@ -0,0 +1 @@
+libcares
diff --git a/packaging/c-ares.changes b/packaging/c-ares.changes
new file mode 100644 (file)
index 0000000..85c850f
--- /dev/null
@@ -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 (file)
index 0000000..017d22d
--- /dev/null
@@ -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 (file)
index 0000000..9ec6992
--- /dev/null
@@ -0,0 +1,73 @@
+Name:           c-ares
+Version:        1.21.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.gz
+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 --disable-tests
+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
+%license LICENSE.BSD
+%manifest %{name}.manifest
+%defattr(-,root,root)
+%{_libdir}/libcares.so.2*
+
+%files -n libcares-devel
+%license LICENSE
+%license LICENSE.BSD
+%manifest %{name}.manifest
+%defattr(-,root,root)
+%{_libdir}/libcares.so
+%{_includedir}/*.h
+%{_mandir}/man3/ares_*
+%{_libdir}/pkgconfig/libcares.pc