C-ares

From CBLFS
Jump to navigationJump to search
Download Source: http://daniel.haxx.se/projects/c-ares/c-ares-1.7.1.tar.gz

Introduction to C-ares

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.

Project Homepage: http://daniel.haxx.se/projects/c-ares/

Differences from original ares

* IPv6 support 
* Many bug fixes 
* Extended portability (Mac OS X, RISC OS, Windows, DOS and more) 
* 64bit cleaned sources 
* New functions (ares_cancel(), ares_expand_string(), ares_version() and more)

Non-Multilib

Configure and compile the package:

./configure --prefix=/usr &&
make

Install the package:

make install

Multilib

32Bit

Configure and compile the package:

CC="gcc ${BUILD32}" ./configure --prefix=/usr &&
make

Install the package:

make install &&
mv -v /usr/include/ares_build{,-32}.h

N32

Configure and compile the package:

CC="gcc ${BUILDN32}" ./configure --prefix=/usr --libdir=/usr/lib32 &&
make

Install the package:

make install &&
mv -v /usr/include/ares_build{,-n32}.h

64Bit

Configure and compile the package:

CC="gcc ${BUILD64}" ./configure --prefix=/usr --libdir=/usr/lib64 &&
make

Install the package:

make install &&
mv -v /usr/include/ares_build{,-64}.h

Creating a Stub Header (Multilib Only)

Creating a Generic Stub Header

cat > /usr/include/ares_build.h << "EOF"
/* ares_build.h - Stub Header  */
#ifndef __STUB__ARES_BUILD_H__
#define __STUB__ARES_BUILD_H__

#if defined(__x86_64__) || \
    defined(__sparc64__) || \
    defined(__arch64__) || \
    defined(__powerpc64__) || \
    defined (__s390x__)
# include "ares_build-64.h"
#else
# include "ares_build-32.h"
#endif

#endif /* __STUB__ARES_BUILD_H__ */
EOF

Creating a Stub Header For Mips

cat > /usr/include/ares_build.h << "EOF"
/* ares_build.h - Stub Header  */
#ifndef __STUB__ARES_BUILD_H__
#define __STUB__ARES_BUILD_H__

#include <sgidefs.h>

#if (_MIPS_SIM == _ABIO32)
# include "ares_build-32.h"
#elif (_MIPS_SIM == _ABIN32)
# include "ares_build-n32.h"
#elif (_MIPS_SIM == _ABI64)
# include "ares_build-64.h"
#endif

#endif /* __STUB__ARES_BUILD_H__ */
EOF
Retrieved from "?title=C-ares&oldid=19849"