From: <to...@us...> - 2004-01-20 17:08:52
|
Update of /cvsroot/ro-oslib/OSLib/!OsLib/Tools/oslib In directory sc8-pr-cvs1:/tmp/cvs-serv10228/OSLib/!OsLib/Tools/oslib Modified Files: Tag: unix-build fileswitch.h os.h osargs.h osfind.h osgbpb.h types.h Added Files: Tag: unix-build fileswch32.h osargs32.h oscore32.h osf32.h osfind32.h osgbpb32.h Log Message: Unix Build --- NEW FILE: fileswch32.h --- /* fileswch32.h ** Used by FileSwitch.h to create the short synonyms for 32-bit file handles ** ** Tony van der Hoff 10-11-01 */ #if !defined fileswch32_H #define fileswch32_H #if !defined osf32_H #include "osf32.h" #endif #if !defined OSLIB_F8 #define bgetv bgetvw #define bputv bputvw #define os_bget os_bgetw #define os_bput os_bputw #define xbgetv xbgetvw #define xbputv xbputvw #define xos_bget xos_bgetw #define xos_bput xos_bputw #endif #endif /* End */ --- NEW FILE: osargs32.h --- /* osargs32.h ** Used by osargs.h to create the short synonyms for 32-bit file handles ** ** Tony van der Hoff 10-11-01 */ #if !defined osargs32_H #define osargs32_H #if !defined osf32_H #include "osf32.h" #endif #if !defined OSLIB_F8 #define osargs_ensure osargs_ensurew #define osargs_image_stamped osargs_image_stampedw #define osargs_read_allocation osargs_read_allocationw #define osargs_read_eof_status osargs_read_eof_statusw #define osargs_read_ext osargs_read_extw #define osargs_read_info osargs_read_infow #define osargs_read_path osargs_read_pathw #define osargs_read_ptr osargs_read_ptrw #define osargs_set_allocation osargs_set_allocationw #define osargs_set_ext osargs_set_extw #define osargs_set_ptr osargs_set_ptrw #define xosargs_ensure xosargs_ensurew #define xosargs_image_stamped xosargs_image_stampedw #define xosargs_read_allocation xosargs_read_allocationw #define xosargs_read_eof_status xosargs_read_eof_statusw #define xosargs_read_ext xosargs_read_extw #define xosargs_read_info xosargs_read_infow #define xosargs_read_path xosargs_read_pathw #define xosargs_read_ptr xosargs_read_ptrw #define xosargs_set_allocation xosargs_set_allocationw #define xosargs_set_ext xosargs_set_extw #define xosargs_set_ptr xosargs_set_ptrw #endif #endif /* End */ --- NEW FILE: oscore32.h --- /* oscore32.h ** Used by oscore.h to create the short synonyms for 32-bit file handles ** ** Tony van der Hoff 10-11-01 */ #if !defined oscore32_H #define oscore32_H #if !defined osf32_H #include "osf32.h" #endif #if !defined OSLIB_F8 #define os_change_redirection os_change_redirectionw #endif #endif /* End */ --- NEW FILE: osf32.h --- /* osf32.h ** creates a short-form synonym for OS_FW ** ** Tony van der Hoff 10-11-01 */ #if !defined osf32_H #define osf32_H #undef os_f #if !defined OSLIB_F8 #define os_f os_fw #endif #endif /* End */ --- NEW FILE: osfind32.h --- /* osfind32.h ** Used by osfind.h to create the short synonyms for 32-bit file handles ** ** Tony van der Hoff 10-11-01 */ #if !defined osfind32_H #define osfind32_H #if !defined osf32_H #include "osf32.h" #endif #if !defined OSLIB_F8 #define osfind_close osfind_closew #define osfind_openin osfind_openinw #define osfind_openout osfind_openoutw #define osfind_openup osfind_openupw #define upcallfind_close upcallfind_closew #define upcallfind_create_openup upcallfind_create_openupw #define upcallfind_openup upcallfind_openupw #define xosfind_close xosfind_closew #define xosfind_openin xosfind_openinw #define xosfind_openout xosfind_openoutw #define xosfind_openup xosfind_openupw #define xupcallfind_close xupcallfind_closew #define xupcallfind_create_openup xupcallfind_create_openupw #define xupcallfind_openup xupcallfind_openupw #endif #endif /* End */ --- NEW FILE: osgbpb32.h --- /* osgbpb32.h ** Used by osgbpb.h to create the short synonyms for 32-bit file handles ** ** Tony van der Hoff 10-11-01 */ #if !defined osgbpb32_H #define osgbpb32_H #if !defined osf32_H #include "osf32.h" #endif #if !defined OSLIB_F8 #define osgbpb_read osgbpb_readw #define osgbpb_read_at osgbpb_read_atw #define osgbpb_write osgbpb_writew #define osgbpb_write_at osgbpb_write_atw #define xosgbpb_read xosgbpb_readw #define xosgbpb_read_at xosgbpb_read_atw #define xosgbpb_write xosgbpb_writew #define xosgbpb_write_at xosgbpb_write_atw #endif #endif /* End */ Index: fileswitch.h =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/Tools/oslib/Attic/fileswitch.h,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** fileswitch.h 14 Jan 2004 13:33:16 -0000 1.1.2.1 --- fileswitch.h 20 Jan 2004 17:08:48 -0000 1.1.2.2 *************** *** 239,242 **** --- 239,244 ---- /*...: is a read only filing system*/ + #ifndef EXECUTE_ON_UNIX + #define xos_bget(file, c, psr) \ _swix (OS_BGet, _IN (1) | _OUT (0) | _OUT (_FLAGS), file, c, psr) *************** *** 244,247 **** --- 246,254 ---- #define xos_bput(c, file) \ _swix (OS_BPut, _IN (0) | _IN (1), c, file) + #endif /* EXECUTE_ON_UNIX */ + + #ifndef fileswch32_H + #include "oslib/fileswch32.h" + #endif #endif Index: os.h =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/Tools/oslib/Attic/os.h,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** os.h 14 Jan 2004 13:33:16 -0000 1.1.2.1 --- os.h 20 Jan 2004 17:08:48 -0000 1.1.2.2 *************** *** 5820,5822 **** --- 5820,5826 ---- #endif /* EXECUTE_ON_UNIX */ + #ifndef oscore32_H + #include "oslib/oscore32.h" + #endif + #endif Index: osargs.h =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/Tools/oslib/Attic/osargs.h,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** osargs.h 14 Jan 2004 13:33:16 -0000 1.1.2.1 --- osargs.h 20 Jan 2004 17:08:48 -0000 1.1.2.2 *************** *** 514,516 **** --- 514,520 ---- #endif /* EXECUTE_ON_UNIX */ + #ifndef osargs32_H + #include "oslib/osargs32.h" + #endif + #endif Index: osfind.h =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/Tools/oslib/Attic/osfind.h,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** osfind.h 14 Jan 2004 13:33:16 -0000 1.1.2.1 --- osfind.h 20 Jan 2004 17:08:48 -0000 1.1.2.2 *************** *** 393,395 **** --- 393,399 ---- #endif /* EXECUTE_ON_UNIX */ + #ifndef osfind32_H + #include "oslib/osfind32.h" + #endif + #endif Index: osgbpb.h =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/Tools/oslib/Attic/osgbpb.h,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** osgbpb.h 14 Jan 2004 13:33:16 -0000 1.1.2.1 --- osgbpb.h 20 Jan 2004 17:08:48 -0000 1.1.2.2 *************** *** 47,64 **** #define OSGBPB_DirEntriesFullInfo 0xC ! typedef struct osgbpb_name osgbpb_name; ! typedef struct osgbpb_disc_name osgbpb_disc_name; ! typedef struct osgbpb_dir_name osgbpb_dir_name; ! typedef struct osgbpb_name_list osgbpb_name_list; ! typedef struct osgbpb_info osgbpb_info; ! typedef struct osgbpb_info_base osgbpb_info_base; ! typedef struct osgbpb_brief_info osgbpb_brief_info; ! typedef struct osgbpb_internal_info osgbpb_internal_info; ! typedef struct osgbpb_full_info osgbpb_full_info; ! typedef struct osgbpb_string_list osgbpb_string_list; ! typedef struct osgbpb_brief_info_list osgbpb_brief_info_list; ! typedef struct osgbpb_internal_info_list osgbpb_internal_info_list; ! typedef struct osgbpb_full_info_list osgbpb_full_info_list; ! typedef struct osgbpb_info_list osgbpb_info_list; typedef struct osgbpb_system_info_list osgbpb_system_info_list; typedef struct osgbpb_system_info_list_base osgbpb_system_info_list_base; --- 47,64 ---- #define OSGBPB_DirEntriesFullInfo 0xC ! typedef struct osgbpb_name osgbpb_name; ! typedef struct osgbpb_disc_name osgbpb_disc_name; ! typedef struct osgbpb_dir_name osgbpb_dir_name; ! typedef struct osgbpb_name_list osgbpb_name_list; ! typedef struct osgbpb_info osgbpb_info; ! typedef struct osgbpb_info_base osgbpb_info_base; ! typedef struct osgbpb_brief_info osgbpb_brief_info; ! typedef struct osgbpb_internal_info osgbpb_internal_info; ! typedef struct osgbpb_full_info osgbpb_full_info; ! typedef struct osgbpb_string_list osgbpb_string_list; ! typedef struct osgbpb_brief_info_list osgbpb_brief_info_list; ! typedef struct osgbpb_internal_info_list osgbpb_internal_info_list; ! typedef struct osgbpb_full_info_list osgbpb_full_info_list; ! typedef struct osgbpb_info_list osgbpb_info_list; typedef struct osgbpb_system_info_list osgbpb_system_info_list; typedef struct osgbpb_system_info_list_base osgbpb_system_info_list_base; *************** *** 733,735 **** --- 733,739 ---- #endif /* EXECUTE_ON_UNIX */ + #ifndef osgbpb32_H + #include "oslib/osgbpb32.h" + #endif + #endif Index: types.h =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/Tools/oslib/Attic/types.h,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** types.h 14 Jan 2004 13:33:16 -0000 1.1.2.1 --- types.h 20 Jan 2004 17:08:48 -0000 1.1.2.2 *************** *** 2,6 **** #define types_H ! /*OSLib---efficient, type-safe, transparent, extensible,\n" register-safe A P I coverage of RISC O S*/ /*Copyright © 1994 Jonathan Coxhead*/ --- 2,6 ---- #define types_H ! /*OSLib---efficient, type-safe, transparent, extensible, register-safe A P I coverage of RISC O S*/ /*Copyright © 1994 Jonathan Coxhead*/ *************** *** 22,72 **** */ ! #include <kernel.h> ! typedef unsigned int bits, bytes; ! typedef int osbool; ! typedef unsigned char byte; ! #ifndef NULL ! #define NULL ((void *) 0) #endif ! #define FALSE ((osbool) 0) ! #define TRUE ((osbool) 1) ! #define NONE ((bits) 0) ! #define ALL (~(bits) 0) ! #define SKIP 0 ! /*may be used as a "don't care" value for |int|, |... *|, |bits| etc*/ ! #define SIG_LIMIT 11 /*largest signal number + 1*/ ! #ifndef EXECUTE_ON_UNIX ! #ifndef __swis_h ! #define _C (1U << 29) ! #define _Z (1U << 30) ! #define _N (1U << 31) #endif #endif ! #define UNKNOWN 1 ! /*may be used to declare arrays of unknown size*/ ! #define AS . #define ASREF -> ! /*may be used for components of a union*/ ! #define _ , ! /*may be used to separate arguments of a macro*/ ! /*These may be used to suppress compiler warnings*/ #define NOT_USED(x) {x = x;} ! #define UNSET(x) {(void) &x;} ! ! #ifdef __swi ! #undef __swi ! #define __swi(x) extern ! #endif #endif --- 22,144 ---- */ ! /******************** ! * Type definitions * ! ********************/ ! typedef unsigned int bits; ! typedef int osbool; ! typedef unsigned char byte; ! /* for backward compatibility with non C++ and pre-C99 code ! ** we can typedef |bool| as |osbool|. Anyone who wants to provide ! ** their own definition of |bool| can define BOOL_DEFINED prior to ! ** #includeing this header to prevent the typedef occurring. ! */ ! #if !defined BOOL_DEFINED ! /* C99 defines bool as a keyword */ ! #if defined __STDC_VERSION__ ! #if __STDC_VERSION__ >= 199901L ! #define BOOL_DEFINED ! #endif ! #endif #endif ! #if !defined BOOL_DEFINED ! /* <stdbool.h> defines bool */ ! #if defined __bool_true_false_are_defined ! #define BOOL_DEFINED ! #endif ! #endif ! /* C++ (1998) defines bool as a keyword; ! ** many implementations included it earlier, ! ** but there are some exceptions ! */ ! #if !defined BOOL_DEFINED && defined __cplusplus ! /* C++; Assume its's fully compliant */ ! #define BOOL_DEFINED ! /* CFront defines |__cplusplus| but not |bool| */ ! /* We assume that CFront is only ever used with Norcroft C */ ! /* any C99 version of Norcroft will have been trapped previously */ ! #if defined __CC_NORCROFT ! #undef BOOL_DEFINED ! #endif ! /* GNU C++ defines bool as a keyword only from V2.7 onwards */ ! #if defined __GNUG__ ! #if __GNUG__ < 2 || ( __GNUG__ == 2 && __GNUC_MINOR__ < 7 ) ! #undef BOOL_DEFINED ! #endif ! #endif ! /* any other exceptions here */ ! #endif ! ! /* if it's still not defined, then define our own version */ ! #if !defined BOOL_DEFINED ! #define BOOL_IS_OSBOOL ! typedef osbool bool; ! #endif ! ! /************************ ! * Constant definitions * ! ************************/ ! #ifndef NULL ! #define NULL 0 ! #endif ! #ifndef FALSE ! #define FALSE ((osbool) 0) ! #endif ! #ifndef TRUE ! #define TRUE ((osbool) 1) ! #endif ! #ifndef NONE ! #define NONE 0u ! #endif ! #ifndef ALL ! #define ALL (~0u) ! #endif ! #ifndef SKIP ! #define SKIP 0 ! #endif ! #ifndef _V ! #define _V 0x10000000u ! #endif ! #ifndef _C ! #define _C 0x20000000u ! #endif ! #ifndef _Z ! #define _Z 0x40000000u ! #endif ! #ifndef _N ! #define _N 0x80000000u #endif + #ifndef ERROR + #define ERROR (-2) + #endif + #ifndef UNKNOWN + #define UNKNOWN 1 #endif ! /********************* ! * Macro definitions * ! *********************/ ! /*Macros that "change the language"*/ ! #define AS . #define ASREF -> ! #define _ , ! /* __swi(x) is an optimisation hint unique to Norcroft C */ ! /* define it to nothing for other compilers */ ! #if defined __swi || !defined __CC_NORCROFT || defined __cplusplus ! #undef __swi ! #define __swi(x) extern ! #endif ! /*Macros that suppress compiler warnings*/ #define NOT_USED(x) {x = x;} ! #define UNSET(x) {(void) &x;} #endif |