From 0c482696c99905449caad2ba165ee8ed450c1e22 Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Sun, 11 Apr 2021 00:24:47 +0100 Subject: [PATCH] Check if DOS attributes are defined already and define them again if not. --- setter/src/dos/attr.h | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/setter/src/dos/attr.h b/setter/src/dos/attr.h index c4b1244..5961746 100644 --- a/setter/src/dos/attr.h +++ b/setter/src/dos/attr.h @@ -27,12 +27,24 @@ Copyright (C) 2011-2021 Natalia Portillo #include -#if defined(__TURBOC__) -#define _A_NORMAL FA_NORMAL /* Normal file, no attributes */ -#define _A_RDONLY FA_RDONLY /* Read only attribute */ -#define _A_HIDDEN FA_HIDDEN /* Hidden file */ -#define _A_SYSTEM FA_SYSTEM /* System file */ -#define _A_ARCH FA_ARCH /* Archive */ +#ifndef _A_NORMAL +#define _A_NORMAL 0x00 /* Normal file, no attributes */ +#endif + +#ifndef _A_RDONLY +#define _A_RDONLY 0x01 /* Read only attribute */ +#endif + +#ifndef _A_HIDDEN +#define _A_HIDDEN 0x02 /* Hidden file */ +#endif + +#ifndef _A_SYSTEM +#define _A_SYSTEM 0x04 /* System file */ +#endif + +#ifndef _A_ARCH +#define _A_ARCH 0x20 /* Archive */ #endif typedef struct