1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 3 * 4 * Copyright (c) 2009 Michihiro NAKAJIMA 5 * All rights reserved. 6 */ 7 8 #ifndef BSDTAR_WINDOWS_H 9 #define BSDTAR_WINDOWS_H 1 10 #include <direct.h> 11 #include <windows.h> 12 #include <io.h> 13 #include <fcntl.h> 14 15 #ifndef PRId64 16 #define PRId64 "I64" 17 #endif 18 #define geteuid() 0 19 20 #ifndef __WATCOMC__ 21 22 #ifndef S_IFIFO 23 #define S_IFIFO 0010000 /* pipe */ 24 #endif 25 26 #include <string.h> /* Must include before redefining 'strdup' */ 27 #if !defined(__BORLANDC__) 28 #define strdup _strdup 29 #endif 30 #if !defined(__BORLANDC__) 31 #define getcwd _getcwd 32 #endif 33 34 #define chdir __tar_chdir 35 int __tar_chdir(const char *); 36 37 #ifndef S_ISREG 38 #define S_ISREG(a) (a & _S_IFREG) 39 #endif 40 #ifndef S_ISBLK 41 #define S_ISBLK(a) (0) 42 #endif 43 44 #endif 45 46 #endif /* BSDTAR_WINDOWS_H */ 47