24#ifndef __WINE_CONFIG_H
25# error You must include config.h to use this header
39#ifdef HAVE_SYS_SYSCTL_H
40# include <sys/sysctl.h>
47# define mkdir(path,mode) mkdir(path)
49# define S_ISREG(mod) (((mod) & _S_IFMT) == _S_IFREG)
53# define pclose _pclose
54# define strtoll _strtoi64
55# define strtoull _strtoui64
56# define strncasecmp _strnicmp
57# define strcasecmp _stricmp
61#define ARRAYSIZE(x) (sizeof(x) / sizeof((x)[0]))
75# if defined(__x86_64__) || defined(__aarch64__) || defined(__powerpc64__)
78# define __int64 long long
83#if !defined(__GNUC__) && !defined(__attribute__)
84#define __attribute__(x)
88#define max(a,b) (((a) > (b)) ? (a) : (b))
91#define min(a,b) (((a) < (b)) ? (a) : (b))
95#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
165 if (
n == -1)
size *= 2;
188 else array->size = 16;
266 int (*
func)(
const char **,
const char **) )
278 for (
i = 0;
i <
args.count;
i++)
333 return strmake(
"%.*s%s", name_len,
name, new_ext );
341 unsigned int dotdots = 0;
395#if defined(__REACTOS__) && defined(_WIN32)
403 fprintf(
stderr,
"failed to create directory for temp files\n" );
409 static unsigned int value;
414 if (!suffix) suffix =
"";
424#ifdef HAVE_SIGPROCMASK
425 sigset_t mask_set, old_set;
427 sigemptyset( &mask_set );
428 sigaddset( &mask_set,
SIGHUP );
429 sigaddset( &mask_set,
SIGTERM );
430 sigaddset( &mask_set,
SIGINT );
431 sigprocmask( SIG_BLOCK, &mask_set, &old_set );
433 sigprocmask( SIG_SETMASK, &old_set,
NULL );
492#elif defined(__x86_64__)
494#elif defined(__arm__)
496#elif defined(__aarch64__)
499#error Unsupported CPU
504#elif defined(__ANDROID__)
506#elif defined(__linux__)
508#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
512#elif defined(__CYGWIN__)
526 static const unsigned int sizes[] =
618 static const char *cpu_names[] =
659 else if (!
strcmp( spec,
"mingw32" ))
710#if defined(__linux__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) \
711 || defined(__CYGWIN__) || defined(__MSYS__)
712 dir = realpath(
"/proc/self/exe",
NULL );
713#elif defined (__FreeBSD__) || defined(__DragonFly__)
714 static int pathname[] = { CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1 };
726 for (
p =
path; *
p;
p++)
if (*
p ==
'\\') *
p =
'/';
733static inline const char *get_libdir(
const char *
bindir )
743static inline const char *get_datadir(
const char *
bindir )
753static inline const char *get_includedir(
const char *
bindir )
768 const char *datadir = get_datadir(
bindir );
769 if (datadir)
return strmake(
"%s/wine/nls", datadir );
867 const struct long_option *long_opts,
int long_only,
875#define OPT_ERR(fmt) { callback( '?', strmake( fmt, argv[i] )); continue; }
899 for (opt = long_opts; opt && opt->
name; opt++)
930 if (
i ==
argc - 1)
OPT_ERR(
"option '%s' requires an argument" );
939 OPT_ERR(
"unrecognized option '%s'" );
952 if (
i ==
argc - 1)
OPT_ERR(
"option '%s' requires an argument" );
int strcmp(const char *String1, const char *String2)
ACPI_SIZE strlen(const char *String)
int strncmp(const char *String1, const char *String2, ACPI_SIZE Count)
char * strtok(char *String, const char *Delimiters)
char * strchr(const char *String, int ch)
char * strpbrk(const char *String, const char *Delimiters)
void __cdecl qsort(_Inout_updates_bytes_(_NumOfElements *_SizeOfElements) void *_Base, _In_ size_t _NumOfElements, _In_ size_t _SizeOfElements, _In_ int(__cdecl *_PtFuncCompare)(const void *, const void *))
static const WCHAR *const ext[]
static void cleanup(void)
DWORD WINAPI GetModuleFileNameA(HINSTANCE hModule, LPSTR lpFilename, DWORD nSize)
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
int align(int length, int align)
GLuint GLuint GLsizei count
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLenum GLuint GLenum GLsizei const GLchar * buf
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean flag
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
_CRTIMP void __cdecl perror(_In_opt_z_ const char *_ErrMsg)
_Check_return_opt_ _CRTIMP int __cdecl fprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format,...)
#define memcpy(s1, s2, n)
static IPrintDialogCallback callback
static const struct @594 sizes[]
_CRTIMP intptr_t __cdecl _spawnvp(_In_ int _Mode, _In_z_ const char *_Filename, _In_z_ const char *const *_ArgList)
_Check_return_ char *__cdecl getenv(_In_z_ const char *_VarName)
_CRT_RESTORE_GCC_WARNINGS _CRT_DISABLE_GCC_WARNINGS _Check_return_ _CRTIMP _CONST_RETURN char *__cdecl strrchr(_In_z_ const char *_Str, _In_ int _Ch)
static char tmpdir[MAX_PATH]
static char argv0[MAX_PATH]
enum target::@5353 platform
Character const *const prefix
static const char * bindir
_In_ ULONG_PTR _In_ ULONG _Out_ ULONG_PTR * pid
void int int ULONGLONG int va_list * ap