2
* Copyright (c) 2003-2007 Tim Kientzle
5
* Redistribution and use in source and binary forms, with or without
6
* modification, are permitted provided that the following conditions
8
* 1. Redistributions of source code must retain the above copyright
9
* notice, this list of conditions and the following disclaimer.
10
* 2. Redistributions in binary form must reproduce the above copyright
11
* notice, this list of conditions and the following disclaimer in the
12
* documentation and/or other materials provided with the distribution.
14
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
15
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
16
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
17
* IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
18
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
21
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
#ifndef TREE_CONFIG_H_INCLUDED
28
#define TREE_CONFIG_H_INCLUDED
30
#if defined(PLATFORM_CONFIG_H)
32
* Use hand-built config.h in environments that need it.
34
#include PLATFORM_CONFIG_H
35
#elif defined(HAVE_CONFIG_H)
37
* Most POSIX platforms use the 'configure' script to build config.h
39
#include "../config.h"
40
#elif defined(__FreeBSD__)
42
* Built-in definitions for FreeBSD.
44
#define HAVE_DIRENT_D_NAMLEN 1
45
#define HAVE_DIRENT_H 1
46
#define HAVE_ERRNO_H 1
47
#define HAVE_FCNTL_H 1
48
#define HAVE_LIBARCHIVE 1
49
#define HAVE_STDLIB_H 1
50
#define HAVE_STRING_H 1
51
#define HAVE_SYS_STAT_H 1
52
#define HAVE_UNISTD_H 1
55
* Warn if there's no platform configuration.
57
#error Oops: No config.h and no built-in configuration in bsdtar_platform.h.
58
#endif /* !HAVE_CONFIG_H */
60
/* No non-FreeBSD platform will have __FBSDID, so just define it here. */
62
#include <sys/cdefs.h> /* For __FBSDID */
64
/* Just leaving this macro replacement empty leads to a dangling semicolon. */
65
#define __FBSDID(a) struct _undefined_hack
68
#ifdef HAVE_LIBARCHIVE
69
/* If we're using the platform libarchive, include system headers. */
71
#include <archive_entry.h>
73
/* Otherwise, include user headers. */
75
#include "archive_entry.h"
78
#endif /* !TREE_CONFIG_H_INCLUDED */