@@ -0,0 +1,3 @@ | |||
The IDTechSDK requires libusb to communicate with the devices. Please download libusb (libusb.org) for your platform. A Google search will provide the necessary information. | |||
Alternately, the provided libusb-1.0.so can be placed in the /lib folder to provide functionality, but a proper install of libusb is recommended. |
@@ -0,0 +1,102 @@ | |||
### Dependency list for SDK: | |||
IDTechSDK: | |||
Pisces: | |||
dl | |||
pthread | |||
vpu_trace | |||
vre_ui | |||
vre_picc | |||
vre_pci | |||
vre_ser | |||
vre_appmgr | |||
vpu_buffer | |||
vpu_system | |||
vpu_event | |||
vpu_log | |||
vpu_vector | |||
rt | |||
vre_cfg | |||
vpu_quikparse | |||
IDT_comm: | |||
Pisces: | |||
IDTechSDK | |||
curl | |||
IDT_compress: | |||
Pisces: | |||
archive | |||
IDT_configMgr: | |||
Pisces: | |||
sqlite3 | |||
IDT_tlv | |||
IDT_security | |||
IDTechSDK | |||
IDT_crypto: | |||
Pisces: | |||
IDTechSDK | |||
crypto | |||
IDT_devMgr: | |||
Pisces: | |||
sqlite3 | |||
IDTechSDK | |||
IDT_iso8583: | |||
Pisces: | |||
IDTechSDK | |||
IDT_log: | |||
Pisces: | |||
IDTechSDK | |||
IDT_logMgr: | |||
Pisces: | |||
sqlite3 | |||
IDT_comm | |||
IDT_security | |||
IDT_log | |||
IDT_resMgr: | |||
Pisces: | |||
IDTechSDK | |||
IDT_security | |||
IDT_crypto | |||
IDT_security: | |||
Pisces: | |||
crypto | |||
sqlite3 | |||
IDTechSDK | |||
IDT_crypto | |||
IDT_tlv: | |||
Pisces: | |||
### List of third party dependencies: | |||
dl | |||
pthread | |||
curl | |||
archive | |||
sqlite3 | |||
crypto | |||
vpu_trace | |||
vre_ui | |||
vre_picc | |||
vre_pci | |||
vre_ser | |||
vre_appmgr | |||
vpu_buffer | |||
vpu_system | |||
vpu_event | |||
vpu_log | |||
vpu_vector | |||
rt | |||
vre_cfg | |||
vpu_quikparse |
@@ -0,0 +1,702 @@ | |||
/*- | |||
* Copyright (c) 2003-2008 Tim Kientzle | |||
* Copyright (c) 2016 Martin Matuska | |||
* All rights reserved. | |||
* | |||
* 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. | |||
* | |||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``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(S) 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. | |||
* | |||
* $FreeBSD: head/lib/libarchive/archive_entry.h 201096 2009-12-28 02:41:27Z kientzle $ | |||
*/ | |||
#ifndef ARCHIVE_ENTRY_H_INCLUDED | |||
#define ARCHIVE_ENTRY_H_INCLUDED | |||
/* Note: Compiler will complain if this does not match archive.h! */ | |||
#define ARCHIVE_VERSION_NUMBER 3003002 | |||
/* | |||
* Note: archive_entry.h is for use outside of libarchive; the | |||
* configuration headers (config.h, archive_platform.h, etc.) are | |||
* purely internal. Do NOT use HAVE_XXX configuration macros to | |||
* control the behavior of this header! If you must conditionalize, | |||
* use predefined compiler and/or platform macros. | |||
*/ | |||
#include <sys/types.h> | |||
#include <stddef.h> /* for wchar_t */ | |||
#include <time.h> | |||
#if defined(_WIN32) && !defined(__CYGWIN__) | |||
#include <windows.h> | |||
#endif | |||
/* Get a suitable 64-bit integer type. */ | |||
#if !defined(__LA_INT64_T_DEFINED) | |||
# if ARCHIVE_VERSION_NUMBER < 4000000 | |||
#define __LA_INT64_T la_int64_t | |||
# endif | |||
#define __LA_INT64_T_DEFINED | |||
# if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__WATCOMC__) | |||
typedef __int64 la_int64_t; | |||
# else | |||
#include <unistd.h> | |||
# if defined(_SCO_DS) || defined(__osf__) | |||
typedef long long la_int64_t; | |||
# else | |||
typedef int64_t la_int64_t; | |||
# endif | |||
# endif | |||
#endif | |||
/* The la_ssize_t should match the type used in 'struct stat' */ | |||
#if !defined(__LA_SSIZE_T_DEFINED) | |||
/* Older code relied on the __LA_SSIZE_T macro; after 4.0 we'll switch to the typedef exclusively. */ | |||
# if ARCHIVE_VERSION_NUMBER < 4000000 | |||
#define __LA_SSIZE_T la_ssize_t | |||
# endif | |||
#define __LA_SSIZE_T_DEFINED | |||
# if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__WATCOMC__) | |||
# if defined(_SSIZE_T_DEFINED) || defined(_SSIZE_T_) | |||
typedef ssize_t la_ssize_t; | |||
# elif defined(_WIN64) | |||
typedef __int64 la_ssize_t; | |||
# else | |||
typedef long la_ssize_t; | |||
# endif | |||
# else | |||
# include <unistd.h> /* ssize_t */ | |||
typedef ssize_t la_ssize_t; | |||
# endif | |||
#endif | |||
/* Get a suitable definition for mode_t */ | |||
#if ARCHIVE_VERSION_NUMBER >= 3999000 | |||
/* Switch to plain 'int' for libarchive 4.0. It's less broken than 'mode_t' */ | |||
# define __LA_MODE_T int | |||
#elif defined(_WIN32) && !defined(__CYGWIN__) && !defined(__BORLANDC__) && !defined(__WATCOMC__) | |||
# define __LA_MODE_T unsigned short | |||
#else | |||
# define __LA_MODE_T mode_t | |||
#endif | |||
/* Large file support for Android */ | |||
#ifdef __ANDROID__ | |||
#include "android_lf.h" | |||
#endif | |||
/* | |||
* On Windows, define LIBARCHIVE_STATIC if you're building or using a | |||
* .lib. The default here assumes you're building a DLL. Only | |||
* libarchive source should ever define __LIBARCHIVE_BUILD. | |||
*/ | |||
#if ((defined __WIN32__) || (defined _WIN32) || defined(__CYGWIN__)) && (!defined LIBARCHIVE_STATIC) | |||
# ifdef __LIBARCHIVE_BUILD | |||
# ifdef __GNUC__ | |||
# define __LA_DECL __attribute__((dllexport)) extern | |||
# else | |||
# define __LA_DECL __declspec(dllexport) | |||
# endif | |||
# else | |||
# ifdef __GNUC__ | |||
# define __LA_DECL | |||
# else | |||
# define __LA_DECL __declspec(dllimport) | |||
# endif | |||
# endif | |||
#else | |||
/* Static libraries on all platforms and shared libraries on non-Windows. */ | |||
# define __LA_DECL | |||
#endif | |||
#if defined(__GNUC__) && __GNUC__ >= 3 && __GNUC_MINOR__ >= 1 | |||
# define __LA_DEPRECATED __attribute__((deprecated)) | |||
#else | |||
# define __LA_DEPRECATED | |||
#endif | |||
#ifdef __cplusplus | |||
extern "C" { | |||
#endif | |||
/* | |||
* Description of an archive entry. | |||
* | |||
* You can think of this as "struct stat" with some text fields added in. | |||
* | |||
* TODO: Add "comment", "charset", and possibly other entries that are | |||
* supported by "pax interchange" format. However, GNU, ustar, cpio, | |||
* and other variants don't support these features, so they're not an | |||
* excruciatingly high priority right now. | |||
* | |||
* TODO: "pax interchange" format allows essentially arbitrary | |||
* key/value attributes to be attached to any entry. Supporting | |||
* such extensions may make this library useful for special | |||
* applications (e.g., a package manager could attach special | |||
* package-management attributes to each entry). | |||
*/ | |||
struct archive; | |||
struct archive_entry; | |||
/* | |||
* File-type constants. These are returned from archive_entry_filetype() | |||
* and passed to archive_entry_set_filetype(). | |||
* | |||
* These values match S_XXX defines on every platform I've checked, | |||
* including Windows, AIX, Linux, Solaris, and BSD. They're | |||
* (re)defined here because platforms generally don't define the ones | |||
* they don't support. For example, Windows doesn't define S_IFLNK or | |||
* S_IFBLK. Instead of having a mass of conditional logic and system | |||
* checks to define any S_XXX values that aren't supported locally, | |||
* I've just defined a new set of such constants so that | |||
* libarchive-based applications can manipulate and identify archive | |||
* entries properly even if the hosting platform can't store them on | |||
* disk. | |||
* | |||
* These values are also used directly within some portable formats, | |||
* such as cpio. If you find a platform that varies from these, the | |||
* correct solution is to leave these alone and translate from these | |||
* portable values to platform-native values when entries are read from | |||
* or written to disk. | |||
*/ | |||
/* | |||
* In libarchive 4.0, we can drop the casts here. | |||
* They're needed to work around Borland C's broken mode_t. | |||
*/ | |||
#define AE_IFMT ((__LA_MODE_T)0170000) | |||
#define AE_IFREG ((__LA_MODE_T)0100000) | |||
#define AE_IFLNK ((__LA_MODE_T)0120000) | |||
#define AE_IFSOCK ((__LA_MODE_T)0140000) | |||
#define AE_IFCHR ((__LA_MODE_T)0020000) | |||
#define AE_IFBLK ((__LA_MODE_T)0060000) | |||
#define AE_IFDIR ((__LA_MODE_T)0040000) | |||
#define AE_IFIFO ((__LA_MODE_T)0010000) | |||
/* | |||
* Basic object manipulation | |||
*/ | |||
__LA_DECL struct archive_entry *archive_entry_clear(struct archive_entry *); | |||
/* The 'clone' function does a deep copy; all of the strings are copied too. */ | |||
__LA_DECL struct archive_entry *archive_entry_clone(struct archive_entry *); | |||
__LA_DECL void archive_entry_free(struct archive_entry *); | |||
__LA_DECL struct archive_entry *archive_entry_new(void); | |||
/* | |||
* This form of archive_entry_new2() will pull character-set | |||
* conversion information from the specified archive handle. The | |||
* older archive_entry_new(void) form is equivalent to calling | |||
* archive_entry_new2(NULL) and will result in the use of an internal | |||
* default character-set conversion. | |||
*/ | |||
__LA_DECL struct archive_entry *archive_entry_new2(struct archive *); | |||
/* | |||
* Retrieve fields from an archive_entry. | |||
* | |||
* There are a number of implicit conversions among these fields. For | |||
* example, if a regular string field is set and you read the _w wide | |||
* character field, the entry will implicitly convert narrow-to-wide | |||
* using the current locale. Similarly, dev values are automatically | |||
* updated when you write devmajor or devminor and vice versa. | |||
* | |||
* In addition, fields can be "set" or "unset." Unset string fields | |||
* return NULL, non-string fields have _is_set() functions to test | |||
* whether they've been set. You can "unset" a string field by | |||
* assigning NULL; non-string fields have _unset() functions to | |||
* unset them. | |||
* | |||
* Note: There is one ambiguity in the above; string fields will | |||
* also return NULL when implicit character set conversions fail. | |||
* This is usually what you want. | |||
*/ | |||
__LA_DECL time_t archive_entry_atime(struct archive_entry *); | |||
__LA_DECL long archive_entry_atime_nsec(struct archive_entry *); | |||
__LA_DECL int archive_entry_atime_is_set(struct archive_entry *); | |||
__LA_DECL time_t archive_entry_birthtime(struct archive_entry *); | |||
__LA_DECL long archive_entry_birthtime_nsec(struct archive_entry *); | |||
__LA_DECL int archive_entry_birthtime_is_set(struct archive_entry *); | |||
__LA_DECL time_t archive_entry_ctime(struct archive_entry *); | |||
__LA_DECL long archive_entry_ctime_nsec(struct archive_entry *); | |||
__LA_DECL int archive_entry_ctime_is_set(struct archive_entry *); | |||
__LA_DECL dev_t archive_entry_dev(struct archive_entry *); | |||
__LA_DECL int archive_entry_dev_is_set(struct archive_entry *); | |||
__LA_DECL dev_t archive_entry_devmajor(struct archive_entry *); | |||
__LA_DECL dev_t archive_entry_devminor(struct archive_entry *); | |||
__LA_DECL __LA_MODE_T archive_entry_filetype(struct archive_entry *); | |||
__LA_DECL void archive_entry_fflags(struct archive_entry *, | |||
unsigned long * /* set */, | |||
unsigned long * /* clear */); | |||
__LA_DECL const char *archive_entry_fflags_text(struct archive_entry *); | |||
__LA_DECL la_int64_t archive_entry_gid(struct archive_entry *); | |||
__LA_DECL const char *archive_entry_gname(struct archive_entry *); | |||
__LA_DECL const char *archive_entry_gname_utf8(struct archive_entry *); | |||
__LA_DECL const wchar_t *archive_entry_gname_w(struct archive_entry *); | |||
__LA_DECL const char *archive_entry_hardlink(struct archive_entry *); | |||
__LA_DECL const char *archive_entry_hardlink_utf8(struct archive_entry *); | |||
__LA_DECL const wchar_t *archive_entry_hardlink_w(struct archive_entry *); | |||
__LA_DECL la_int64_t archive_entry_ino(struct archive_entry *); | |||
__LA_DECL la_int64_t archive_entry_ino64(struct archive_entry *); | |||
__LA_DECL int archive_entry_ino_is_set(struct archive_entry *); | |||
__LA_DECL __LA_MODE_T archive_entry_mode(struct archive_entry *); | |||
__LA_DECL time_t archive_entry_mtime(struct archive_entry *); | |||
__LA_DECL long archive_entry_mtime_nsec(struct archive_entry *); | |||
__LA_DECL int archive_entry_mtime_is_set(struct archive_entry *); | |||
__LA_DECL unsigned int archive_entry_nlink(struct archive_entry *); | |||
__LA_DECL const char *archive_entry_pathname(struct archive_entry *); | |||
__LA_DECL const char *archive_entry_pathname_utf8(struct archive_entry *); | |||
__LA_DECL const wchar_t *archive_entry_pathname_w(struct archive_entry *); | |||
__LA_DECL __LA_MODE_T archive_entry_perm(struct archive_entry *); | |||
__LA_DECL dev_t archive_entry_rdev(struct archive_entry *); | |||
__LA_DECL dev_t archive_entry_rdevmajor(struct archive_entry *); | |||
__LA_DECL dev_t archive_entry_rdevminor(struct archive_entry *); | |||
__LA_DECL const char *archive_entry_sourcepath(struct archive_entry *); | |||
__LA_DECL const wchar_t *archive_entry_sourcepath_w(struct archive_entry *); | |||
__LA_DECL la_int64_t archive_entry_size(struct archive_entry *); | |||
__LA_DECL int archive_entry_size_is_set(struct archive_entry *); | |||
__LA_DECL const char *archive_entry_strmode(struct archive_entry *); | |||
__LA_DECL const char *archive_entry_symlink(struct archive_entry *); | |||
__LA_DECL const char *archive_entry_symlink_utf8(struct archive_entry *); | |||
__LA_DECL const wchar_t *archive_entry_symlink_w(struct archive_entry *); | |||
__LA_DECL la_int64_t archive_entry_uid(struct archive_entry *); | |||
__LA_DECL const char *archive_entry_uname(struct archive_entry *); | |||
__LA_DECL const char *archive_entry_uname_utf8(struct archive_entry *); | |||
__LA_DECL const wchar_t *archive_entry_uname_w(struct archive_entry *); | |||
__LA_DECL int archive_entry_is_data_encrypted(struct archive_entry *); | |||
__LA_DECL int archive_entry_is_metadata_encrypted(struct archive_entry *); | |||
__LA_DECL int archive_entry_is_encrypted(struct archive_entry *); | |||
/* | |||
* Set fields in an archive_entry. | |||
* | |||
* Note: Before libarchive 2.4, there were 'set' and 'copy' versions | |||
* of the string setters. 'copy' copied the actual string, 'set' just | |||
* stored the pointer. In libarchive 2.4 and later, strings are | |||
* always copied. | |||
*/ | |||
__LA_DECL void archive_entry_set_atime(struct archive_entry *, time_t, long); | |||
__LA_DECL void archive_entry_unset_atime(struct archive_entry *); | |||
#if defined(_WIN32) && !defined(__CYGWIN__) | |||
__LA_DECL void archive_entry_copy_bhfi(struct archive_entry *, BY_HANDLE_FILE_INFORMATION *); | |||
#endif | |||
__LA_DECL void archive_entry_set_birthtime(struct archive_entry *, time_t, long); | |||
__LA_DECL void archive_entry_unset_birthtime(struct archive_entry *); | |||
__LA_DECL void archive_entry_set_ctime(struct archive_entry *, time_t, long); | |||
__LA_DECL void archive_entry_unset_ctime(struct archive_entry *); | |||
__LA_DECL void archive_entry_set_dev(struct archive_entry *, dev_t); | |||
__LA_DECL void archive_entry_set_devmajor(struct archive_entry *, dev_t); | |||
__LA_DECL void archive_entry_set_devminor(struct archive_entry *, dev_t); | |||
__LA_DECL void archive_entry_set_filetype(struct archive_entry *, unsigned int); | |||
__LA_DECL void archive_entry_set_fflags(struct archive_entry *, | |||
unsigned long /* set */, unsigned long /* clear */); | |||
/* Returns pointer to start of first invalid token, or NULL if none. */ | |||
/* Note that all recognized tokens are processed, regardless. */ | |||
__LA_DECL const char *archive_entry_copy_fflags_text(struct archive_entry *, | |||
const char *); | |||
__LA_DECL const wchar_t *archive_entry_copy_fflags_text_w(struct archive_entry *, | |||
const wchar_t *); | |||
__LA_DECL void archive_entry_set_gid(struct archive_entry *, la_int64_t); | |||
__LA_DECL void archive_entry_set_gname(struct archive_entry *, const char *); | |||
__LA_DECL void archive_entry_set_gname_utf8(struct archive_entry *, const char *); | |||
__LA_DECL void archive_entry_copy_gname(struct archive_entry *, const char *); | |||
__LA_DECL void archive_entry_copy_gname_w(struct archive_entry *, const wchar_t *); | |||
__LA_DECL int archive_entry_update_gname_utf8(struct archive_entry *, const char *); | |||
__LA_DECL void archive_entry_set_hardlink(struct archive_entry *, const char *); | |||
__LA_DECL void archive_entry_set_hardlink_utf8(struct archive_entry *, const char *); | |||
__LA_DECL void archive_entry_copy_hardlink(struct archive_entry *, const char *); | |||
__LA_DECL void archive_entry_copy_hardlink_w(struct archive_entry *, const wchar_t *); | |||
__LA_DECL int archive_entry_update_hardlink_utf8(struct archive_entry *, const char *); | |||
__LA_DECL void archive_entry_set_ino(struct archive_entry *, la_int64_t); | |||
__LA_DECL void archive_entry_set_ino64(struct archive_entry *, la_int64_t); | |||
__LA_DECL void archive_entry_set_link(struct archive_entry *, const char *); | |||
__LA_DECL void archive_entry_set_link_utf8(struct archive_entry *, const char *); | |||
__LA_DECL void archive_entry_copy_link(struct archive_entry *, const char *); | |||
__LA_DECL void archive_entry_copy_link_w(struct archive_entry *, const wchar_t *); | |||
__LA_DECL int archive_entry_update_link_utf8(struct archive_entry *, const char *); | |||
__LA_DECL void archive_entry_set_mode(struct archive_entry *, __LA_MODE_T); | |||
__LA_DECL void archive_entry_set_mtime(struct archive_entry *, time_t, long); | |||
__LA_DECL void archive_entry_unset_mtime(struct archive_entry *); | |||
__LA_DECL void archive_entry_set_nlink(struct archive_entry *, unsigned int); | |||
__LA_DECL void archive_entry_set_pathname(struct archive_entry *, const char *); | |||
__LA_DECL void archive_entry_set_pathname_utf8(struct archive_entry *, const char *); | |||
__LA_DECL void archive_entry_copy_pathname(struct archive_entry *, const char *); | |||
__LA_DECL void archive_entry_copy_pathname_w(struct archive_entry *, const wchar_t *); | |||
__LA_DECL int archive_entry_update_pathname_utf8(struct archive_entry *, const char *); | |||
__LA_DECL void archive_entry_set_perm(struct archive_entry *, __LA_MODE_T); | |||
__LA_DECL void archive_entry_set_rdev(struct archive_entry *, dev_t); | |||
__LA_DECL void archive_entry_set_rdevmajor(struct archive_entry *, dev_t); | |||
__LA_DECL void archive_entry_set_rdevminor(struct archive_entry *, dev_t); | |||
__LA_DECL void archive_entry_set_size(struct archive_entry *, la_int64_t); | |||
__LA_DECL void archive_entry_unset_size(struct archive_entry *); | |||
__LA_DECL void archive_entry_copy_sourcepath(struct archive_entry *, const char *); | |||
__LA_DECL void archive_entry_copy_sourcepath_w(struct archive_entry *, const wchar_t *); | |||
__LA_DECL void archive_entry_set_symlink(struct archive_entry *, const char *); | |||
__LA_DECL void archive_entry_set_symlink_utf8(struct archive_entry *, const char *); | |||
__LA_DECL void archive_entry_copy_symlink(struct archive_entry *, const char *); | |||
__LA_DECL void archive_entry_copy_symlink_w(struct archive_entry *, const wchar_t *); | |||
__LA_DECL int archive_entry_update_symlink_utf8(struct archive_entry *, const char *); | |||
__LA_DECL void archive_entry_set_uid(struct archive_entry *, la_int64_t); | |||
__LA_DECL void archive_entry_set_uname(struct archive_entry *, const char *); | |||
__LA_DECL void archive_entry_set_uname_utf8(struct archive_entry *, const char *); | |||
__LA_DECL void archive_entry_copy_uname(struct archive_entry *, const char *); | |||
__LA_DECL void archive_entry_copy_uname_w(struct archive_entry *, const wchar_t *); | |||
__LA_DECL int archive_entry_update_uname_utf8(struct archive_entry *, const char *); | |||
__LA_DECL void archive_entry_set_is_data_encrypted(struct archive_entry *, char is_encrypted); | |||
__LA_DECL void archive_entry_set_is_metadata_encrypted(struct archive_entry *, char is_encrypted); | |||
/* | |||
* Routines to bulk copy fields to/from a platform-native "struct | |||
* stat." Libarchive used to just store a struct stat inside of each | |||
* archive_entry object, but this created issues when trying to | |||
* manipulate archives on systems different than the ones they were | |||
* created on. | |||
* | |||
* TODO: On Linux and other LFS systems, provide both stat32 and | |||
* stat64 versions of these functions and all of the macro glue so | |||
* that archive_entry_stat is magically defined to | |||
* archive_entry_stat32 or archive_entry_stat64 as appropriate. | |||
*/ | |||
__LA_DECL const struct stat *archive_entry_stat(struct archive_entry *); | |||
__LA_DECL void archive_entry_copy_stat(struct archive_entry *, const struct stat *); | |||
/* | |||
* Storage for Mac OS-specific AppleDouble metadata information. | |||
* Apple-format tar files store a separate binary blob containing | |||
* encoded metadata with ACL, extended attributes, etc. | |||
* This provides a place to store that blob. | |||
*/ | |||
__LA_DECL const void * archive_entry_mac_metadata(struct archive_entry *, size_t *); | |||
__LA_DECL void archive_entry_copy_mac_metadata(struct archive_entry *, const void *, size_t); | |||
/* | |||
* ACL routines. This used to simply store and return text-format ACL | |||
* strings, but that proved insufficient for a number of reasons: | |||
* = clients need control over uname/uid and gname/gid mappings | |||
* = there are many different ACL text formats | |||
* = would like to be able to read/convert archives containing ACLs | |||
* on platforms that lack ACL libraries | |||
* | |||
* This last point, in particular, forces me to implement a reasonably | |||
* complete set of ACL support routines. | |||
*/ | |||
/* | |||
* Permission bits. | |||
*/ | |||
#define ARCHIVE_ENTRY_ACL_EXECUTE 0x00000001 | |||
#define ARCHIVE_ENTRY_ACL_WRITE 0x00000002 | |||
#define ARCHIVE_ENTRY_ACL_READ 0x00000004 | |||
#define ARCHIVE_ENTRY_ACL_READ_DATA 0x00000008 | |||
#define ARCHIVE_ENTRY_ACL_LIST_DIRECTORY 0x00000008 | |||
#define ARCHIVE_ENTRY_ACL_WRITE_DATA 0x00000010 | |||
#define ARCHIVE_ENTRY_ACL_ADD_FILE 0x00000010 | |||
#define ARCHIVE_ENTRY_ACL_APPEND_DATA 0x00000020 | |||
#define ARCHIVE_ENTRY_ACL_ADD_SUBDIRECTORY 0x00000020 | |||
#define ARCHIVE_ENTRY_ACL_READ_NAMED_ATTRS 0x00000040 | |||
#define ARCHIVE_ENTRY_ACL_WRITE_NAMED_ATTRS 0x00000080 | |||
#define ARCHIVE_ENTRY_ACL_DELETE_CHILD 0x00000100 | |||
#define ARCHIVE_ENTRY_ACL_READ_ATTRIBUTES 0x00000200 | |||
#define ARCHIVE_ENTRY_ACL_WRITE_ATTRIBUTES 0x00000400 | |||
#define ARCHIVE_ENTRY_ACL_DELETE 0x00000800 | |||
#define ARCHIVE_ENTRY_ACL_READ_ACL 0x00001000 | |||
#define ARCHIVE_ENTRY_ACL_WRITE_ACL 0x00002000 | |||
#define ARCHIVE_ENTRY_ACL_WRITE_OWNER 0x00004000 | |||
#define ARCHIVE_ENTRY_ACL_SYNCHRONIZE 0x00008000 | |||
#define ARCHIVE_ENTRY_ACL_PERMS_POSIX1E \ | |||
(ARCHIVE_ENTRY_ACL_EXECUTE \ | |||
| ARCHIVE_ENTRY_ACL_WRITE \ | |||
| ARCHIVE_ENTRY_ACL_READ) | |||
#define ARCHIVE_ENTRY_ACL_PERMS_NFS4 \ | |||
(ARCHIVE_ENTRY_ACL_EXECUTE \ | |||
| ARCHIVE_ENTRY_ACL_READ_DATA \ | |||
| ARCHIVE_ENTRY_ACL_LIST_DIRECTORY \ | |||
| ARCHIVE_ENTRY_ACL_WRITE_DATA \ | |||
| ARCHIVE_ENTRY_ACL_ADD_FILE \ | |||
| ARCHIVE_ENTRY_ACL_APPEND_DATA \ | |||
| ARCHIVE_ENTRY_ACL_ADD_SUBDIRECTORY \ | |||
| ARCHIVE_ENTRY_ACL_READ_NAMED_ATTRS \ | |||
| ARCHIVE_ENTRY_ACL_WRITE_NAMED_ATTRS \ | |||
| ARCHIVE_ENTRY_ACL_DELETE_CHILD \ | |||
| ARCHIVE_ENTRY_ACL_READ_ATTRIBUTES \ | |||
| ARCHIVE_ENTRY_ACL_WRITE_ATTRIBUTES \ | |||
| ARCHIVE_ENTRY_ACL_DELETE \ | |||
| ARCHIVE_ENTRY_ACL_READ_ACL \ | |||
| ARCHIVE_ENTRY_ACL_WRITE_ACL \ | |||
| ARCHIVE_ENTRY_ACL_WRITE_OWNER \ | |||
| ARCHIVE_ENTRY_ACL_SYNCHRONIZE) | |||
/* | |||
* Inheritance values (NFS4 ACLs only); included in permset. | |||
*/ | |||
#define ARCHIVE_ENTRY_ACL_ENTRY_INHERITED 0x01000000 | |||
#define ARCHIVE_ENTRY_ACL_ENTRY_FILE_INHERIT 0x02000000 | |||
#define ARCHIVE_ENTRY_ACL_ENTRY_DIRECTORY_INHERIT 0x04000000 | |||
#define ARCHIVE_ENTRY_ACL_ENTRY_NO_PROPAGATE_INHERIT 0x08000000 | |||
#define ARCHIVE_ENTRY_ACL_ENTRY_INHERIT_ONLY 0x10000000 | |||
#define ARCHIVE_ENTRY_ACL_ENTRY_SUCCESSFUL_ACCESS 0x20000000 | |||
#define ARCHIVE_ENTRY_ACL_ENTRY_FAILED_ACCESS 0x40000000 | |||
#define ARCHIVE_ENTRY_ACL_INHERITANCE_NFS4 \ | |||
(ARCHIVE_ENTRY_ACL_ENTRY_FILE_INHERIT \ | |||
| ARCHIVE_ENTRY_ACL_ENTRY_DIRECTORY_INHERIT \ | |||
| ARCHIVE_ENTRY_ACL_ENTRY_NO_PROPAGATE_INHERIT \ | |||
| ARCHIVE_ENTRY_ACL_ENTRY_INHERIT_ONLY \ | |||
| ARCHIVE_ENTRY_ACL_ENTRY_SUCCESSFUL_ACCESS \ | |||
| ARCHIVE_ENTRY_ACL_ENTRY_FAILED_ACCESS \ | |||
| ARCHIVE_ENTRY_ACL_ENTRY_INHERITED) | |||
/* We need to be able to specify combinations of these. */ | |||
#define ARCHIVE_ENTRY_ACL_TYPE_ACCESS 0x00000100 /* POSIX.1e only */ | |||
#define ARCHIVE_ENTRY_ACL_TYPE_DEFAULT 0x00000200 /* POSIX.1e only */ | |||
#define ARCHIVE_ENTRY_ACL_TYPE_ALLOW 0x00000400 /* NFS4 only */ | |||
#define ARCHIVE_ENTRY_ACL_TYPE_DENY 0x00000800 /* NFS4 only */ | |||
#define ARCHIVE_ENTRY_ACL_TYPE_AUDIT 0x00001000 /* NFS4 only */ | |||
#define ARCHIVE_ENTRY_ACL_TYPE_ALARM 0x00002000 /* NFS4 only */ | |||
#define ARCHIVE_ENTRY_ACL_TYPE_POSIX1E (ARCHIVE_ENTRY_ACL_TYPE_ACCESS \ | |||
| ARCHIVE_ENTRY_ACL_TYPE_DEFAULT) | |||
#define ARCHIVE_ENTRY_ACL_TYPE_NFS4 (ARCHIVE_ENTRY_ACL_TYPE_ALLOW \ | |||
| ARCHIVE_ENTRY_ACL_TYPE_DENY \ | |||
| ARCHIVE_ENTRY_ACL_TYPE_AUDIT \ | |||
| ARCHIVE_ENTRY_ACL_TYPE_ALARM) | |||
/* Tag values mimic POSIX.1e */ | |||
#define ARCHIVE_ENTRY_ACL_USER 10001 /* Specified user. */ | |||
#define ARCHIVE_ENTRY_ACL_USER_OBJ 10002 /* User who owns the file. */ | |||
#define ARCHIVE_ENTRY_ACL_GROUP 10003 /* Specified group. */ | |||
#define ARCHIVE_ENTRY_ACL_GROUP_OBJ 10004 /* Group who owns the file. */ | |||
#define ARCHIVE_ENTRY_ACL_MASK 10005 /* Modify group access (POSIX.1e only) */ | |||
#define ARCHIVE_ENTRY_ACL_OTHER 10006 /* Public (POSIX.1e only) */ | |||
#define ARCHIVE_ENTRY_ACL_EVERYONE 10107 /* Everyone (NFS4 only) */ | |||
/* | |||
* Set the ACL by clearing it and adding entries one at a time. | |||
* Unlike the POSIX.1e ACL routines, you must specify the type | |||
* (access/default) for each entry. Internally, the ACL data is just | |||
* a soup of entries. API calls here allow you to retrieve just the | |||
* entries of interest. This design (which goes against the spirit of | |||
* POSIX.1e) is useful for handling archive formats that combine | |||
* default and access information in a single ACL list. | |||
*/ | |||
__LA_DECL void archive_entry_acl_clear(struct archive_entry *); | |||
__LA_DECL int archive_entry_acl_add_entry(struct archive_entry *, | |||
int /* type */, int /* permset */, int /* tag */, | |||
int /* qual */, const char * /* name */); | |||
__LA_DECL int archive_entry_acl_add_entry_w(struct archive_entry *, | |||
int /* type */, int /* permset */, int /* tag */, | |||
int /* qual */, const wchar_t * /* name */); | |||
/* | |||
* To retrieve the ACL, first "reset", then repeatedly ask for the | |||
* "next" entry. The want_type parameter allows you to request only | |||
* certain types of entries. | |||
*/ | |||
__LA_DECL int archive_entry_acl_reset(struct archive_entry *, int /* want_type */); | |||
__LA_DECL int archive_entry_acl_next(struct archive_entry *, int /* want_type */, | |||
int * /* type */, int * /* permset */, int * /* tag */, | |||
int * /* qual */, const char ** /* name */); | |||
__LA_DECL int archive_entry_acl_next_w(struct archive_entry *, int /* want_type */, | |||
int * /* type */, int * /* permset */, int * /* tag */, | |||
int * /* qual */, const wchar_t ** /* name */); | |||
/* | |||
* Construct a text-format ACL. The flags argument is a bitmask that | |||
* can include any of the following: | |||
* | |||
* Flags only for archive entries with POSIX.1e ACL: | |||
* ARCHIVE_ENTRY_ACL_TYPE_ACCESS - Include POSIX.1e "access" entries. | |||
* ARCHIVE_ENTRY_ACL_TYPE_DEFAULT - Include POSIX.1e "default" entries. | |||
* ARCHIVE_ENTRY_ACL_STYLE_MARK_DEFAULT - Include "default:" before each | |||
* default ACL entry. | |||
* ARCHIVE_ENTRY_ACL_STYLE_SOLARIS - Output only one colon after "other" and | |||
* "mask" entries. | |||
* | |||
* Flags only for archive entries with NFSv4 ACL: | |||
* ARCHIVE_ENTRY_ACL_STYLE_COMPACT - Do not output the minus character for | |||
* unset permissions and flags in NFSv4 ACL permission and flag fields | |||
* | |||
* Flags for for archive entries with POSIX.1e ACL or NFSv4 ACL: | |||
* ARCHIVE_ENTRY_ACL_STYLE_EXTRA_ID - Include extra numeric ID field in | |||
* each ACL entry. | |||
* ARCHIVE_ENTRY_ACL_STYLE_SEPARATOR_COMMA - Separate entries with comma | |||
* instead of newline. | |||
*/ | |||
#define ARCHIVE_ENTRY_ACL_STYLE_EXTRA_ID 0x00000001 | |||
#define ARCHIVE_ENTRY_ACL_STYLE_MARK_DEFAULT 0x00000002 | |||
#define ARCHIVE_ENTRY_ACL_STYLE_SOLARIS 0x00000004 | |||
#define ARCHIVE_ENTRY_ACL_STYLE_SEPARATOR_COMMA 0x00000008 | |||
#define ARCHIVE_ENTRY_ACL_STYLE_COMPACT 0x00000010 | |||
__LA_DECL wchar_t *archive_entry_acl_to_text_w(struct archive_entry *, | |||
la_ssize_t * /* len */, int /* flags */); | |||
__LA_DECL char *archive_entry_acl_to_text(struct archive_entry *, | |||
la_ssize_t * /* len */, int /* flags */); | |||
__LA_DECL int archive_entry_acl_from_text_w(struct archive_entry *, | |||
const wchar_t * /* wtext */, int /* type */); | |||
__LA_DECL int archive_entry_acl_from_text(struct archive_entry *, | |||
const char * /* text */, int /* type */); | |||
/* Deprecated constants */ | |||
#define OLD_ARCHIVE_ENTRY_ACL_STYLE_EXTRA_ID 1024 | |||
#define OLD_ARCHIVE_ENTRY_ACL_STYLE_MARK_DEFAULT 2048 | |||
/* Deprecated functions */ | |||
__LA_DECL const wchar_t *archive_entry_acl_text_w(struct archive_entry *, | |||
int /* flags */) __LA_DEPRECATED; | |||
__LA_DECL const char *archive_entry_acl_text(struct archive_entry *, | |||
int /* flags */) __LA_DEPRECATED; | |||
/* Return bitmask of ACL types in an archive entry */ | |||
__LA_DECL int archive_entry_acl_types(struct archive_entry *); | |||
/* Return a count of entries matching 'want_type' */ | |||
__LA_DECL int archive_entry_acl_count(struct archive_entry *, int /* want_type */); | |||
/* Return an opaque ACL object. */ | |||
/* There's not yet anything clients can actually do with this... */ | |||
struct archive_acl; | |||
__LA_DECL struct archive_acl *archive_entry_acl(struct archive_entry *); | |||
/* | |||
* extended attributes | |||
*/ | |||
__LA_DECL void archive_entry_xattr_clear(struct archive_entry *); | |||
__LA_DECL void archive_entry_xattr_add_entry(struct archive_entry *, | |||
const char * /* name */, const void * /* value */, | |||
size_t /* size */); | |||
/* | |||
* To retrieve the xattr list, first "reset", then repeatedly ask for the | |||
* "next" entry. | |||
*/ | |||
__LA_DECL int archive_entry_xattr_count(struct archive_entry *); | |||
__LA_DECL int archive_entry_xattr_reset(struct archive_entry *); | |||
__LA_DECL int archive_entry_xattr_next(struct archive_entry *, | |||
const char ** /* name */, const void ** /* value */, size_t *); | |||
/* | |||
* sparse | |||
*/ | |||
__LA_DECL void archive_entry_sparse_clear(struct archive_entry *); | |||
__LA_DECL void archive_entry_sparse_add_entry(struct archive_entry *, | |||
la_int64_t /* offset */, la_int64_t /* length */); | |||
/* | |||
* To retrieve the xattr list, first "reset", then repeatedly ask for the | |||
* "next" entry. | |||
*/ | |||
__LA_DECL int archive_entry_sparse_count(struct archive_entry *); | |||
__LA_DECL int archive_entry_sparse_reset(struct archive_entry *); | |||
__LA_DECL int archive_entry_sparse_next(struct archive_entry *, | |||
la_int64_t * /* offset */, la_int64_t * /* length */); | |||
/* | |||
* Utility to match up hardlinks. | |||
* | |||
* The 'struct archive_entry_linkresolver' is a cache of archive entries | |||
* for files with multiple links. Here's how to use it: | |||
* 1. Create a lookup object with archive_entry_linkresolver_new() | |||
* 2. Tell it the archive format you're using. | |||
* 3. Hand each archive_entry to archive_entry_linkify(). | |||
* That function will return 0, 1, or 2 entries that should | |||
* be written. | |||
* 4. Call archive_entry_linkify(resolver, NULL) until | |||
* no more entries are returned. | |||
* 5. Call archive_entry_linkresolver_free(resolver) to free resources. | |||
* | |||
* The entries returned have their hardlink and size fields updated | |||
* appropriately. If an entry is passed in that does not refer to | |||
* a file with multiple links, it is returned unchanged. The intention | |||
* is that you should be able to simply filter all entries through | |||
* this machine. | |||
* | |||
* To make things more efficient, be sure that each entry has a valid | |||
* nlinks value. The hardlink cache uses this to track when all links | |||
* have been found. If the nlinks value is zero, it will keep every | |||
* name in the cache indefinitely, which can use a lot of memory. | |||
* | |||
* Note that archive_entry_size() is reset to zero if the file | |||
* body should not be written to the archive. Pay attention! | |||
*/ | |||
struct archive_entry_linkresolver; | |||
/* | |||
* There are three different strategies for marking hardlinks. | |||
* The descriptions below name them after the best-known | |||
* formats that rely on each strategy: | |||
* | |||
* "Old cpio" is the simplest, it always returns any entry unmodified. | |||
* As far as I know, only cpio formats use this. Old cpio archives | |||
* store every link with the full body; the onus is on the dearchiver | |||
* to detect and properly link the files as they are restored. | |||
* "tar" is also pretty simple; it caches a copy the first time it sees | |||
* any link. Subsequent appearances are modified to be hardlink | |||
* references to the first one without any body. Used by all tar | |||
* formats, although the newest tar formats permit the "old cpio" strategy | |||
* as well. This strategy is very simple for the dearchiver, | |||
* and reasonably straightforward for the archiver. | |||
* "new cpio" is trickier. It stores the body only with the last | |||
* occurrence. The complication is that we might not | |||
* see every link to a particular file in a single session, so | |||
* there's no easy way to know when we've seen the last occurrence. | |||
* The solution here is to queue one link until we see the next. | |||
* At the end of the session, you can enumerate any remaining | |||
* entries by calling archive_entry_linkify(NULL) and store those | |||
* bodies. If you have a file with three links l1, l2, and l3, | |||
* you'll get the following behavior if you see all three links: | |||
* linkify(l1) => NULL (the resolver stores l1 internally) | |||
* linkify(l2) => l1 (resolver stores l2, you write l1) | |||
* linkify(l3) => l2, l3 (all links seen, you can write both). | |||
* If you only see l1 and l2, you'll get this behavior: | |||
* linkify(l1) => NULL | |||
* linkify(l2) => l1 | |||
* linkify(NULL) => l2 (at end, you retrieve remaining links) | |||
* As the name suggests, this strategy is used by newer cpio variants. | |||
* It's noticeably more complex for the archiver, slightly more complex | |||
* for the dearchiver than the tar strategy, but makes it straightforward | |||
* to restore a file using any link by simply continuing to scan until | |||
* you see a link that is stored with a body. In contrast, the tar | |||
* strategy requires you to rescan the archive from the beginning to | |||
* correctly extract an arbitrary link. | |||
*/ | |||
__LA_DECL struct archive_entry_linkresolver *archive_entry_linkresolver_new(void); | |||
__LA_DECL void archive_entry_linkresolver_set_strategy( | |||
struct archive_entry_linkresolver *, int /* format_code */); | |||
__LA_DECL void archive_entry_linkresolver_free(struct archive_entry_linkresolver *); | |||
__LA_DECL void archive_entry_linkify(struct archive_entry_linkresolver *, | |||
struct archive_entry **, struct archive_entry **); | |||
__LA_DECL struct archive_entry *archive_entry_partial_links( | |||
struct archive_entry_linkresolver *res, unsigned int *links); | |||
#ifdef __cplusplus | |||
} | |||
#endif | |||
/* This is meaningless outside of this header. */ | |||
#undef __LA_DECL | |||
#endif /* !ARCHIVE_ENTRY_H_INCLUDED */ |
@@ -0,0 +1,585 @@ | |||
#ifndef __CURL_CURLBUILD_H | |||
#define __CURL_CURLBUILD_H | |||
/*************************************************************************** | |||
* _ _ ____ _ | |||
* Project ___| | | | _ \| | | |||
* / __| | | | |_) | | | |||
* | (__| |_| | _ <| |___ | |||
* \___|\___/|_| \_\_____| | |||
* | |||
* Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al. | |||
* | |||
* This software is licensed as described in the file COPYING, which | |||
* you should have received as part of this distribution. The terms | |||
* are also available at http://curl.haxx.se/docs/copyright.html. | |||
* | |||
* You may opt to use, copy, modify, merge, publish, distribute and/or sell | |||
* copies of the Software, and permit persons to whom the Software is | |||
* furnished to do so, under the terms of the COPYING file. | |||
* | |||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | |||
* KIND, either express or implied. | |||
* | |||
***************************************************************************/ | |||
/* ================================================================ */ | |||
/* NOTES FOR CONFIGURE CAPABLE SYSTEMS */ | |||
/* ================================================================ */ | |||
/* | |||
* NOTE 1: | |||
* ------- | |||
* | |||
* See file include/curl/curlbuild.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 | |||
* curl library user nor by the curl library builder. | |||
* | |||
* If you think that something actually needs to be changed, adjusted | |||
* or fixed in this file, then, report it on the libcurl development | |||
* mailing list: http://cool.haxx.se/mailman/listinfo/curl-library/ | |||
* | |||
* 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 'curl' or 'CURL' | |||
* prefixed, otherwise public name space would be polluted. | |||
* | |||
* NOTE 2: | |||
* ------- | |||
* | |||
* For any given platform/compiler curl_off_t must be typedef'ed to a | |||
* 64-bit wide signed integral data type. The width of this data type | |||
* must remain constant and independent of any possible large file | |||
* support settings. | |||
* | |||
* As an exception to the above, curl_off_t shall be typedef'ed to a | |||
* 32-bit wide signed integral data type if there is no 64-bit type. | |||
* | |||
* As a general rule, curl_off_t shall not be mapped to off_t. This | |||
* rule shall only be violated if off_t is the only 64-bit data type | |||
* available and the size of off_t is independent of large file support | |||
* settings. Keep your build on the safe side avoiding an off_t gating. | |||
* If you have a 64-bit off_t then take for sure that another 64-bit | |||
* data type exists, dig deeper and you will find it. | |||
* | |||
* NOTE 3: | |||
* ------- | |||
* | |||
* Right now you might be staring at file include/curl/curlbuild.h.dist or | |||
* at file include/curl/curlbuild.h, this is due to the following reason: | |||
* file include/curl/curlbuild.h.dist is renamed to include/curl/curlbuild.h | |||
* when the libcurl source code distribution archive file is created. | |||
* | |||
* File include/curl/curlbuild.h.dist is not included in the distribution | |||
* archive. File include/curl/curlbuild.h is not present in the git tree. | |||
* | |||
* The distributed include/curl/curlbuild.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 include/curl/curlbuild.h file with one that | |||
* is suitable and specific to the library being configured and built, which | |||
* is generated from the include/curl/curlbuild.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 curlbuild.h and other local files. | |||
* | |||
*/ | |||
/* ================================================================ */ | |||
/* DEFINITION OF THESE SYMBOLS SHALL NOT TAKE PLACE ANYWHERE ELSE */ | |||
/* ================================================================ */ | |||
#ifdef CURL_SIZEOF_LONG | |||
# error "CURL_SIZEOF_LONG shall not be defined except in curlbuild.h" | |||
Error Compilation_aborted_CURL_SIZEOF_LONG_already_defined | |||
#endif | |||
#ifdef CURL_TYPEOF_CURL_SOCKLEN_T | |||
# error "CURL_TYPEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h" | |||
Error Compilation_aborted_CURL_TYPEOF_CURL_SOCKLEN_T_already_defined | |||
#endif | |||
#ifdef CURL_SIZEOF_CURL_SOCKLEN_T | |||
# error "CURL_SIZEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h" | |||
Error Compilation_aborted_CURL_SIZEOF_CURL_SOCKLEN_T_already_defined | |||
#endif | |||
#ifdef CURL_TYPEOF_CURL_OFF_T | |||
# error "CURL_TYPEOF_CURL_OFF_T shall not be defined except in curlbuild.h" | |||
Error Compilation_aborted_CURL_TYPEOF_CURL_OFF_T_already_defined | |||
#endif | |||
#ifdef CURL_FORMAT_CURL_OFF_T | |||
# error "CURL_FORMAT_CURL_OFF_T shall not be defined except in curlbuild.h" | |||
Error Compilation_aborted_CURL_FORMAT_CURL_OFF_T_already_defined | |||
#endif | |||
#ifdef CURL_FORMAT_CURL_OFF_TU | |||
# error "CURL_FORMAT_CURL_OFF_TU shall not be defined except in curlbuild.h" | |||
Error Compilation_aborted_CURL_FORMAT_CURL_OFF_TU_already_defined | |||
#endif | |||
#ifdef CURL_FORMAT_OFF_T | |||
# error "CURL_FORMAT_OFF_T shall not be defined except in curlbuild.h" | |||
Error Compilation_aborted_CURL_FORMAT_OFF_T_already_defined | |||
#endif | |||
#ifdef CURL_SIZEOF_CURL_OFF_T | |||
# error "CURL_SIZEOF_CURL_OFF_T shall not be defined except in curlbuild.h" | |||
Error Compilation_aborted_CURL_SIZEOF_CURL_OFF_T_already_defined | |||
#endif | |||
#ifdef CURL_SUFFIX_CURL_OFF_T | |||
# error "CURL_SUFFIX_CURL_OFF_T shall not be defined except in curlbuild.h" | |||
Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_T_already_defined | |||
#endif | |||
#ifdef CURL_SUFFIX_CURL_OFF_TU | |||
# error "CURL_SUFFIX_CURL_OFF_TU shall not be defined except in curlbuild.h" | |||
Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_TU_already_defined | |||
#endif | |||
/* ================================================================ */ | |||
/* EXTERNAL INTERFACE SETTINGS FOR NON-CONFIGURE SYSTEMS ONLY */ | |||
/* ================================================================ */ | |||
#if defined(__DJGPP__) || defined(__GO32__) | |||
# if defined(__DJGPP__) && (__DJGPP__ > 1) | |||
# define CURL_SIZEOF_LONG 4 | |||
# define CURL_TYPEOF_CURL_OFF_T long long | |||
# define CURL_FORMAT_CURL_OFF_T "lld" | |||
# define CURL_FORMAT_CURL_OFF_TU "llu" | |||
# define CURL_FORMAT_OFF_T "%lld" | |||
# define CURL_SIZEOF_CURL_OFF_T 8 | |||
# define CURL_SUFFIX_CURL_OFF_T LL | |||
# define CURL_SUFFIX_CURL_OFF_TU ULL | |||
# else | |||
# define CURL_SIZEOF_LONG 4 | |||
# define CURL_TYPEOF_CURL_OFF_T long | |||
# define CURL_FORMAT_CURL_OFF_T "ld" | |||
# define CURL_FORMAT_CURL_OFF_TU "lu" | |||
# define CURL_FORMAT_OFF_T "%ld" | |||
# define CURL_SIZEOF_CURL_OFF_T 4 | |||
# define CURL_SUFFIX_CURL_OFF_T L | |||
# define CURL_SUFFIX_CURL_OFF_TU UL | |||
# endif | |||
# define CURL_TYPEOF_CURL_SOCKLEN_T int | |||
# define CURL_SIZEOF_CURL_SOCKLEN_T 4 | |||
#elif defined(__SALFORDC__) | |||
# define CURL_SIZEOF_LONG 4 | |||
# define CURL_TYPEOF_CURL_OFF_T long | |||
# define CURL_FORMAT_CURL_OFF_T "ld" | |||
# define CURL_FORMAT_CURL_OFF_TU "lu" | |||
# define CURL_FORMAT_OFF_T "%ld" | |||
# define CURL_SIZEOF_CURL_OFF_T 4 | |||
# define CURL_SUFFIX_CURL_OFF_T L | |||
# define CURL_SUFFIX_CURL_OFF_TU UL | |||
# define CURL_TYPEOF_CURL_SOCKLEN_T int | |||
# define CURL_SIZEOF_CURL_SOCKLEN_T 4 | |||
#elif defined(__BORLANDC__) | |||
# if (__BORLANDC__ < 0x520) | |||
# define CURL_SIZEOF_LONG 4 | |||
# define CURL_TYPEOF_CURL_OFF_T long | |||
# define CURL_FORMAT_CURL_OFF_T "ld" | |||
# define CURL_FORMAT_CURL_OFF_TU "lu" | |||
# define CURL_FORMAT_OFF_T "%ld" | |||
# define CURL_SIZEOF_CURL_OFF_T 4 | |||
# define CURL_SUFFIX_CURL_OFF_T L | |||
# define CURL_SUFFIX_CURL_OFF_TU UL | |||
# else | |||
# define CURL_SIZEOF_LONG 4 | |||
# define CURL_TYPEOF_CURL_OFF_T __int64 | |||
# define CURL_FORMAT_CURL_OFF_T "I64d" | |||
# define CURL_FORMAT_CURL_OFF_TU "I64u" | |||
# define CURL_FORMAT_OFF_T "%I64d" | |||
# define CURL_SIZEOF_CURL_OFF_T 8 | |||
# define CURL_SUFFIX_CURL_OFF_T i64 | |||
# define CURL_SUFFIX_CURL_OFF_TU ui64 | |||
# endif | |||
# define CURL_TYPEOF_CURL_SOCKLEN_T int | |||
# define CURL_SIZEOF_CURL_SOCKLEN_T 4 | |||
#elif defined(__TURBOC__) | |||
# define CURL_SIZEOF_LONG 4 | |||
# define CURL_TYPEOF_CURL_OFF_T long | |||
# define CURL_FORMAT_CURL_OFF_T "ld" | |||
# define CURL_FORMAT_CURL_OFF_TU "lu" | |||
# define CURL_FORMAT_OFF_T "%ld" | |||
# define CURL_SIZEOF_CURL_OFF_T 4 | |||
# define CURL_SUFFIX_CURL_OFF_T L | |||
# define CURL_SUFFIX_CURL_OFF_TU UL | |||
# define CURL_TYPEOF_CURL_SOCKLEN_T int | |||
# define CURL_SIZEOF_CURL_SOCKLEN_T 4 | |||
#elif defined(__WATCOMC__) | |||
# if defined(__386__) | |||
# define CURL_SIZEOF_LONG 4 | |||
# define CURL_TYPEOF_CURL_OFF_T __int64 | |||
# define CURL_FORMAT_CURL_OFF_T "I64d" | |||
# define CURL_FORMAT_CURL_OFF_TU "I64u" | |||
# define CURL_FORMAT_OFF_T "%I64d" | |||
# define CURL_SIZEOF_CURL_OFF_T 8 | |||
# define CURL_SUFFIX_CURL_OFF_T i64 | |||
# define CURL_SUFFIX_CURL_OFF_TU ui64 | |||
# else | |||
# define CURL_SIZEOF_LONG 4 | |||
# define CURL_TYPEOF_CURL_OFF_T long | |||
# define CURL_FORMAT_CURL_OFF_T "ld" | |||
# define CURL_FORMAT_CURL_OFF_TU "lu" | |||
# define CURL_FORMAT_OFF_T "%ld" | |||
# define CURL_SIZEOF_CURL_OFF_T 4 | |||
# define CURL_SUFFIX_CURL_OFF_T L | |||
# define CURL_SUFFIX_CURL_OFF_TU UL | |||
# endif | |||
# define CURL_TYPEOF_CURL_SOCKLEN_T int | |||
# define CURL_SIZEOF_CURL_SOCKLEN_T 4 | |||
#elif defined(__POCC__) | |||
# if (__POCC__ < 280) | |||
# define CURL_SIZEOF_LONG 4 | |||
# define CURL_TYPEOF_CURL_OFF_T long | |||
# define CURL_FORMAT_CURL_OFF_T "ld" | |||
# define CURL_FORMAT_CURL_OFF_TU "lu" | |||
# define CURL_FORMAT_OFF_T "%ld" | |||
# define CURL_SIZEOF_CURL_OFF_T 4 | |||
# define CURL_SUFFIX_CURL_OFF_T L | |||
# define CURL_SUFFIX_CURL_OFF_TU UL | |||
# elif defined(_MSC_VER) | |||
# define CURL_SIZEOF_LONG 4 | |||
# define CURL_TYPEOF_CURL_OFF_T __int64 | |||
# define CURL_FORMAT_CURL_OFF_T "I64d" | |||
# define CURL_FORMAT_CURL_OFF_TU "I64u" | |||
# define CURL_FORMAT_OFF_T "%I64d" | |||
# define CURL_SIZEOF_CURL_OFF_T 8 | |||
# define CURL_SUFFIX_CURL_OFF_T i64 | |||
# define CURL_SUFFIX_CURL_OFF_TU ui64 | |||
# else | |||
# define CURL_SIZEOF_LONG 4 | |||
# define CURL_TYPEOF_CURL_OFF_T long long | |||
# define CURL_FORMAT_CURL_OFF_T "lld" | |||
# define CURL_FORMAT_CURL_OFF_TU "llu" | |||
# define CURL_FORMAT_OFF_T "%lld" | |||
# define CURL_SIZEOF_CURL_OFF_T 8 | |||
# define CURL_SUFFIX_CURL_OFF_T LL | |||
# define CURL_SUFFIX_CURL_OFF_TU ULL | |||
# endif | |||
# define CURL_TYPEOF_CURL_SOCKLEN_T int | |||
# define CURL_SIZEOF_CURL_SOCKLEN_T 4 | |||
#elif defined(__LCC__) | |||
# define CURL_SIZEOF_LONG 4 | |||
# define CURL_TYPEOF_CURL_OFF_T long | |||
# define CURL_FORMAT_CURL_OFF_T "ld" | |||
# define CURL_FORMAT_CURL_OFF_TU "lu" | |||
# define CURL_FORMAT_OFF_T "%ld" | |||
# define CURL_SIZEOF_CURL_OFF_T 4 | |||
# define CURL_SUFFIX_CURL_OFF_T L | |||
# define CURL_SUFFIX_CURL_OFF_TU UL | |||
# define CURL_TYPEOF_CURL_SOCKLEN_T int | |||
# define CURL_SIZEOF_CURL_SOCKLEN_T 4 | |||
#elif defined(__SYMBIAN32__) | |||
# if defined(__EABI__) /* Treat all ARM compilers equally */ | |||
# define CURL_SIZEOF_LONG 4 | |||
# define CURL_TYPEOF_CURL_OFF_T long long | |||
# define CURL_FORMAT_CURL_OFF_T "lld" | |||
# define CURL_FORMAT_CURL_OFF_TU "llu" | |||
# define CURL_FORMAT_OFF_T "%lld" | |||
# define CURL_SIZEOF_CURL_OFF_T 8 | |||
# define CURL_SUFFIX_CURL_OFF_T LL | |||
# define CURL_SUFFIX_CURL_OFF_TU ULL | |||
# elif defined(__CW32__) | |||
# pragma longlong on | |||
# define CURL_SIZEOF_LONG 4 | |||
# define CURL_TYPEOF_CURL_OFF_T long long | |||
# define CURL_FORMAT_CURL_OFF_T "lld" | |||
# define CURL_FORMAT_CURL_OFF_TU "llu" | |||
# define CURL_FORMAT_OFF_T "%lld" | |||
# define CURL_SIZEOF_CURL_OFF_T 8 | |||
# define CURL_SUFFIX_CURL_OFF_T LL | |||
# define CURL_SUFFIX_CURL_OFF_TU ULL | |||
# elif defined(__VC32__) | |||
# define CURL_SIZEOF_LONG 4 | |||
# define CURL_TYPEOF_CURL_OFF_T __int64 | |||
# define CURL_FORMAT_CURL_OFF_T "lld" | |||
# define CURL_FORMAT_CURL_OFF_TU "llu" | |||
# define CURL_FORMAT_OFF_T "%lld" | |||
# define CURL_SIZEOF_CURL_OFF_T 8 | |||
# define CURL_SUFFIX_CURL_OFF_T LL | |||
# define CURL_SUFFIX_CURL_OFF_TU ULL | |||
# endif | |||
# define CURL_TYPEOF_CURL_SOCKLEN_T unsigned int | |||
# define CURL_SIZEOF_CURL_SOCKLEN_T 4 | |||
#elif defined(__MWERKS__) | |||
# define CURL_SIZEOF_LONG 4 | |||
# define CURL_TYPEOF_CURL_OFF_T long long | |||
# define CURL_FORMAT_CURL_OFF_T "lld" | |||
# define CURL_FORMAT_CURL_OFF_TU "llu" | |||
# define CURL_FORMAT_OFF_T "%lld" | |||
# define CURL_SIZEOF_CURL_OFF_T 8 | |||
# define CURL_SUFFIX_CURL_OFF_T LL | |||
# define CURL_SUFFIX_CURL_OFF_TU ULL | |||
# define CURL_TYPEOF_CURL_SOCKLEN_T int | |||
# define CURL_SIZEOF_CURL_SOCKLEN_T 4 | |||
#elif defined(_WIN32_WCE) | |||
# define CURL_SIZEOF_LONG 4 | |||
# define CURL_TYPEOF_CURL_OFF_T __int64 | |||
# define CURL_FORMAT_CURL_OFF_T "I64d" | |||
# define CURL_FORMAT_CURL_OFF_TU "I64u" | |||
# define CURL_FORMAT_OFF_T "%I64d" | |||
# define CURL_SIZEOF_CURL_OFF_T 8 | |||
# define CURL_SUFFIX_CURL_OFF_T i64 | |||
# define CURL_SUFFIX_CURL_OFF_TU ui64 | |||
# define CURL_TYPEOF_CURL_SOCKLEN_T int | |||
# define CURL_SIZEOF_CURL_SOCKLEN_T 4 | |||
#elif defined(__MINGW32__) | |||
# define CURL_SIZEOF_LONG 4 | |||
# define CURL_TYPEOF_CURL_OFF_T long long | |||
# define CURL_FORMAT_CURL_OFF_T "I64d" | |||
# define CURL_FORMAT_CURL_OFF_TU "I64u" | |||
# define CURL_FORMAT_OFF_T "%I64d" | |||
# define CURL_SIZEOF_CURL_OFF_T 8 | |||
# define CURL_SUFFIX_CURL_OFF_T LL | |||
# define CURL_SUFFIX_CURL_OFF_TU ULL | |||
# define CURL_TYPEOF_CURL_SOCKLEN_T int | |||
# define CURL_SIZEOF_CURL_SOCKLEN_T 4 | |||
#elif defined(__VMS) | |||
# if defined(__VAX) | |||
# define CURL_SIZEOF_LONG 4 | |||
# define CURL_TYPEOF_CURL_OFF_T long | |||
# define CURL_FORMAT_CURL_OFF_T "ld" | |||
# define CURL_FORMAT_CURL_OFF_TU "lu" | |||
# define CURL_FORMAT_OFF_T "%ld" | |||
# define CURL_SIZEOF_CURL_OFF_T 4 | |||
# define CURL_SUFFIX_CURL_OFF_T L | |||
# define CURL_SUFFIX_CURL_OFF_TU UL | |||
# else | |||
# define CURL_SIZEOF_LONG 4 | |||
# define CURL_TYPEOF_CURL_OFF_T long long | |||
# define CURL_FORMAT_CURL_OFF_T "lld" | |||
# define CURL_FORMAT_CURL_OFF_TU "llu" | |||
# define CURL_FORMAT_OFF_T "%lld" | |||
# define CURL_SIZEOF_CURL_OFF_T 8 | |||
# define CURL_SUFFIX_CURL_OFF_T LL | |||
# define CURL_SUFFIX_CURL_OFF_TU ULL | |||
# endif | |||
# define CURL_TYPEOF_CURL_SOCKLEN_T unsigned int | |||
# define CURL_SIZEOF_CURL_SOCKLEN_T 4 | |||
#elif defined(__OS400__) | |||
# if defined(__ILEC400__) | |||
# define CURL_SIZEOF_LONG 4 | |||
# define CURL_TYPEOF_CURL_OFF_T long long | |||
# define CURL_FORMAT_CURL_OFF_T "lld" | |||
# define CURL_FORMAT_CURL_OFF_TU "llu" | |||
# define CURL_FORMAT_OFF_T "%lld" | |||
# define CURL_SIZEOF_CURL_OFF_T 8 | |||
# define CURL_SUFFIX_CURL_OFF_T LL | |||
# define CURL_SUFFIX_CURL_OFF_TU ULL | |||
# define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t | |||
# define CURL_SIZEOF_CURL_SOCKLEN_T 4 | |||
# define CURL_PULL_SYS_TYPES_H 1 | |||
# define CURL_PULL_SYS_SOCKET_H 1 | |||
# endif | |||
#elif defined(__MVS__) | |||
# if defined(__IBMC__) || defined(__IBMCPP__) | |||
# if defined(_ILP32) | |||
# define CURL_SIZEOF_LONG 4 | |||
# elif defined(_LP64) | |||
# define CURL_SIZEOF_LONG 8 | |||
# endif | |||
# if defined(_LONG_LONG) | |||
# define CURL_TYPEOF_CURL_OFF_T long long | |||
# define CURL_FORMAT_CURL_OFF_T "lld" | |||
# define CURL_FORMAT_CURL_OFF_TU "llu" | |||
# define CURL_FORMAT_OFF_T "%lld" | |||
# define CURL_SIZEOF_CURL_OFF_T 8 | |||
# define CURL_SUFFIX_CURL_OFF_T LL | |||
# define CURL_SUFFIX_CURL_OFF_TU ULL | |||
# elif defined(_LP64) | |||
# define CURL_TYPEOF_CURL_OFF_T long | |||
# define CURL_FORMAT_CURL_OFF_T "ld" | |||
# define CURL_FORMAT_CURL_OFF_TU "lu" | |||
# define CURL_FORMAT_OFF_T "%ld" | |||
# define CURL_SIZEOF_CURL_OFF_T 8 | |||
# define CURL_SUFFIX_CURL_OFF_T L | |||
# define CURL_SUFFIX_CURL_OFF_TU UL | |||
# else | |||
# define CURL_TYPEOF_CURL_OFF_T long | |||
# define CURL_FORMAT_CURL_OFF_T "ld" | |||
# define CURL_FORMAT_CURL_OFF_TU "lu" | |||
# define CURL_FORMAT_OFF_T "%ld" | |||
# define CURL_SIZEOF_CURL_OFF_T 4 | |||
# define CURL_SUFFIX_CURL_OFF_T L | |||
# define CURL_SUFFIX_CURL_OFF_TU UL | |||
# endif | |||
# define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t | |||
# define CURL_SIZEOF_CURL_SOCKLEN_T 4 | |||
# define CURL_PULL_SYS_TYPES_H 1 | |||
# define CURL_PULL_SYS_SOCKET_H 1 | |||
# endif | |||
#elif defined(__370__) | |||
# if defined(__IBMC__) || defined(__IBMCPP__) | |||
# if defined(_ILP32) | |||
# define CURL_SIZEOF_LONG 4 | |||
# elif defined(_LP64) | |||
# define CURL_SIZEOF_LONG 8 | |||
# endif | |||
# if defined(_LONG_LONG) | |||
# define CURL_TYPEOF_CURL_OFF_T long long | |||
# define CURL_FORMAT_CURL_OFF_T "lld" | |||
# define CURL_FORMAT_CURL_OFF_TU "llu" | |||
# define CURL_FORMAT_OFF_T "%lld" | |||
# define CURL_SIZEOF_CURL_OFF_T 8 | |||
# define CURL_SUFFIX_CURL_OFF_T LL | |||
# define CURL_SUFFIX_CURL_OFF_TU ULL | |||
# elif defined(_LP64) | |||
# define CURL_TYPEOF_CURL_OFF_T long | |||
# define CURL_FORMAT_CURL_OFF_T "ld" | |||
# define CURL_FORMAT_CURL_OFF_TU "lu" | |||
# define CURL_FORMAT_OFF_T "%ld" | |||
# define CURL_SIZEOF_CURL_OFF_T 8 | |||
# define CURL_SUFFIX_CURL_OFF_T L | |||
# define CURL_SUFFIX_CURL_OFF_TU UL | |||
# else | |||
# define CURL_TYPEOF_CURL_OFF_T long | |||
# define CURL_FORMAT_CURL_OFF_T "ld" | |||
# define CURL_FORMAT_CURL_OFF_TU "lu" | |||
# define CURL_FORMAT_OFF_T "%ld" | |||
# define CURL_SIZEOF_CURL_OFF_T 4 | |||
# define CURL_SUFFIX_CURL_OFF_T L | |||
# define CURL_SUFFIX_CURL_OFF_TU UL | |||
# endif | |||
# define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t | |||
# define CURL_SIZEOF_CURL_SOCKLEN_T 4 | |||
# define CURL_PULL_SYS_TYPES_H 1 | |||
# define CURL_PULL_SYS_SOCKET_H 1 | |||
# endif | |||
#elif defined(TPF) | |||
# define CURL_SIZEOF_LONG 8 | |||
# define CURL_TYPEOF_CURL_OFF_T long | |||
# define CURL_FORMAT_CURL_OFF_T "ld" | |||
# define CURL_FORMAT_CURL_OFF_TU "lu" | |||
# define CURL_FORMAT_OFF_T "%ld" | |||
# define CURL_SIZEOF_CURL_OFF_T 8 | |||
# define CURL_SUFFIX_CURL_OFF_T L | |||
# define CURL_SUFFIX_CURL_OFF_TU UL | |||
# define CURL_TYPEOF_CURL_SOCKLEN_T int | |||
# define CURL_SIZEOF_CURL_SOCKLEN_T 4 | |||
/* ===================================== */ | |||
/* KEEP MSVC THE PENULTIMATE ENTRY */ | |||
/* ===================================== */ | |||
#elif defined(_MSC_VER) | |||
# if (_MSC_VER >= 900) && (_INTEGRAL_MAX_BITS >= 64) | |||
# define CURL_SIZEOF_LONG 4 | |||
# define CURL_TYPEOF_CURL_OFF_T __int64 | |||
# define CURL_FORMAT_CURL_OFF_T "I64d" | |||
# define CURL_FORMAT_CURL_OFF_TU "I64u" | |||
# define CURL_FORMAT_OFF_T "%I64d" | |||
# define CURL_SIZEOF_CURL_OFF_T 8 | |||
# define CURL_SUFFIX_CURL_OFF_T i64 | |||
# define CURL_SUFFIX_CURL_OFF_TU ui64 | |||
# else | |||
# define CURL_SIZEOF_LONG 4 | |||
# define CURL_TYPEOF_CURL_OFF_T long | |||
# define CURL_FORMAT_CURL_OFF_T "ld" | |||
# define CURL_FORMAT_CURL_OFF_TU "lu" | |||
# define CURL_FORMAT_OFF_T "%ld" | |||
# define CURL_SIZEOF_CURL_OFF_T 4 | |||
# define CURL_SUFFIX_CURL_OFF_T L | |||
# define CURL_SUFFIX_CURL_OFF_TU UL | |||
# endif | |||
# define CURL_TYPEOF_CURL_SOCKLEN_T int | |||
# define CURL_SIZEOF_CURL_SOCKLEN_T 4 | |||
/* ===================================== */ | |||
/* KEEP GENERIC GCC THE LAST ENTRY */ | |||
/* ===================================== */ | |||
#elif defined(__GNUC__) | |||
# if defined(__ILP32__) || \ | |||
defined(__i386__) || defined(__ppc__) || defined(__arm__) || defined(__sparc__) | |||
# define CURL_SIZEOF_LONG 4 | |||
# define CURL_TYPEOF_CURL_OFF_T long long | |||
# define CURL_FORMAT_CURL_OFF_T "lld" | |||
# define CURL_FORMAT_CURL_OFF_TU "llu" | |||
# define CURL_FORMAT_OFF_T "%lld" | |||
# define CURL_SIZEOF_CURL_OFF_T 8 | |||
# define CURL_SUFFIX_CURL_OFF_T LL | |||
# define CURL_SUFFIX_CURL_OFF_TU ULL | |||
# elif defined(__LP64__) || \ | |||
defined(__x86_64__) || defined(__ppc64__) || defined(__sparc64__) | |||
# define CURL_SIZEOF_LONG 8 | |||
# define CURL_TYPEOF_CURL_OFF_T long | |||
# define CURL_FORMAT_CURL_OFF_T "ld" | |||
# define CURL_FORMAT_CURL_OFF_TU "lu" | |||
# define CURL_FORMAT_OFF_T "%ld" | |||
# define CURL_SIZEOF_CURL_OFF_T 8 | |||
# define CURL_SUFFIX_CURL_OFF_T L | |||
# define CURL_SUFFIX_CURL_OFF_TU UL | |||
# endif | |||
# define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t | |||
# define CURL_SIZEOF_CURL_SOCKLEN_T 4 | |||
# define CURL_PULL_SYS_TYPES_H 1 | |||
# define CURL_PULL_SYS_SOCKET_H 1 | |||
#else | |||
# error "Unknown non-configure build target!" | |||
Error Compilation_aborted_Unknown_non_configure_build_target | |||
#endif | |||
/* CURL_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 CURL_PULL_SYS_TYPES_H | |||
# include <sys/types.h> | |||
#endif | |||
/* CURL_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 CURL_PULL_SYS_SOCKET_H | |||
# include <sys/socket.h> | |||
#endif | |||
/* Data type definition of curl_socklen_t. */ | |||
#ifdef CURL_TYPEOF_CURL_SOCKLEN_T | |||
typedef CURL_TYPEOF_CURL_SOCKLEN_T curl_socklen_t; | |||
#endif | |||
/* Data type definition of curl_off_t. */ | |||
#ifdef CURL_TYPEOF_CURL_OFF_T | |||
typedef CURL_TYPEOF_CURL_OFF_T curl_off_t; | |||
#endif | |||
#endif /* __CURL_CURLBUILD_H */ |
@@ -0,0 +1,262 @@ | |||
#ifndef __CURL_CURLRULES_H | |||
#define __CURL_CURLRULES_H | |||
/*************************************************************************** | |||
* _ _ ____ _ | |||
* Project ___| | | | _ \| | | |||
* / __| | | | |_) | | | |||
* | (__| |_| | _ <| |___ | |||
* \___|\___/|_| \_\_____| | |||
* | |||
* Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al. | |||
* | |||
* This software is licensed as described in the file COPYING, which | |||
* you should have received as part of this distribution. The terms | |||
* are also available at http://curl.haxx.se/docs/copyright.html. | |||
* | |||
* You may opt to use, copy, modify, merge, publish, distribute and/or sell | |||
* copies of the Software, and permit persons to whom the Software is | |||
* furnished to do so, under the terms of the COPYING file. | |||
* | |||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | |||
* KIND, either express or implied. | |||
* | |||
***************************************************************************/ | |||
/* ================================================================ */ | |||
/* COMPILE TIME SANITY CHECKS */ | |||
/* ================================================================ */ | |||
/* | |||
* NOTE 1: | |||
* ------- | |||
* | |||
* All checks done in this file are intentionally placed in a public | |||
* header file which is pulled by curl/curl.h when an application is | |||
* being built using an already built libcurl library. Additionally | |||
* this file is also included and used when building the library. | |||
* | |||
* If compilation fails on this file it is certainly sure that the | |||
* problem is elsewhere. It could be a problem in the curlbuild.h | |||
* header file, or simply that you are using different compilation | |||
* settings than those used to build the library. | |||
* | |||
* Nothing in this file is intended to be modified or adjusted by the | |||
* curl library user nor by the curl library builder. | |||
* | |||
* Do not deactivate any check, these are done to make sure that the | |||
* library is properly built and used. | |||
* | |||
* You can find further help on the libcurl development mailing list: | |||
* http://cool.haxx.se/mailman/listinfo/curl-library/ | |||
* | |||
* NOTE 2 | |||
* ------ | |||
* | |||
* Some of the following compile time checks are based on the fact | |||
* that the dimension of a constant array can not be a negative one. | |||
* In this way if the compile time verification fails, the compilation | |||
* will fail issuing an error. The error description wording is compiler | |||
* dependent but it will be quite similar to one of the following: | |||
* | |||
* "negative subscript or subscript is too large" | |||
* "array must have at least one element" | |||
* "-1 is an illegal array size" | |||
* "size of array is negative" | |||
* | |||
* If you are building an application which tries to use an already | |||
* built libcurl library and you are getting this kind of errors on | |||
* this file, it is a clear indication that there is a mismatch between | |||
* how the library was built and how you are trying to use it for your | |||
* application. Your already compiled or binary library provider is the | |||
* only one who can give you the details you need to properly use it. | |||
*/ | |||
/* | |||
* Verify that some macros are actually defined. | |||
*/ | |||
#ifndef CURL_SIZEOF_LONG | |||
# error "CURL_SIZEOF_LONG definition is missing!" | |||
Error Compilation_aborted_CURL_SIZEOF_LONG_is_missing | |||
#endif | |||
#ifndef CURL_TYPEOF_CURL_SOCKLEN_T | |||
# error "CURL_TYPEOF_CURL_SOCKLEN_T definition is missing!" | |||
Error Compilation_aborted_CURL_TYPEOF_CURL_SOCKLEN_T_is_missing | |||
#endif | |||
#ifndef CURL_SIZEOF_CURL_SOCKLEN_T | |||
# error "CURL_SIZEOF_CURL_SOCKLEN_T definition is missing!" | |||
Error Compilation_aborted_CURL_SIZEOF_CURL_SOCKLEN_T_is_missing | |||
#endif | |||
#ifndef CURL_TYPEOF_CURL_OFF_T | |||
# error "CURL_TYPEOF_CURL_OFF_T definition is missing!" | |||
Error Compilation_aborted_CURL_TYPEOF_CURL_OFF_T_is_missing | |||
#endif | |||
#ifndef CURL_FORMAT_CURL_OFF_T | |||
# error "CURL_FORMAT_CURL_OFF_T definition is missing!" | |||
Error Compilation_aborted_CURL_FORMAT_CURL_OFF_T_is_missing | |||
#endif | |||
#ifndef CURL_FORMAT_CURL_OFF_TU | |||
# error "CURL_FORMAT_CURL_OFF_TU definition is missing!" | |||
Error Compilation_aborted_CURL_FORMAT_CURL_OFF_TU_is_missing | |||
#endif | |||
#ifndef CURL_FORMAT_OFF_T | |||
# error "CURL_FORMAT_OFF_T definition is missing!" | |||
Error Compilation_aborted_CURL_FORMAT_OFF_T_is_missing | |||
#endif | |||
#ifndef CURL_SIZEOF_CURL_OFF_T | |||
# error "CURL_SIZEOF_CURL_OFF_T definition is missing!" | |||
Error Compilation_aborted_CURL_SIZEOF_CURL_OFF_T_is_missing | |||
#endif | |||
#ifndef CURL_SUFFIX_CURL_OFF_T | |||
# error "CURL_SUFFIX_CURL_OFF_T definition is missing!" | |||
Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_T_is_missing | |||
#endif | |||
#ifndef CURL_SUFFIX_CURL_OFF_TU | |||
# error "CURL_SUFFIX_CURL_OFF_TU definition is missing!" | |||
Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_TU_is_missing | |||
#endif | |||
/* | |||
* Macros private to this header file. | |||
*/ | |||
#define CurlchkszEQ(t, s) sizeof(t) == s ? 1 : -1 | |||
#define CurlchkszGE(t1, t2) sizeof(t1) >= sizeof(t2) ? 1 : -1 | |||
/* | |||
* Verify that the size previously defined and expected for long | |||
* is the same as the one reported by sizeof() at compile time. | |||
*/ | |||
typedef char | |||
__curl_rule_01__ | |||
[CurlchkszEQ(long, CURL_SIZEOF_LONG)]; | |||
/* | |||
* Verify that the size previously defined and expected for | |||
* curl_off_t is actually the the same as the one reported | |||
* by sizeof() at compile time. | |||
*/ | |||
typedef char | |||
__curl_rule_02__ | |||
[CurlchkszEQ(curl_off_t, CURL_SIZEOF_CURL_OFF_T)]; | |||
/* | |||
* Verify at compile time that the size of curl_off_t as reported | |||
* by sizeof() is greater or equal than the one reported for long | |||
* for the current compilation. | |||
*/ | |||
typedef char | |||
__curl_rule_03__ | |||
[CurlchkszGE(curl_off_t, long)]; | |||
/* | |||
* Verify that the size previously defined and expected for | |||
* curl_socklen_t is actually the the same as the one reported | |||
* by sizeof() at compile time. | |||
*/ | |||
typedef char | |||
__curl_rule_04__ | |||
[CurlchkszEQ(curl_socklen_t, CURL_SIZEOF_CURL_SOCKLEN_T)]; | |||
/* | |||
* Verify at compile time that the size of curl_socklen_t as reported | |||
* by sizeof() is greater or equal than the one reported for int for | |||
* the current compilation. | |||
*/ | |||
typedef char | |||
__curl_rule_05__ | |||
[CurlchkszGE(curl_socklen_t, int)]; | |||
/* ================================================================ */ | |||
/* EXTERNALLY AND INTERNALLY VISIBLE DEFINITIONS */ | |||
/* ================================================================ */ | |||
/* | |||
* CURL_ISOCPP and CURL_OFF_T_C definitions are done here in order to allow | |||
* these to be visible and exported by the external libcurl interface API, | |||
* while also making them visible to the library internals, simply including | |||
* curl_setup.h, without actually needing to include curl.h internally. | |||
* If some day this section would grow big enough, all this should be moved | |||
* to its own header file. | |||
*/ | |||
/* | |||
* Figure out if we can use the ## preprocessor operator, which is supported | |||
* by ISO/ANSI C and C++. Some compilers support it without setting __STDC__ | |||
* or __cplusplus so we need to carefully check for them too. | |||
*/ | |||
#if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus) || \ | |||
defined(__HP_aCC) || defined(__BORLANDC__) || defined(__LCC__) || \ | |||
defined(__POCC__) || defined(__SALFORDC__) || defined(__HIGHC__) || \ | |||
defined(__ILEC400__) | |||
/* This compiler is believed to have an ISO compatible preprocessor */ | |||
#define CURL_ISOCPP | |||
#else | |||
/* This compiler is believed NOT to have an ISO compatible preprocessor */ | |||
#undef CURL_ISOCPP | |||
#endif | |||
/* | |||
* Macros for minimum-width signed and unsigned curl_off_t integer constants. | |||
*/ | |||
#if defined(__BORLANDC__) && (__BORLANDC__ == 0x0551) | |||
# define __CURL_OFF_T_C_HLPR2(x) x | |||
# define __CURL_OFF_T_C_HLPR1(x) __CURL_OFF_T_C_HLPR2(x) | |||
# define CURL_OFF_T_C(Val) __CURL_OFF_T_C_HLPR1(Val) ## \ | |||
__CURL_OFF_T_C_HLPR1(CURL_SUFFIX_CURL_OFF_T) | |||
# define CURL_OFF_TU_C(Val) __CURL_OFF_T_C_HLPR1(Val) ## \ | |||
__CURL_OFF_T_C_HLPR1(CURL_SUFFIX_CURL_OFF_TU) | |||
#else | |||
# ifdef CURL_ISOCPP | |||
# define __CURL_OFF_T_C_HLPR2(Val,Suffix) Val ## Suffix | |||
# else | |||
# define __CURL_OFF_T_C_HLPR2(Val,Suffix) Val/**/Suffix | |||
# endif | |||
# define __CURL_OFF_T_C_HLPR1(Val,Suffix) __CURL_OFF_T_C_HLPR2(Val,Suffix) | |||
# define CURL_OFF_T_C(Val) __CURL_OFF_T_C_HLPR1(Val,CURL_SUFFIX_CURL_OFF_T) | |||
# define CURL_OFF_TU_C(Val) __CURL_OFF_T_C_HLPR1(Val,CURL_SUFFIX_CURL_OFF_TU) | |||
#endif | |||
/* | |||
* Get rid of macros private to this header file. | |||
*/ | |||
#undef CurlchkszEQ | |||
#undef CurlchkszGE | |||
/* | |||
* Get rid of macros not intended to exist beyond this point. | |||
*/ | |||
#undef CURL_PULL_WS2TCPIP_H | |||
#undef CURL_PULL_SYS_TYPES_H | |||
#undef CURL_PULL_SYS_SOCKET_H | |||
#undef CURL_PULL_SYS_POLL_H | |||
#undef CURL_PULL_STDINT_H | |||
#undef CURL_PULL_INTTYPES_H | |||
#undef CURL_TYPEOF_CURL_SOCKLEN_T | |||
#undef CURL_TYPEOF_CURL_OFF_T | |||
#ifdef CURL_NO_OLDIES | |||
#undef CURL_FORMAT_OFF_T /* not required since 7.19.0 - obsoleted in 7.20.0 */ | |||
#endif | |||
#endif /* __CURL_CURLRULES_H */ |
@@ -0,0 +1,77 @@ | |||
#ifndef __CURL_CURLVER_H | |||
#define __CURL_CURLVER_H | |||
/*************************************************************************** | |||
* _ _ ____ _ | |||
* Project ___| | | | _ \| | | |||
* / __| | | | |_) | | | |||
* | (__| |_| | _ <| |___ | |||
* \___|\___/|_| \_\_____| | |||
* | |||
* Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al. | |||
* | |||
* This software is licensed as described in the file COPYING, which | |||
* you should have received as part of this distribution. The terms | |||
* are also available at http://curl.haxx.se/docs/copyright.html. | |||
* | |||
* You may opt to use, copy, modify, merge, publish, distribute and/or sell | |||
* copies of the Software, and permit persons to whom the Software is | |||
* furnished to do so, under the terms of the COPYING file. | |||
* | |||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | |||
* KIND, either express or implied. | |||
* | |||
***************************************************************************/ | |||
/* This header file contains nothing but libcurl version info, generated by | |||
a script at release-time. This was made its own header file in 7.11.2 */ | |||
/* This is the global package copyright */ | |||
#define LIBCURL_COPYRIGHT "1996 - 2015 Daniel Stenberg, <daniel@haxx.se>." | |||
/* This is the version number of the libcurl package from which this header | |||
file origins: */ | |||
#define LIBCURL_VERSION "7.44.0" | |||
/* The numeric version number is also available "in parts" by using these | |||
defines: */ | |||
#define LIBCURL_VERSION_MAJOR 7 | |||
#define LIBCURL_VERSION_MINOR 44 | |||
#define LIBCURL_VERSION_PATCH 0 | |||
/* This is the numeric version of the libcurl version number, meant for easier | |||
parsing and comparions by programs. The LIBCURL_VERSION_NUM define will | |||
always follow this syntax: | |||
0xXXYYZZ | |||
Where XX, YY and ZZ are the main version, release and patch numbers in | |||
hexadecimal (using 8 bits each). All three numbers are always represented | |||
using two digits. 1.2 would appear as "0x010200" while version 9.11.7 | |||
appears as "0x090b07". | |||
This 6-digit (24 bits) hexadecimal number does not show pre-release number, | |||
and it is always a greater number in a more recent release. It makes | |||
comparisons with greater than and less than work. | |||
Note: This define is the full hex number and _does not_ use the | |||
CURL_VERSION_BITS() macro since curl's own configure script greps for it | |||
and needs it to contain the full number. | |||
*/ | |||
#define LIBCURL_VERSION_NUM 0x072c00 | |||
/* | |||
* This is the date and time when the full source package was created. The | |||
* timestamp is not stored in git, as the timestamp is properly set in the | |||
* tarballs by the maketgz script. | |||
* | |||
* The format of the date should follow this template: | |||
* | |||
* "Mon Feb 12 11:35:33 UTC 2007" | |||
*/ | |||
#define LIBCURL_TIMESTAMP "Wed Aug 12 06:10:30 UTC 2015" | |||
#define CURL_VERSION_BITS(x,y,z) ((x)<<16|(y)<<8|z) | |||
#define CURL_AT_LEAST_VERSION(x,y,z) \ | |||
(LIBCURL_VERSION_NUM >= CURL_VERSION_BITS(x, y, z)) | |||
#endif /* __CURL_CURLVER_H */ |
@@ -0,0 +1,102 @@ | |||
#ifndef __CURL_EASY_H | |||
#define __CURL_EASY_H | |||
/*************************************************************************** | |||
* _ _ ____ _ | |||
* Project ___| | | | _ \| | | |||
* / __| | | | |_) | | | |||
* | (__| |_| | _ <| |___ | |||
* \___|\___/|_| \_\_____| | |||
* | |||
* Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al. | |||
* | |||
* This software is licensed as described in the file COPYING, which | |||
* you should have received as part of this distribution. The terms | |||
* are also available at http://curl.haxx.se/docs/copyright.html. | |||
* | |||
* You may opt to use, copy, modify, merge, publish, distribute and/or sell | |||
* copies of the Software, and permit persons to whom the Software is | |||
* furnished to do so, under the terms of the COPYING file. | |||
* | |||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | |||
* KIND, either express or implied. | |||
* | |||
***************************************************************************/ | |||
#ifdef __cplusplus | |||
extern "C" { | |||
#endif | |||
CURL_EXTERN CURL *curl_easy_init(void); | |||
CURL_EXTERN CURLcode curl_easy_setopt(CURL *curl, CURLoption option, ...); | |||
CURL_EXTERN CURLcode curl_easy_perform(CURL *curl); | |||
CURL_EXTERN void curl_easy_cleanup(CURL *curl); | |||
/* | |||
* NAME curl_easy_getinfo() | |||
* | |||
* DESCRIPTION | |||
* | |||
* Request internal information from the curl session with this function. The | |||
* third argument MUST be a pointer to a long, a pointer to a char * or a | |||
* pointer to a double (as the documentation describes elsewhere). The data | |||
* pointed to will be filled in accordingly and can be relied upon only if the | |||
* function returns CURLE_OK. This function is intended to get used *AFTER* a | |||
* performed transfer, all results from this function are undefined until the | |||
* transfer is completed. | |||
*/ | |||
CURL_EXTERN CURLcode curl_easy_getinfo(CURL *curl, CURLINFO info, ...); | |||
/* | |||
* NAME curl_easy_duphandle() | |||
* | |||
* DESCRIPTION | |||
* | |||
* Creates a new curl session handle with the same options set for the handle | |||
* passed in. Duplicating a handle could only be a matter of cloning data and | |||
* options, internal state info and things like persistent connections cannot | |||
* be transferred. It is useful in multithreaded applications when you can run | |||
* curl_easy_duphandle() for each new thread to avoid a series of identical | |||
* curl_easy_setopt() invokes in every thread. | |||
*/ | |||
CURL_EXTERN CURL* curl_easy_duphandle(CURL *curl); | |||
/* | |||
* NAME curl_easy_reset() | |||
* | |||
* DESCRIPTION | |||
* | |||
* Re-initializes a CURL handle to the default values. This puts back the | |||
* handle to the same state as it was in when it was just created. | |||
* | |||
* It does keep: live connections, the Session ID cache, the DNS cache and the | |||
* cookies. | |||
*/ | |||
CURL_EXTERN void curl_easy_reset(CURL *curl); | |||
/* | |||
* NAME curl_easy_recv() | |||
* | |||
* DESCRIPTION | |||
* | |||
* Receives data from the connected socket. Use after successful | |||
* curl_easy_perform() with CURLOPT_CONNECT_ONLY option. | |||
*/ | |||
CURL_EXTERN CURLcode curl_easy_recv(CURL *curl, void *buffer, size_t buflen, | |||
size_t *n); | |||
/* | |||
* NAME curl_easy_send() | |||
* | |||
* DESCRIPTION | |||
* | |||
* Sends data over the connected socket. Use after successful | |||
* curl_easy_perform() with CURLOPT_CONNECT_ONLY option. | |||
*/ | |||
CURL_EXTERN CURLcode curl_easy_send(CURL *curl, const void *buffer, | |||
size_t buflen, size_t *n); | |||
#ifdef __cplusplus | |||
} | |||
#endif | |||
#endif |
@@ -0,0 +1,74 @@ | |||
#ifndef __CURL_MPRINTF_H | |||
#define __CURL_MPRINTF_H | |||
/*************************************************************************** | |||
* _ _ ____ _ | |||
* Project ___| | | | _ \| | | |||
* / __| | | | |_) | | | |||
* | (__| |_| | _ <| |___ | |||
* \___|\___/|_| \_\_____| | |||
* | |||
* Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al. | |||
* | |||
* This software is licensed as described in the file COPYING, which | |||
* you should have received as part of this distribution. The terms | |||
* are also available at http://curl.haxx.se/docs/copyright.html. | |||
* | |||
* You may opt to use, copy, modify, merge, publish, distribute and/or sell | |||
* copies of the Software, and permit persons to whom the Software is | |||
* furnished to do so, under the terms of the COPYING file. | |||
* | |||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | |||
* KIND, either express or implied. | |||
* | |||
***************************************************************************/ | |||
#include <stdarg.h> | |||
#include <stdio.h> /* needed for FILE */ | |||
#include "curl.h" | |||
#ifdef __cplusplus | |||
extern "C" { | |||
#endif | |||
CURL_EXTERN int curl_mprintf(const char *format, ...); | |||
CURL_EXTERN int curl_mfprintf(FILE *fd, const char *format, ...); | |||
CURL_EXTERN int curl_msprintf(char *buffer, const char *format, ...); | |||
CURL_EXTERN int curl_msnprintf(char *buffer, size_t maxlength, | |||
const char *format, ...); | |||
CURL_EXTERN int curl_mvprintf(const char *format, va_list args); | |||
CURL_EXTERN int curl_mvfprintf(FILE *fd, const char *format, va_list args); | |||
CURL_EXTERN int curl_mvsprintf(char *buffer, const char *format, va_list args); | |||
CURL_EXTERN int curl_mvsnprintf(char *buffer, size_t maxlength, | |||
const char *format, va_list args); | |||
CURL_EXTERN char *curl_maprintf(const char *format, ...); | |||
CURL_EXTERN char *curl_mvaprintf(const char *format, va_list args); | |||
#ifdef _MPRINTF_REPLACE | |||
# undef printf | |||
# undef fprintf | |||
# undef sprintf | |||
# undef vsprintf | |||
# undef snprintf | |||
# undef vprintf | |||
# undef vfprintf | |||
# undef vsnprintf | |||
# undef aprintf | |||
# undef vaprintf | |||
# define printf curl_mprintf | |||
# define fprintf curl_mfprintf | |||
# define sprintf curl_msprintf | |||
# define vsprintf curl_mvsprintf | |||
# define snprintf curl_msnprintf | |||
# define vprintf curl_mvprintf | |||
# define vfprintf curl_mvfprintf | |||
# define vsnprintf curl_mvsnprintf | |||
# define aprintf curl_maprintf | |||
# define vaprintf curl_mvaprintf | |||
#endif | |||
#ifdef __cplusplus | |||
} | |||
#endif | |||
#endif /* __CURL_MPRINTF_H */ |
@@ -0,0 +1,435 @@ | |||
#ifndef __CURL_MULTI_H | |||
#define __CURL_MULTI_H | |||
/*************************************************************************** | |||
* _ _ ____ _ | |||
* Project ___| | | | _ \| | | |||
* / __| | | | |_) | | | |||
* | (__| |_| | _ <| |___ | |||
* \___|\___/|_| \_\_____| | |||
* | |||
* Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al. | |||
* | |||
* This software is licensed as described in the file COPYING, which | |||
* you should have received as part of this distribution. The terms | |||
* are also available at http://curl.haxx.se/docs/copyright.html. | |||
* | |||
* You may opt to use, copy, modify, merge, publish, distribute and/or sell | |||
* copies of the Software, and permit persons to whom the Software is | |||
* furnished to do so, under the terms of the COPYING file. | |||
* | |||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | |||
* KIND, either express or implied. | |||
* | |||
***************************************************************************/ | |||
/* | |||
This is an "external" header file. Don't give away any internals here! | |||
GOALS | |||
o Enable a "pull" interface. The application that uses libcurl decides where | |||
and when to ask libcurl to get/send data. | |||
o Enable multiple simultaneous transfers in the same thread without making it | |||
complicated for the application. | |||
o Enable the application to select() on its own file descriptors and curl's | |||
file descriptors simultaneous easily. | |||
*/ | |||
/* | |||
* This header file should not really need to include "curl.h" since curl.h | |||
* itself includes this file and we expect user applications to do #include | |||
* <curl/curl.h> without the need for especially including multi.h. | |||
* | |||
* For some reason we added this include here at one point, and rather than to | |||
* break existing (wrongly written) libcurl applications, we leave it as-is | |||
* but with this warning attached. | |||
*/ | |||
#include "curl.h" | |||
#ifdef __cplusplus | |||
extern "C" { | |||
#endif | |||
typedef void CURLM; | |||
typedef enum { | |||
CURLM_CALL_MULTI_PERFORM = -1, /* please call curl_multi_perform() or | |||
curl_multi_socket*() soon */ | |||
CURLM_OK, | |||
CURLM_BAD_HANDLE, /* the passed-in handle is not a valid CURLM handle */ | |||
CURLM_BAD_EASY_HANDLE, /* an easy handle was not good/valid */ | |||
CURLM_OUT_OF_MEMORY, /* if you ever get this, you're in deep sh*t */ | |||
CURLM_INTERNAL_ERROR, /* this is a libcurl bug */ | |||
CURLM_BAD_SOCKET, /* the passed in socket argument did not match */ | |||
CURLM_UNKNOWN_OPTION, /* curl_multi_setopt() with unsupported option */ | |||
CURLM_ADDED_ALREADY, /* an easy handle already added to a multi handle was | |||
attempted to get added - again */ | |||
CURLM_LAST | |||
} CURLMcode; | |||
/* just to make code nicer when using curl_multi_socket() you can now check | |||
for CURLM_CALL_MULTI_SOCKET too in the same style it works for | |||
curl_multi_perform() and CURLM_CALL_MULTI_PERFORM */ | |||
#define CURLM_CALL_MULTI_SOCKET CURLM_CALL_MULTI_PERFORM | |||
/* bitmask bits for CURLMOPT_PIPELINING */ | |||
#define CURLPIPE_NOTHING 0L | |||
#define CURLPIPE_HTTP1 1L | |||
#define CURLPIPE_MULTIPLEX 2L | |||
typedef enum { | |||
CURLMSG_NONE, /* first, not used */ | |||
CURLMSG_DONE, /* This easy handle has completed. 'result' contains | |||
the CURLcode of the transfer */ | |||
CURLMSG_LAST /* last, not used */ | |||
} CURLMSG; | |||
struct CURLMsg { | |||
CURLMSG msg; /* what this message means */ | |||
CURL *easy_handle; /* the handle it concerns */ | |||
union { | |||
void *whatever; /* message-specific data */ | |||
CURLcode result; /* return code for transfer */ | |||
} data; | |||
}; | |||
typedef struct CURLMsg CURLMsg; | |||
/* Based on poll(2) structure and values. | |||
* We don't use pollfd and POLL* constants explicitly | |||
* to cover platforms without poll(). */ | |||
#define CURL_WAIT_POLLIN 0x0001 | |||
#define CURL_WAIT_POLLPRI 0x0002 | |||
#define CURL_WAIT_POLLOUT 0x0004 | |||
struct curl_waitfd { | |||
curl_socket_t fd; | |||
short events; | |||
short revents; /* not supported yet */ | |||
}; | |||