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