1 /* 2 * Copyright (C) 2000-2001 the xine project 3 * 4 * This file is part of xine, a unix video player. 5 * 6 * xine is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or 9 * (at your option) any later version. 10 * 11 * xine is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with this program; if not, write to the Free Software Foundation, 18 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 * 20 * WIN32 PORT, 21 * by Matthew Grooms <elon@altavista.com> 22 * 23 * unistd.h - This is mostly a catch all header that maps standard unix 24 * libc calls to the equivelent win32 functions. 25 * 26 */ 27 28 #include <windows.h> 29 #include <malloc.h> 30 #include <errno.h> 31 #include <direct.h> 32 33 #include <config.h> 34 35 #ifndef _SYS_UNISTD_H_ 36 #define _SYS_UNISTD_H_ 37 38 #define inline __inline 39 40 #define mkdir( A, B ) _mkdir( A ) 41 #define lstat stat 42 43 #ifndef S_ISDIR 44 #define S_ISDIR(A) ( S_IFDIR & A ) 45 #endif 46 47 #define S_IXUSR S_IEXEC 48 #define S_IXGRP S_IEXEC 49 #define S_IXOTH S_IEXEC 50 51 #define M_PI 3.14159265358979323846 /* pi */ 52 53 #define bzero( A, B ) memset( A, 0, B ) 54 55 #ifndef strcasecmp 56 #define strcasecmp _stricmp 57 #endif 58 59 #ifndef strncasecmp 60 #define strncasecmp _strnicmp 61 #endif 62 63 #define snprintf _snprintf 64 #define vsnprintf _vsnprintf 65 66 // FIXME : I dont remember why this is here 67 #define readlink 68 69 #endif 70