Files
fstester/setter/src/os2/os2defs.h

89 lines
2.5 KiB
C
Raw Normal View History

/****************************************************************************
2020-03-01 16:56:27 +00:00
Aaru Data Preservation Suite
-----------------------------------------------------------------------------
2021-03-14 19:14:41 +00:00
Author(s) : Natalia Portillo
--[ License ] ---------------------------------------------------------------
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
2021-03-09 04:42:30 +00:00
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-----------------------------------------------------------------------------
2020-12-31 23:13:50 +00:00
Copyright (C) 2011-2021 Natalia Portillo
*****************************************************************************/
2021-03-14 19:18:18 +00:00
#ifndef AARU_FSTESTER_SETTER_SRC_OS2_H
#define AARU_FSTESTER_SETTER_SRC_OS2_H
2021-03-11 23:57:11 +00:00
#include <os2.h>
#if(defined(__I86__) || defined(__i86__) || defined(_M_I86)) // 16 bit
#ifndef APIRET
#define APIRET USHORT
#endif
#define ACTION_RET USHORT
#else // 32 bit
#define ACTION_RET ULONG
2021-03-11 23:57:11 +00:00
#endif
/* Information level types (defins method of query) */
2021-03-12 01:00:33 +00:00
#ifndef FSAIL_QUERYNAME
#define FSAIL_QUERYNAME 1 /* Return data for a Drive or Device */
2021-03-12 01:00:33 +00:00
#endif
#ifndef FSAIL_DEVNUMBER
#define FSAIL_DEVNUMBER 2 /* Return data for Ordinal Device # */
2021-03-12 01:00:33 +00:00
#endif
#ifndef FSAIL_DRVNUMBER
#define FSAIL_DRVNUMBER 3 /* Return data for Ordinal Drive # */
2021-03-12 01:00:33 +00:00
#endif
/* Item types (from data structure item "iType") */
2021-03-12 01:00:33 +00:00
#ifndef FSAT_CHARDEV
#define FSAT_CHARDEV 1 /* Resident character device */
#endif
2021-03-12 01:00:33 +00:00
#ifndef FSAT_PSEUDODEV
#define FSAT_PSEUDODEV 2 /* Pseudo-character device */
#endif
2021-03-12 01:00:33 +00:00
#ifndef FSAT_LOCALDRV
#define FSAT_LOCALDRV 3 /* Local drive */
#endif
2021-03-12 01:00:33 +00:00
#ifndef FSAT_REMOTEDRV
#define FSAT_REMOTEDRV 4 /* Remote drive attached to FSD */
#endif
2021-03-11 23:57:11 +00:00
#if(defined(__I86__) || defined(__i86__) || defined(_M_I86)) // 16 bit
#define __os2_chdir(path) DosChDir(path, 0)
#define __os2_mkdir(path) DosMkDir(path, 0)
#define __os2_delete(path) DosDelete(path, 0)
2021-03-11 23:57:11 +00:00
#else // 32 bit
#define __os2_chdir(path) DosSetCurrentDir(path)
#define __os2_mkdir(path) DosCreateDir(path, NULL)
2021-03-14 18:50:14 +00:00
#define __os2_delete(path) DosDelete(path)
2021-03-11 23:57:11 +00:00
#endif
#endif