2 * Copyright (c) 2003-2006 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 * in this position and unchanged.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
15 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
16 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 /* Start of configuration for native Win32 with Visual Studio. */
31 #undef HAVE_ACL_CREATE_ENTRY
33 #undef HAVE_ACL_SET_FD
34 #undef HAVE_ACL_SET_FD_NP
35 #undef HAVE_ACL_SET_FILE
39 #define HAVE_DECL_STRERROR_R 1
42 #define HAVE_ERRNO_H 1
47 #define HAVE_FCNTL_H 1
51 #undef HAVE_INTTYPES_H
55 #define HAVE_LIMITS_H 1
58 #define HAVE_MEMMOVE 1
59 #define HAVE_MEMORY_H 1
66 #define HAVE_STDLIB_H 1
69 #define HAVE_STRERROR 1
70 #undef HAVE_STRERROR_R
71 #define HAVE_STRINGS_H 1
72 #define HAVE_STRING_H 1
73 #define HAVE_STRRCHR 1
74 #undef HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC
75 #undef HAVE_STRUCT_STAT_ST_RDEV
77 #undef HAVE_SYS_IOCTL_H
78 #define HAVE_SYS_STAT_H 1
79 #undef HAVE_SYS_TIME_H
80 #define HAVE_SYS_TYPES_H 1
81 #undef HAVE_SYS_WAIT_H
84 #define HAVE_WCHAR_H 1
86 #define STDC_HEADERS 1
87 #define TIME_WITH_SYS_TIME 1
90 * TODO: libarchive relies heavily on having the file type
91 * encoded as part of the mode value. Windows kind-of, sort-of
92 * supports this, but the following needs to be carefully compared
93 * to Windows conventions and quite possibly changed extensively.
95 #define S_IFIFO 0010000 /* named pipe (fifo) */
96 //#define S_IFCHR 0020000 /* character special */
97 //#define S_IFDIR 0040000 /* directory */
98 #define S_IFBLK 0060000 /* block special */
99 //#define S_IFREG 0100000 /* regular */
100 #define S_IFLNK 0120000 /* symbolic link */
101 #define S_IFSOCK 0140000 /* socket */
102 #define S_ISVTX 0001000 /* save swapped text even after use */
109 #define S_ISDIR(m) (((m) & 0170000) == S_IFDIR) /* directory */
110 #define S_ISCHR(m) (((m) & 0170000) == S_IFCHR) /* char special */
111 #define S_ISBLK(m) (((m) & 0170000) == S_IFBLK) /* block special */
112 #define S_ISREG(m) (((m) & 0170000) == S_IFREG) /* regular file */
113 #define S_ISFIFO(m) (((m) & 0170000) == S_IFIFO) /* fifo or socket */
114 #define S_ISLNK(m) (((m) & 0170000) == S_IFLNK) /* symbolic link */
115 #define S_ISSOCK(m) (((m) & 0170000) == S_IFSOCK) /* socket */
117 /* Basic definitions for system and integer types. */
121 typedef unsigned short mode_t;
122 typedef unsigned _int64 uint64_t;
123 typedef unsigned _int16 uint16_t;
124 typedef uint64_t uintmax_t;
125 typedef _int64 intmax_t;
127 /* Replacement for major/minor/makedev. */
128 #define major(x) ((int)(0x00ff & ((x) >> 8)))
129 #define minor(x) ((int)(0xffff00ff & (x)))
130 #define makedev(maj,min) ((0xff00 & ((maj)<<8))|(0xffff00ff & (min)))
134 #define STDERR_FILENO 2
136 /* Alias the Windows _function to the POSIX equivalent. */
146 #define PACKAGE_NAME "libarchive"
147 #define PACKAGE_VERSION "2.0experimental"
149 /* TODO: Fix the code, don't suppress the warnings. */
150 #pragma warning(disable:4996)
151 #pragma warning(disable:4244)
152 #pragma warning(disable:4305)
153 #pragma warning(disable:4267)
155 /* End of Win32/Visual Studio definitions. */