OSDN Git Service

parted: Integrate into Android build system
[android-x86/external-parted.git] / include / config.h
1 #ifndef _CONFIG_H_
2 #define _CONFIG_H_
3
4 /* hand-crafted config.h for Android builds */
5
6 #define HAVE_TIME_H
7 #define HAVE_SYS_STAT_H
8 #define HAVE_GETTIMEOFDAY
9 #define HAVE_STDARG_H
10 #define __timespec_defined
11 #define HAVE_ERRNO_H
12 #define HAVE_STRING_H
13 #define HAVE_LIMITS_H
14 #define HAVE_GETOPT_H
15 #define HAVE_FCNTL_H
16 #define HAVE_STDIO_H
17 #define HAVE_STDLIB_H
18 #define HAVE_CTYPE_H
19 #define HAVE_LOCALE_H
20 #define HAVE_FCNTL_H
21 #define HAVE_WCHAR_H
22 #define HAVE_DECL_STRERROR_R 1
23 #define HAVE_DECL___FPENDING 0
24
25 #define SIZEOF_OFF_T 4
26
27 #define linux
28
29 #define S_IREAD     S_IRUSR
30 #define S_IWRITE    S_IWUSR
31 #define S_IEXEC     S_IXUSR
32
33 #ifdef HAVE_LITTLE_ENDIAN
34 #define WORDS_LITTLEENDIAN 1
35 #else
36 #define WORDS_BIGENDIAN 1
37 #endif
38
39 #include <stdio.h>
40 #include <wchar.h>
41
42 #define _GL_UNUSED              __attribute__((__unused__))
43 #define _GL_ATTRIBUTE_CONST     __attribute__((__const__))
44 #define _GL_ATTRIBUTE_PURE      __attribute__((__pure__))
45 #define restrict __restrict
46 #define _Noreturn               __attribute__((__noreturn__))
47 #define PACKAGE_URL "http://www.gnu.org/software/parted/"
48 #define PACKAGE_STRING "GNU parted 3.1"
49 #define PACKAGE_NAME "GNU parted"
50 #define PACKAGE_BUGREPORT "bug-parted@gnu.org"
51 #define PACKAGE "parted"
52 #define VERSION "3.1-android"
53
54 #define PENDING_OUTPUT_N_BYTES fp->_p - fp->_bf._base
55
56 /* Missing from BIONIC, unfortunately */
57 static inline int mbtowc(wchar_t *pwc, const char *s, size_t n)
58 {
59         printf("mbtowc STUB!\n");
60         return -1;
61 }
62
63 static inline int wctomb(char *s, wchar_t wc)
64 {
65         printf("wctomb STUB!\n");
66         return -1;
67 }
68
69 #undef stpcpy
70 #define stpcpy(a, b) my_stpcpy (a, b)
71 static inline char *
72 my_stpcpy (char *dest, const char *src)
73 {
74         char *d = dest;
75         const char *s = src;
76         do *d++ = *s; while (*s++ != '\0');
77         return d - 1;
78 }
79
80 static inline int posix_memalign(void **memptr, size_t alignment, size_t size)
81 {
82         *memptr = memalign(alignment, size);
83         return *memptr == NULL;
84 }
85 #define llseek lseek64
86 #define getwd(buf) getcwd(buf, PATH_MAX)
87
88 /* scsi.h junk */
89 #define INQUIRY                 0x12
90 #define SCSI_IOCTL_GET_IDLUN    0x5382
91
92 #endif // _CONFIG_H_