1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 #ifndef _dosmsc_hxx 29 #define _dosmsc_hxx 30 31 #include <string.h> 32 33 #ifndef ICC 34 #include <io.h> 35 #endif 36 #include <sys\types.h> 37 #include <sys\stat.h> 38 #include <direct.h> 39 40 #include <tools/svwin.h> 41 #ifdef _MSC_VER 42 #pragma warning (push,1) 43 #endif 44 #include <winbase.h> 45 #ifdef _MSC_VER 46 #pragma warning (pop) 47 #endif 48 #include <tools/solar.h> 49 50 #include <tools/string.hxx> 51 52 //-------------------------------------------------------------------- 53 54 #define FSYS_UNIX sal_False 55 56 #define DOS_DIRECT _A_SUBDIR 57 #define DOS_VOLUMEID 0x08 58 #ifndef S_IFBLK 59 #define S_IFBLK 0x6000 60 #endif 61 #define setdrive(n,a) _chdrive(n) 62 #define GETDRIVE(n) (n = _getdrive()) 63 64 #define dirent _WIN32_FIND_DATAA 65 #define d_name cFileName 66 #define d_type dwFileAttributes 67 68 #if defined (TCPP) || defined (tcpp) 69 #define _mkdir mkdir 70 #define _rmdir rmdir 71 #define _chdir chdir 72 #define _unlink unlink 73 #define _getcwd getcwd 74 #define _access access 75 #endif 76 77 typedef struct 78 { 79 _WIN32_FIND_DATAA aDirEnt; 80 HANDLE h; 81 const char *p; 82 } DIR; 83 84 #define PATHDELIMITER ";" 85 #define DEFSTYLE FSYS_STYLE_NTFS 86 #define MKDIR( p ) mkdir( p ) 87 #define CMP_LOWER(s) ( ByteString(s).ToLowerAscii() ) 88 89 #define START_DRV 'a' 90 91 inline sal_Bool DRIVE_EXISTS(char c) 92 { 93 ByteString aDriveRoot( c ); 94 aDriveRoot += ":\\"; 95 return GetDriveType( aDriveRoot.GetBuffer() ) > 1; 96 } 97 98 const char* TempDirImpl( char *pBuf ); 99 100 #define FSysFailOnErrorImpl() 101 102 #endif 103