1999-11-13 23:23:35 +01:00
|
|
|
/*
|
|
|
|
* Wine porting definitions
|
|
|
|
*
|
2002-03-10 00:29:33 +01:00
|
|
|
* Copyright 1996 Alexandre Julliard
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
2006-05-18 14:49:52 +02:00
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
1999-11-13 23:23:35 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __WINE_WINE_PORT_H
|
|
|
|
#define __WINE_WINE_PORT_H
|
|
|
|
|
2002-04-26 21:05:15 +02:00
|
|
|
#ifndef __WINE_CONFIG_H
|
|
|
|
# error You must include config.h to use this header
|
|
|
|
#endif
|
2001-07-26 23:43:29 +02:00
|
|
|
|
2007-05-22 18:12:05 +02:00
|
|
|
#ifdef __WINE_BASETSD_H
|
|
|
|
# error You must include port.h before all other headers
|
|
|
|
#endif
|
|
|
|
|
2021-11-03 10:43:50 +01:00
|
|
|
#ifdef WINE_UNIX_LIB
|
|
|
|
# error port.h should not be used in Unix libraries
|
|
|
|
#endif
|
|
|
|
|
1999-11-13 23:23:35 +01:00
|
|
|
#include <sys/types.h>
|
|
|
|
|
|
|
|
|
2019-03-13 17:05:06 +01:00
|
|
|
/****************************************************************
|
|
|
|
* Hard-coded values for the Windows platform
|
|
|
|
*/
|
|
|
|
|
2021-10-14 11:07:56 +02:00
|
|
|
#ifdef _WIN32
|
2019-03-13 17:05:06 +01:00
|
|
|
|
2021-10-06 10:17:54 +02:00
|
|
|
#include <errno.h>
|
2019-03-13 17:05:06 +01:00
|
|
|
|
2021-10-11 11:25:10 +02:00
|
|
|
#define dlopen(name,flags) NULL
|
|
|
|
#define dlsym(handle,name) NULL
|
2020-04-06 11:43:55 +02:00
|
|
|
static inline int dlclose(void *handle) { return 0; }
|
|
|
|
static inline const char *dlerror(void) { return "No dlopen support on Windows"; }
|
2021-10-06 10:17:54 +02:00
|
|
|
static inline int symlink(const char *from, const char *to) { errno = ENOSYS; return -1; }
|
2020-04-06 11:43:55 +02:00
|
|
|
|
2019-03-13 17:12:36 +01:00
|
|
|
#ifdef _MSC_VER
|
2019-11-17 13:43:14 +01:00
|
|
|
/* The UCRT headers in the Windows SDK #error out if we #define snprintf.
|
|
|
|
* The C headers that came with previous Visual Studio versions do not have
|
|
|
|
* snprintf. Check for VS 2015, which appears to be the first version to
|
|
|
|
* use the UCRT headers by default. */
|
|
|
|
#if _MSC_VER < 1900
|
|
|
|
# define snprintf _snprintf
|
|
|
|
#endif
|
2007-02-02 15:35:15 +01:00
|
|
|
#endif
|
|
|
|
|
2021-10-11 11:25:10 +02:00
|
|
|
#else
|
2002-04-26 21:05:15 +02:00
|
|
|
|
|
|
|
#include <dlfcn.h>
|
2021-10-11 11:25:10 +02:00
|
|
|
|
|
|
|
#endif /* _WIN32 */
|
2002-04-26 21:05:15 +02:00
|
|
|
|
1999-11-13 23:23:35 +01:00
|
|
|
#endif /* !defined(__WINE_WINE_PORT_H) */
|