Skip to content
Snippets Groups Projects
Commit c85bf83e authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

- Fixed a few variable return types for some system calls. Made configure

  check for ssize_t to make it possible to use that when receiving the send()
  error code. This is necessary to prevent compiler warnings on some systems.

- Made configure create config.h, and all source files now include setup.h that
  might include the proper config.h (or a handicrafted alternative).

- Switched to 'ares_socket_t' type for sockets in ares, since Windows don't
  use 'int' for that.

- automake-ified and libool-ified c-ares. Now it builds libcares as a shared
  lib on most platforms if wanted. (This bloated the size of the release
  archive with another 200K!)

- Makefile.am now uses Makefile.inc for the c sources, h headers and man
  pages, to make it easier for other makefiles to use the exact same set of
  files.

- Adjusted 'maketgz' to use the new automake magic when building distribution
  archives.
parent 060b6ce1
No related branches found
No related tags found
No related merge requests found
Showing with 914 additions and 96 deletions
Changelog for the c-ares project
* July 20
- Fixed a few variable return types for some system calls. Made configure
check for ssize_t to make it possible to use that when receiving the send()
error code. This is necessary to prevent compiler warnings on some systems.
- Made configure create config.h, and all source files now include setup.h that
might include the proper config.h (or a handicrafted alternative).
- Switched to 'ares_socket_t' type for sockets in ares, since Windows don't
use 'int' for that.
- automake-ified and libool-ified c-ares. Now it builds libcares as a shared
lib on most platforms if wanted. (This bloated the size of the release
archive with another 200K!)
- Makefile.am now uses Makefile.inc for the c sources, h headers and man
pages, to make it easier for other makefiles to use the exact same set of
files.
- Adjusted 'maketgz' to use the new automake magic when building distribution
archives.
- Anyone desires HTML and/or PDF versions of the man pages in the release
archives?
* July 3
- Günter Knauf made c-ares build and run on Novell Netware.
......
AUTOMAKE_OPTIONS = foreign
lib_LTLIBRARIES = libcares.la
man_MANS = $(MANPAGES)
MSVCFILES = vc/adig/adig.dep vc/adig/adig.dsp vc/adig/adig.mak \
vc/adig/adig.plg vc/vc.dsw vc/ahost/ahost.dep vc/ahost/ahost.dsp \
vc/ahost/ahost.mak vc/ahost/ahost.plg vc/areslib/areslib.dep \
vc/areslib/areslib.dsp vc/areslib/areslib.mak vc/areslib/areslib.plg
# adig and ahost are just sample programs and thus not mentioned with the
# regular sources and headers
EXTRA_DIST = CHANGES README.cares Makefile.inc adig.c ahost.c $(man_MANS) \
$(MSVCFILES)
VER=-version-info 0:0:0
# 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)
#
libcares_la_LDFLAGS = $(VER)
# 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
This diff is collapsed.
CSOURCES = ares_fds.c ares_process.c ares_free_hostent.c ares_query.c \
ares__close_sockets.c ares_free_string.c ares_search.c ares__get_hostent.c \
ares_gethostbyaddr.c ares_send.c ares__read_line.c ares_gethostbyname.c \
ares_strerror.c ares_cancel.c ares_init.c ares_timeout.c ares_destroy.c \
ares_mkquery.c ares_version.c ares_expand_name.c ares_parse_a_reply.c \
windows_port.c ares_expand_string.c ares_parse_ptr_reply.c
HHEADERS = ares.h ares_private.h setup.h ares_dns.h ares_version.h nameser.h
MANPAGES= ares_destroy.3 ares_expand_name.3 ares_expand_string.3 ares_fds.3 \
ares_free_hostent.3 ares_free_string.3 ares_gethostbyaddr.3 \
ares_gethostbyname.3 ares_init.3 ares_init_options.3 ares_mkquery.3 \
ares_parse_a_reply.3 ares_parse_ptr_reply.3 ares_process.3 \
ares_query.3 ares_search.3 ares_send.3 ares_strerror.3 ares_timeout.3 \
ares_version.3 ares_cancel.3
\ No newline at end of file
Major changes since:
* see the CHANGES file
Major changes in release 1.1.1:
* ares should now compile as C++ code (no longer uses reserved word
"class").
......
......@@ -13,6 +13,7 @@
* without express or implied warranty.
*/
#include "setup.h"
#include <sys/types.h>
#ifdef WIN32
......
......@@ -13,6 +13,7 @@
* without express or implied warranty.
*/
#include "setup.h"
#include <sys/types.h>
#ifdef WIN32
......
......@@ -13,6 +13,8 @@
* without express or implied warranty.
*/
#include "setup.h"
#include <stdlib.h>
#ifdef WIN32
#else
......@@ -42,14 +44,14 @@ void ares__close_sockets(struct server_state *server)
server->tcp_lenbuf_pos = 0;
/* Close the TCP and UDP sockets. */
if (server->tcp_socket != -1)
if (server->tcp_socket != ARES_SOCKET_BAD)
{
closesocket(server->tcp_socket);
server->tcp_socket = -1;
server->tcp_socket = ARES_SOCKET_BAD;
}
if (server->udp_socket != -1)
if (server->udp_socket != ARES_SOCKET_BAD)
{
closesocket(server->udp_socket);
server->udp_socket = -1;
server->udp_socket = ARES_SOCKET_BAD;
}
}
......@@ -13,6 +13,7 @@
* without express or implied warranty.
*/
#include "setup.h"
#include <sys/types.h>
#ifdef WIN32
......
......@@ -13,6 +13,7 @@
* without express or implied warranty.
*/
#include "setup.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
......
/* Copyright 1998 by the Massachusetts Institute of Technology.
/* Copyright (C) 2004 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"
* 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.
*/
#include "setup.h"
#include <stdlib.h>
#include "ares.h"
#include "ares_private.h"
......
......@@ -13,6 +13,7 @@
* without express or implied warranty.
*/
#include "setup.h"
#include <stdlib.h>
#include "ares.h"
#include "ares_private.h"
......
......@@ -13,6 +13,7 @@
* without express or implied warranty.
*/
#include "setup.h"
#include <sys/types.h>
#ifdef WIN32
......
......@@ -13,6 +13,7 @@
* without express or implied warranty.
*/
#include "setup.h"
#include <sys/types.h>
#ifdef WIN32
......
......@@ -13,6 +13,7 @@
* without express or implied warranty.
*/
#include "setup.h"
#include <sys/types.h>
#ifdef WIN32
......@@ -37,13 +38,13 @@ int ares_fds(ares_channel channel, fd_set *read_fds, fd_set *write_fds)
for (i = 0; i < channel->nservers; i++)
{
server = &channel->servers[i];
if (server->udp_socket != -1)
if (server->udp_socket != ARES_SOCKET_BAD)
{
FD_SET(server->udp_socket, read_fds);
if (server->udp_socket >= nfds)
nfds = server->udp_socket + 1;
}
if (server->tcp_socket != -1)
if (server->tcp_socket != ARES_SOCKET_BAD)
{
FD_SET(server->tcp_socket, read_fds);
if (server->qhead)
......
......@@ -13,6 +13,7 @@
* without express or implied warranty.
*/
#include "setup.h"
#include <stdlib.h>
#ifdef WIN32
......
......@@ -13,6 +13,7 @@
* without express or implied warranty.
*/
#include "setup.h"
#include <stdlib.h>
#include "ares.h"
......
......@@ -13,6 +13,7 @@
* without express or implied warranty.
*/
#include "setup.h"
#include <sys/types.h>
#ifdef WIN32
......
......@@ -13,6 +13,7 @@
* without express or implied warranty.
*/
#include "setup.h"
#include <sys/types.h>
#ifdef WIN32
......
......@@ -13,6 +13,7 @@
* without express or implied warranty.
*/
#include "setup.h"
#include <sys/types.h>
#ifdef WIN32
......@@ -127,8 +128,8 @@ int ares_init_options(ares_channel *channelptr, struct ares_options *options,
for (i = 0; i < channel->nservers; i++)
{
server = &channel->servers[i];
server->udp_socket = -1;
server->tcp_socket = -1;
server->udp_socket = ARES_SOCKET_BAD;
server->tcp_socket = ARES_SOCKET_BAD;
server->tcp_lenbuf_pos = 0;
server->tcp_buffer = NULL;
server->qhead = NULL;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment