| /************************************************************** |
| * |
| * Licensed to the Apache Software Foundation (ASF) under one |
| * or more contributor license agreements. See the NOTICE file |
| * distributed with this work for additional information |
| * regarding copyright ownership. The ASF licenses this file |
| * to you under the Apache License, Version 2.0 (the |
| * "License"); you may not use this file except in compliance |
| * with the License. You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, |
| * software distributed under the License is distributed on an |
| * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| * KIND, either express or implied. See the License for the |
| * specific language governing permissions and limitations |
| * under the License. |
| * |
| *************************************************************/ |
| |
| |
| |
| #ifndef _dosmsc_hxx |
| #define _dosmsc_hxx |
| |
| #include <string.h> |
| |
| #ifndef ICC |
| #include <io.h> |
| #endif |
| #include <sys\types.h> |
| #include <sys\stat.h> |
| #include <direct.h> |
| |
| #include <tools/svwin.h> |
| #ifdef _MSC_VER |
| #pragma warning (push,1) |
| #endif |
| #include <winbase.h> |
| #ifdef _MSC_VER |
| #pragma warning (pop) |
| #endif |
| #include <tools/solar.h> |
| |
| #include <tools/string.hxx> |
| |
| //-------------------------------------------------------------------- |
| |
| #define FSYS_UNIX sal_False |
| |
| #define DOS_DIRECT _A_SUBDIR |
| #define DOS_VOLUMEID 0x08 |
| #ifndef S_IFBLK |
| #define S_IFBLK 0x6000 |
| #endif |
| #define setdrive(n,a) _chdrive(n) |
| #define GETDRIVE(n) (n = _getdrive()) |
| |
| #define dirent _WIN32_FIND_DATAA |
| #define d_name cFileName |
| #define d_type dwFileAttributes |
| |
| #if defined (TCPP) || defined (tcpp) |
| #define _mkdir mkdir |
| #define _rmdir rmdir |
| #define _chdir chdir |
| #define _unlink unlink |
| #define _getcwd getcwd |
| #define _access access |
| #endif |
| |
| typedef struct |
| { |
| _WIN32_FIND_DATAA aDirEnt; |
| HANDLE h; |
| const char *p; |
| } DIR; |
| |
| #define PATHDELIMITER ";" |
| #define DEFSTYLE FSYS_STYLE_NTFS |
| #define MKDIR( p ) mkdir( p ) |
| #define CMP_LOWER(s) ( ByteString(s).ToLowerAscii() ) |
| |
| #define START_DRV 'a' |
| |
| inline sal_Bool DRIVE_EXISTS(char c) |
| { |
| ByteString aDriveRoot( c ); |
| aDriveRoot += ":\\"; |
| return GetDriveType( aDriveRoot.GetBuffer() ) > 1; |
| } |
| |
| const char* TempDirImpl( char *pBuf ); |
| |
| #define FSysFailOnErrorImpl() |
| |
| #endif |