# HG changeset patch # User Tassilo Philipp # Date 1707147839 -3600 # Node ID 6a8aac9b2bcfe92f9e508dda7fbfb02be0b2f96e # Parent f13444192ceb2549192871ef0291cf2295b0d1e1 - removal of `autovar` macro detection lib: * was a good idea, but never fully pushed through, so code was duplicating most of dyncall_macros.h * didn't find any outside use and plans to make it a standalone lib never materialized * so basically removing code to avoid code duplication that risks to never stay in sync diff -r f13444192ceb -r 6a8aac9b2bcf autovar/LICENSE.txt --- a/autovar/LICENSE.txt Thu Dec 15 10:27:40 2022 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,15 +0,0 @@ -Copyright (c) 2011 Daniel Adler - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - diff -r f13444192ceb -r 6a8aac9b2bcf autovar/README.txt --- a/autovar/README.txt Thu Dec 15 10:27:40 2022 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,70 +0,0 @@ -autovar -- a small macro auto-detection library - - -the following gives the list of variables available. -for each variable, a separate header file is used. - -OS: Operating System -ARCH: Architecture -CC: C Compiler -ABI: Application Binary Interface -OSFAMILY: OS Roots - - -the following gives the tree of variables - -OS: - Win32 - Win64 - Darwin - IOS - MacOSX - Linux - FreeBSD - OpenBSD - NetBSD - DragonFlyBSD - SunOS - Cygwin - MinGW - NDS - PSP - BeOS - Plan9 - VMS - Minix - Unknown - -ARCH: - X86 - X64 - IA64 - PPC - PPC64 - MIPS64 - MIPS - ARM - THUMB - SH - SPARC64 - SPARC - -ABI: - PE - Mach - ELF - ELF32 - ELF64 - -OSFAMILY: - Windows - Unix - GameConsole - -CC: - INTEL - MSVC - GNU - WATCOM - PCC - SUN diff -r f13444192ceb -r 6a8aac9b2bcf autovar/autovar_ABI.h --- a/autovar/autovar_ABI.h Thu Dec 15 10:27:40 2022 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +0,0 @@ -/* - - Package: dyncall - Library: autovar - File: autovar/autovar_ABI.h - Description: - License: - - Copyright (c) 2011-2018 Daniel Adler , - Tassilo Philipp - - Permission to use, copy, modify, and distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -*/ - -#ifndef AUTOVAR_ABI_H -#define AUTOVAR_ABI_H - -#include "autovar_OS.h" - -#if defined(OS_Win32) || defined(OS_Win64) || defined(OS_Cygwin) || defined(OS_MinGW) -#define ABI_PE -#elif defined(OS_Darwin) -#define ABI_Mach -#elif !defined(OS_Minix) || defined(__ELF__) /* Minix >= 3.2 (2012) uses ELF */ -#define ABI_ELF -# if defined(__LP64__) || defined(_LP64) -# define ABI_ELF64 -# else -# define ABI_ELF32 -# endif -#else -#define ABI_Unknown -#endif - -#endif /* AUTOVAR_ABI_H */ - diff -r f13444192ceb -r 6a8aac9b2bcf autovar/autovar_ARCH.h --- a/autovar/autovar_ARCH.h Thu Dec 15 10:27:40 2022 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,63 +0,0 @@ -/* - - Package: dyncall - Library: autovar - File: autovar/autovar_ARCH.h - Description: - License: - - Copyright (c) 2011-2018 Daniel Adler , - Tassilo Philipp - - Permission to use, copy, modify, and distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -*/ - -#ifndef AUTOVAR_ARCH_H -#define AUTOVAR_ARCH_H - -/* Check architecture. */ -#if defined(_M_X64_) || defined(_M_AMD64) || defined(__amd64__) || defined(__amd64) || defined(__x86_64__) || defined(__x86_64) -# define ARCH_X64 -#elif defined(_M_IX86) || defined(__i386__) || defined(__i486__) || defined(__i586__) || defined(__i686__) || defined(__386__) || defined(__i386) -# define ARCH_X86 -#elif defined(_M_IA64) || defined(__ia64__) -# define ARCH_IA64 -#elif defined(_M_PPC) || defined(__powerpc__) || defined(__powerpc) || defined(__POWERPC__) || defined(__ppc__) || defined(__power__) -# if defined(__ppc64__) || defined(_ARCH_PPC64) || defined(__power64__) || defined(__powerpc64__) -# define ARCH_PPC64 -# else -# define ARCH_PPC -# endif -#elif defined(__mips64__) || defined(__mips64) -# define ARCH_MIPS64 -#elif defined(_M_MRX000) || defined(__mips__) || defined(__mips) || defined(_mips) -# define ARCH_MIPS -#elif defined(__arm__) -# define ARCH_ARM -# if defined(__thumb__) -# define ARCH_THUMB -# endif -#elif defined(_M_ARM64) || defined(__aarch64__) || defined(__arm64) || defined(__arm64__) -# define ARCH_ARM64 -#elif defined(__sh__) -# define ARCH_SH -#elif defined(__sparc) || defined(__sparc__) -# if defined(__sparcv9) || defined(__sparc_v9__) || defined(__sparc64__) || defined(__arch64__) -# define ARCH_SPARC64 -# else -# define ARCH_SPARC -# endif -#endif - -#endif /* AUTOVAR_ARCH_H */ diff -r f13444192ceb -r 6a8aac9b2bcf autovar/autovar_CC.h --- a/autovar/autovar_CC.h Thu Dec 15 10:27:40 2022 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,49 +0,0 @@ -/* - - Package: dyncall - Library: autovar - File: autovar/autovar_CC.h - Description: - License: - - Copyright (c) 2011-2018 Daniel Adler , - Tassilo Philipp - - Permission to use, copy, modify, and distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -*/ - -#ifndef AUTOVAR_CC_H -#define AUTOVAR_CC_H - -/* Compiler specific defines. Do not change the order, because */ -/* some of the compilers define flags for compatible ones, too. */ - -#if defined(__INTEL_COMPILER) -#define CC_INTEL -#elif defined(_MSC_VER) -#define CC_MSVC -#elif defined(__clang__) || defined(__llvm__) -#define CC_CLANG -#elif defined(__GNUC__) -#define CC_GNU -#elif defined(__WATCOMC__) -#define CC_WATCOM -#elif defined(__PCC__) -#define CC_PCC -#elif defined(__SUNPRO_C) -#define CC_SUN -#endif - -#endif /* AUTOVAR_CC_H */ - diff -r f13444192ceb -r 6a8aac9b2bcf autovar/autovar_OS.h --- a/autovar/autovar_OS.h Thu Dec 15 10:27:40 2022 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,83 +0,0 @@ -/* - - Package: dyncall - Library: autovar - File: autovar/autovar_OS.h - Description: - License: - - Copyright (c) 2011-2018 Daniel Adler , - Tassilo Philipp - - Permission to use, copy, modify, and distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -*/ - -#ifndef AUTOVAR_OS_H -#define AUTOVAR_OS_H - -#if defined(WIN64) || defined(_WIN64) || defined(__WIN64__) -# define OS_Win64 -#elif defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__) || defined(__WINDOWS__) || defined(_WINDOWS) -# define OS_Win32 -#elif defined(__APPLE__) || defined(__Darwin__) -# define OS_Darwin -# if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) -# define OS_IOS -# else /* defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) */ -# define OS_MacOSX -# endif -#elif defined(__linux__) || defined(__linux) || defined(__gnu_linux__) -# define OS_Linux -#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) /* latter is (also) used by systems using FreeBSD kernel, e.g. Debian/kFreeBSD, which could be detected specifically by also checking for __GLIBC__ */ -# define OS_FreeBSD -#elif defined(__OpenBSD__) -# define OS_OpenBSD -#elif defined(__NetBSD__) -# define OS_NetBSD -#elif defined(__DragonFly__) -# define OS_DragonFlyBSD -#elif defined(__sun__) || defined(__sun) || defined(sun) -# define OS_SunOS -#elif defined(__nds__) -# define OS_NDS -#elif defined(__psp__) || defined(PSP) -# define OS_PSP -#elif defined(__HAIKU__) || defined(__BEOS__) -# define OS_BeOS -#elif defined(Plan9) || defined(__Plan9__) -# define OS_Plan9 -#elif defined(__vms) -# define OS_VMS -#elif defined(__minix) -# define OS_Minix -#else -# define OS_Unknown -#endif - -#if defined(DC__OS_Win32) || defined(DC__OS_Win64) -# if defined(__CYGWIN__) -# define OS_Cygwin -# elif defined(__MINGW32__) || defined(__MINGW64__) -# define OS_MinGW -# endif -#endif - -/** Platforms. */ - -#if defined(__ANDROID__) -# define OS_Android -#endif - -#endif /* AUTOVAR_OS */ - diff -r f13444192ceb -r 6a8aac9b2bcf autovar/autovar_OSFAMILY.h --- a/autovar/autovar_OSFAMILY.h Thu Dec 15 10:27:40 2022 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,40 +0,0 @@ -/* - - Package: dyncall - Library: autovar - File: autovar/autovar_OSFAMILY.h - Description: - License: - - Copyright (c) 2011-2018 Daniel Adler , - Tassilo Philipp - - Permission to use, copy, modify, and distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -*/ - -#ifndef AUTOVAR_OSFAMILY_H -#define AUTOVAR_OSFAMILY_H - -#include "autovar_OS.h" - -#if defined(OS_Win32) || defined(OS_Win64) -#define OSFAMILY_Windows -#elif defined(OS_NDS) || defined(OS_PSP) -#define OSFAMILY_GameConsole -#else -#define OSFAMILY_Unix -#endif - -#endif /* AUTOVAR_OSFAMILY_H */ - diff -r f13444192ceb -r 6a8aac9b2bcf dyncall/dyncall_macros.h --- a/dyncall/dyncall_macros.h Thu Dec 15 10:27:40 2022 +0100 +++ b/dyncall/dyncall_macros.h Mon Feb 05 16:43:59 2024 +0100 @@ -231,6 +231,23 @@ #endif +/* -- Executable/object file formats. ------------------------------- */ + +#if defined(DC__OS_Win32) || defined(DC__OS_Win64) || defined(DC__OS_Cygwin) || defined(DC__OS_MinGW) +# define DC__Obj_PE +#elif defined(DC__OS_Darwin) +# define DC__Obj_Mach +#elif !defined(DC__OS_Minix) || defined(__ELF__) /* Minix >= 3.2 (2012) uses ELF */ +# define DC__Obj_ELF +# if defined(__LP64__) || defined(_LP64) +# define DC__Obj_ELF64 +# else +# define DC__Obj_ELF32 +# endif +#else +# define DC__Obj_Unknown +#endif + /* -- Misc machine-dependent modes, ABIs, etc. ---------------------- */ @@ -279,7 +296,6 @@ #endif /* PPC64 */ - /* -- Endianness detection ------------------------------------------ */ #if defined(DC__Arch_Intel_x86) || defined(DC__Arch_AMD64) /* always little */ diff -r f13444192ceb -r 6a8aac9b2bcf dynload/dynload.c --- a/dynload/dynload.c Thu Dec 15 10:27:40 2022 +0100 +++ b/dynload/dynload.c Mon Feb 05 16:43:59 2024 +0100 @@ -24,10 +24,10 @@ */ -#include "../autovar/autovar_OSFAMILY.h" -#if defined(OSFAMILY_Windows) +#include "../dyncall/dyncall_macros.h" +#if defined(DC_WINDOWS) # include "dynload_windows.c" -#elif defined(OSFAMILY_Unix) +#elif defined(DC_UNIX) # include "dynload_unix.c" #endif diff -r f13444192ceb -r 6a8aac9b2bcf dynload/dynload_syms.c --- a/dynload/dynload_syms.c Thu Dec 15 10:27:40 2022 +0100 +++ b/dynload/dynload_syms.c Mon Feb 05 16:43:59 2024 +0100 @@ -26,12 +26,12 @@ #include "dynload.h" -#include "../autovar/autovar_ABI.h" -#if defined(ABI_PE) +#include "../dyncall/dyncall_macros.h" +#if defined(DC__Obj_PE) #include "dynload_syms_pe.c" -#elif defined(ABI_Mach) +#elif defined(DC__Obj_Mach) #include "dynload_syms_mach-o.c" -#elif defined(ABI_ELF) +#elif defined(DC__Obj_ELF) #include "dynload_syms_elf.c" #endif diff -r f13444192ceb -r 6a8aac9b2bcf dynload/dynload_syms_elf.c --- a/dynload/dynload_syms_elf.c Thu Dec 15 10:27:40 2022 +0100 +++ b/dynload/dynload_syms_elf.c Mon Feb 05 16:43:59 2024 +0100 @@ -26,7 +26,7 @@ -#include "../autovar/autovar_OS.h" +#include "../dyncall/dyncall_macros.h" /* @@ -35,13 +35,13 @@ */ #include "dynload.h" -#if defined(OS_OpenBSD) +#if defined(DC__OS_OpenBSD) # include # include -#elif defined(OS_NetBSD) +#elif defined(DC__OS_NetBSD) # include # include -#elif defined(OS_SunOS) +#elif defined(DC__OS_SunOS) # include #else # include @@ -65,16 +65,15 @@ #include /* run-time configuration 64/32 */ -#if defined(OS_OpenBSD) +#if defined(DC__OS_OpenBSD) #else -# include "../autovar/autovar_ABI.h" -# ifdef ABI_ELF64 +# ifdef DC__Obj_ELF64 typedef Elf64_Ehdr Elf_Ehdr; typedef Elf64_Phdr Elf_Phdr; typedef Elf64_Shdr Elf_Shdr; typedef Elf64_Sym Elf_Sym; -# ifndef OS_SunOS +# ifndef DC__OS_SunOS typedef Elf64_Dyn Elf_Dyn; # endif typedef Elf64_Sxword Elf_tag; @@ -86,7 +85,7 @@ typedef Elf32_Phdr Elf_Phdr; typedef Elf32_Shdr Elf_Shdr; typedef Elf32_Sym Elf_Sym; -# ifndef OS_SunOS +# ifndef DC__OS_SunOS typedef Elf32_Dyn Elf_Dyn; # endif typedef Elf32_Sword Elf_tag; @@ -129,7 +128,7 @@ pSyms->fileSize = st.st_size; pSyms->pElf_Ehdr = (Elf_Ehdr*) mmap((void*) NULL, pSyms->fileSize, PROT_READ, MAP_SHARED, pSyms->file, 0); -#ifdef ABI_ELF32 +#ifdef DC__Obj_ELF32 assert(pSyms->pElf_Ehdr->e_ident[EI_CLASS] == ELFCLASS32); #else assert(pSyms->pElf_Ehdr->e_ident[EI_CLASS] == ELFCLASS64); diff -r f13444192ceb -r 6a8aac9b2bcf dynload/dynload_syms_mach-o.c --- a/dynload/dynload_syms_mach-o.c Thu Dec 15 10:27:40 2022 +0100 +++ b/dynload/dynload_syms_mach-o.c Mon Feb 05 16:43:59 2024 +0100 @@ -34,15 +34,14 @@ #include "dynload.h" #include "dynload_alloc.h" -#include "../autovar/autovar_ARCH.h" -#include "../autovar/autovar_OS.h" +#include "../dyncall/dyncall_macros.h" #include #include #include #include -#if defined(ARCH_X64) || defined(ARCH_PPC64) || defined(ARCH_ARM64) /*@@@ use dyncall_macros.h*/ +#if defined(DC__Arch_AMD64) || defined(DC__Arch_PPC64) || defined(DC__Arch_ARM64) #define MACH_HEADER_TYPE mach_header_64 #define MACH_HEADER_MAGIC_NR MH_MAGIC_64 #define SEGMEND_COMMAND_ID LC_SEGMENT_64 @@ -228,7 +227,7 @@ /* Return name - handles lookup of indirect names. */ return &pSyms->pStringTable[(t == N_INDR ? nl->n_value : nl->n_un.n_strx) -#if defined(OS_Darwin) +#if defined(DC__OS_Darwin) + 1 /* Skip '_'-prefix */ #endif ]; diff -r f13444192ceb -r 6a8aac9b2bcf dynload/dynload_unix.c --- a/dynload/dynload_unix.c Thu Dec 15 10:27:40 2022 +0100 +++ b/dynload/dynload_unix.c Mon Feb 05 16:43:59 2024 +0100 @@ -34,7 +34,7 @@ #include "dynload.h" -#include "../autovar/autovar_OS.h" +#include "../dyncall/dyncall_macros.h" #include @@ -101,7 +101,7 @@ * RTLD_DI_LINKMAP and RTLD_SELF, which are #defines used by dlinfo() on most * supported targets, or specifically check the OS (e.g. dlinfo() is originally * from Solaris) */ -#if ((defined(RTLD_DI_LINKMAP) && defined(RTLD_SELF)) || defined(OS_SunOS)) && !defined(DL_USE_GLIBC_ITER_PHDR) +#if ((defined(RTLD_DI_LINKMAP) && defined(RTLD_SELF)) || defined(DC__OS_SunOS)) && !defined(DL_USE_GLIBC_ITER_PHDR) #include @@ -117,7 +117,7 @@ /* specific implementation needed on Darwin -----> */ -#elif defined(OS_Darwin) +#elif defined(DC__OS_Darwin) #include #include @@ -164,7 +164,7 @@ with dl_iterate_phdr (which comes from ELF program header iteration), so base it on that - skip and use dladdr()-based guessing (see below) if explicitly requested, e.g. by ./configure - Haiku/BeOS does have the headers but no implementation of dl_iterate_phdr() (at least as of 2021) */ -#elif !defined(DL_DLADDR_TO_LIBPATH) && (defined(OS_OpenBSD) || defined(DL_USE_GLIBC_ITER_PHDR) || (!defined(RTLD_SELF) && defined(__ELF__))) && !defined(OS_BeOS) +#elif !defined(DL_DLADDR_TO_LIBPATH) && (defined(DC__OS_OpenBSD) || defined(DL_USE_GLIBC_ITER_PHDR) || (!defined(RTLD_SELF) && defined(__ELF__))) && !defined(DC__OS_BeOS) #include #include diff -r f13444192ceb -r 6a8aac9b2bcf portasm/portasm-arm.S --- a/portasm/portasm-arm.S Thu Dec 15 10:27:40 2022 +0100 +++ b/portasm/portasm-arm.S Mon Feb 05 16:43:59 2024 +0100 @@ -26,8 +26,8 @@ #define BEGIN_ASM .text -#include "../autovar/autovar_OS.h" -#if defined(OS_Darwin) +#include "../dyncall/dyncall_macros.h" +#if defined(DC__OS_Darwin) #define GLOBAL_C(X) .globl _##X #define ENTRY_C(X) _##X: #else diff -r f13444192ceb -r 6a8aac9b2bcf portasm/portasm-arm64.S --- a/portasm/portasm-arm64.S Thu Dec 15 10:27:40 2022 +0100 +++ b/portasm/portasm-arm64.S Mon Feb 05 16:43:59 2024 +0100 @@ -25,7 +25,7 @@ #define BEGIN_ASM -#include "../autovar/autovar_OS.h" +#include "../dyncall/dyncall_macros.h" #if defined(GEN_MASM) #define TEXTAREA AREA .text, CODE, ARM64 @@ -46,7 +46,7 @@ #define END_PROC #define END_ASM -#if defined(OS_Darwin) +#if defined(DC__OS_Darwin) #define GLOBAL_C(X) .globl _##X #define ENTRY_C(X) _##X: #else diff -r f13444192ceb -r 6a8aac9b2bcf portasm/portasm-ppc.S --- a/portasm/portasm-ppc.S Thu Dec 15 10:27:40 2022 +0100 +++ b/portasm/portasm-ppc.S Mon Feb 05 16:43:59 2024 +0100 @@ -24,8 +24,8 @@ -#include "../autovar/autovar_OS.h" -#if defined(OS_Darwin) +#include "../dyncall/dyncall_macros.h" +#if defined(DC__OS_Darwin) #define GLOBAL_C(X) .globl _##X #define ENTRY_C(X) _##X: #else diff -r f13444192ceb -r 6a8aac9b2bcf portasm/portasm-ppc64.S --- a/portasm/portasm-ppc64.S Thu Dec 15 10:27:40 2022 +0100 +++ b/portasm/portasm-ppc64.S Mon Feb 05 16:43:59 2024 +0100 @@ -23,7 +23,7 @@ */ -#include "../autovar/autovar_OS.h" +#include "../dyncall/dyncall_macros.h" #if DC__ABI_PPC64_ELF_V != 2 /* v1 */ #define GLOBAL_C(X) \ diff -r f13444192ceb -r 6a8aac9b2bcf portasm/portasm-x64.S --- a/portasm/portasm-x64.S Thu Dec 15 10:27:40 2022 +0100 +++ b/portasm/portasm-x64.S Mon Feb 05 16:43:59 2024 +0100 @@ -87,8 +87,8 @@ .text # define BEGIN_ASM # define END_ASM -# include "../autovar/autovar_ABI.h" -# if defined (OS_Darwin) +# include "../dyncall/dyncall_macros.h" +# if defined(DC__OS_Darwin) # define CSYM(X) _##X # else # define CSYM(X) X diff -r f13444192ceb -r 6a8aac9b2bcf portasm/portasm-x86.S --- a/portasm/portasm-x86.S Thu Dec 15 10:27:40 2022 +0100 +++ b/portasm/portasm-x86.S Mon Feb 05 16:43:59 2024 +0100 @@ -69,8 +69,8 @@ .text # define BEGIN_ASM # define END_ASM -# include "../autovar/autovar_ABI.h" -# if defined(OS_Win32) || defined(OS_Cygwin) || defined(OS_MinGW) || defined(OS_Darwin) || defined(OS_Minix) +# include "../dyncall/dyncall_macros.h" +# if defined(DC__OS_Win32) || defined(DC__OS_Cygwin) || defined(DC__OS_MinGW) || defined(DC__OS_Darwin) || defined(DC__OS_Minix) # define CSYM(X) _##X # else # define CSYM(X) X @@ -110,8 +110,7 @@ # define MOVSD movsd # define DWORD(R,OFF) OFF(R) # define QWORD(R,OFF) OFF(R) -# include "../autovar/autovar_CC.h" -# if defined CC_SUN +# if defined DC__C_SUNPRO # define LIT(X) $X # else # define LIT(X) XCONCAT($,X)