This commit is contained in:
vscosta 2014-10-30 07:46:17 +00:00
parent 93bad76d18
commit 091f9dda33
5 changed files with 17 additions and 12 deletions

View File

@ -4,16 +4,14 @@
#define PL_INCL_H 1
#ifndef __WINDOWS__
#if defined(_MSC_VER) || defined(__MINGW32__)
#if defined(_MSC_VER) || defined(__MINGW32__) || defined(__MSYS__)
#define __WINDOWS__ 1
#endif
#endif
#ifdef __WINDOWS__
#if HAVE_WINSOCK2_H
#include <winsock2.h>
#endif
#include <winsock2.h>
#include <windows.h>
#if HAVE_XOS_H

View File

@ -888,8 +888,6 @@ PL_EXPORT(void) PL_YAP_InitSWIIO(struct SWI_IO *swio);
#endif /* _FLI_H_INCLUDED */
#ifdef _WIN32
#if O_PLMT
#ifdef __WINDOWS__
X_API int PL_w32thread_raise(DWORD id, int sig);
#endif
#endif

View File

@ -46,11 +46,12 @@
#include <wchar.h>
#include <stddef.h>
#ifdef __WINDOWS__
#include <stdint.h>
#ifndef INT64_T_DEFINED
#define INT64_T_DEFINED 1
typedef __int64 int64_t;
typedef unsigned __int64 uint64_t;
#if (_MSC_VER < 1300) && !defined(__MINGW32__)
#if (_MSC_VER < 1300)
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef intptr_t ssize_t; /* signed version of size_t */

View File

@ -22,6 +22,7 @@
*/
#if defined(__WINDOWS__) || defined(__MINGW32__)
#include <stdint.h>
#include "windows/uxnt.h"
#ifdef _YAP_NOT_INSTALLED_
#include <config.h>

View File

@ -36,8 +36,10 @@
#include <sys/stat.h>
#include <stdio.h>
#include <io.h>
#if HAVE_DIRECT_H
#include <direct.h>
#if !defined(__MINGW32__)
#endif
#if !defined(__MINGW32__) && !defined(__MSYS__)
#if (_MSC_VER < 1300)
typedef long intptr_t;
typedef unsigned long uintptr_t;
@ -81,13 +83,13 @@ typedef intptr_t ssize_t; /* signed version of size_t */
#define chdir _xos_chdir
#define mkdir _xos_mkdir
#define rmdir _xos_rmdir
#define getcwd _xos_getcwd
#define getcwd _xos_getcwd_i
#define setenv _xos_setenv
#define fopen(p, m) _xos_fopen(p, m)
#endif /*_UXNT_KERNEL*/
#ifndef __MINGW32__
#if !defined(__MINGW32__) && !defined(__MSYS__)
#define F_OK 00
#define R_OK 04 /* access() fields */
#define W_OK 06
@ -101,6 +103,10 @@ typedef intptr_t ssize_t; /* signed version of size_t */
#define PATH_MAX 1024
#endif
#if __MSYS__
#define _stati64 stat
#endif
#undef _xos_stat
_export char * _xos_home(void);
@ -130,7 +136,7 @@ _export ssize_t _xos_write(int handle, const void *buf, size_t size);
_export long _xos_lseek(int handle, long offset, int whence);
_export long _xos_tell(int handle);
_export int _xos_access(const char *path, int mode);
_export int _xos_chmod(const char *path, int mode);
_export int _xos_chmod(const char *path, mode_t mode);
_export int _xos_remove(const char *path);
_export int _xos_rename(const char *old, const char *newname);
_export int _xos_stat(const char *path, struct _stati64 *sbuf);
@ -138,6 +144,7 @@ _export int _xos_chdir(const char *path);
_export int _xos_mkdir(const char *path, int mode);
_export int _xos_rmdir(const char *path);
_export char * _xos_getcwd(char *buf, size_t len);
_export char * _xos_getcwd_i(char *buf, int len);
_export int _xos_errno(void);
_export int _xos_exists(const char *path, int flags);
_export size_t _xos_getenv(const char *name, char *buf, size_t buflen);