Mercurial > pub > dyncall > dyncall
changeset 606:85b7a117b807
- more statics in test code (this is partly needed on an experimental freebsd sparc64 build where the elf cleanup code crashes for some reason ... it's probably that experimental build, but a good change to do regardless)
author | Tassilo Philipp |
---|---|
date | Wed, 21 Sep 2022 15:20:58 +0200 |
parents | 0f40e13a2f0a |
children | 9d0eefb0e0f0 |
files | test/ellipsis/ellipsis.cc test/ellipsis/main.cc test/suite/case.c test/suite/main.c test/suite2/case.cc test/suite2/main.cc test/suite2_x86win32fast/case.cc test/suite2_x86win32fast/main.cc test/suite2_x86win32std/case.cc test/suite2_x86win32std/main.cc test/suite3/case.cc test/suite3/main.cc test/suite_floats/case.cc test/suite_floats/main.cc test/suite_x86win32fast/case.cc test/suite_x86win32fast/main.cc test/suite_x86win32std/case.cc test/suite_x86win32std/main.cc |
diffstat | 18 files changed, 90 insertions(+), 89 deletions(-) [+] |
line wrap: on
line diff
--- a/test/ellipsis/ellipsis.cc Wed Sep 21 14:37:09 2022 +0200 +++ b/test/ellipsis/ellipsis.cc Wed Sep 21 15:20:58 2022 +0200 @@ -6,7 +6,7 @@ Description: License: - Copyright (c) 2007-2018 Daniel Adler <dadler@uni-goettingen.de>, + Copyright (c) 2007-2022 Daniel Adler <dadler@uni-goettingen.de>, Tassilo Philipp <tphilipp@potion-studios.com> Permission to use, copy, modify, and distribute this software for any @@ -36,7 +36,7 @@ #include <cstdarg> #endif -DCValue mValue[NARGS]; +static DCValue mValue[NARGS]; void clearValues() { for(int i = 0;i<NARGS;++i) mValue[i].L = 0xCAFEBABEDEADC0DEULL; } @@ -53,7 +53,7 @@ DCValue* getArg(int pos) { return &mValue[pos]; } -int gID; +static int gID; int getId() { return gID; } extern "C" { @@ -98,10 +98,11 @@ #define VF9(id,A1,A2,A3,A4,A5,A6,A7,A8,A9,S) (void*)S, #define VF10(id,A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,S) (void*)S, -DCpointer gFuncTable[] = { +static DCpointer gFuncTable[] = { #include "case.h" }; DCpointer getFunc(int x) { return gFuncTable[x]; } +
--- a/test/ellipsis/main.cc Wed Sep 21 14:37:09 2022 +0200 +++ b/test/ellipsis/main.cc Wed Sep 21 15:20:58 2022 +0200 @@ -6,7 +6,7 @@ Description: call (...) functions via dyncall library, targets are auto-generated License: - Copyright (c) 2007-2021 Daniel Adler <dadler@uni-goettingen.de>, + Copyright (c) 2007-2022 Daniel Adler <dadler@uni-goettingen.de>, Tassilo Philipp <tphilipp@potion-studios.com> Permission to use, copy, modify, and distribute this software for any @@ -38,10 +38,10 @@ DCpointer getFunc(int x); DCValue* getArg(int pos); -DCint valueInt [NARGS]; -DClonglong valueLongLong[NARGS]; -DCdouble valueDouble [NARGS]; -DCpointer valuePointer [NARGS]; +static DCint valueInt [NARGS]; +static DClonglong valueLongLong[NARGS]; +static DCdouble valueDouble [NARGS]; +static DCpointer valuePointer [NARGS]; bool equals(int select, int pos, void* data) {
--- a/test/suite/case.c Wed Sep 21 14:37:09 2022 +0200 +++ b/test/suite/case.c Wed Sep 21 15:20:58 2022 +0200 @@ -6,7 +6,7 @@ Description: License: - Copyright (c) 2007-2018 Daniel Adler <dadler@uni-goettingen.de>, + Copyright (c) 2007-2022 Daniel Adler <dadler@uni-goettingen.de>, Tassilo Philipp <tphilipp@potion-studios.com> Permission to use, copy, modify, and distribute this software for any @@ -44,7 +44,7 @@ DCValue* getArg(int pos) { return &mValue[pos]; } -int gID; +static int gID; int getId() { return gID; } /* Generate function definitions. */
--- a/test/suite/main.c Wed Sep 21 14:37:09 2022 +0200 +++ b/test/suite/main.c Wed Sep 21 15:20:58 2022 +0200 @@ -6,7 +6,7 @@ Description: License: - Copyright (c) 2007-2021 Daniel Adler <dadler@uni-goettingen.de>, + Copyright (c) 2007-2022 Daniel Adler <dadler@uni-goettingen.de>, Tassilo Philipp <tphilipp@potion-studios.com> Permission to use, copy, modify, and distribute this software for any @@ -39,14 +39,14 @@ DCValue* getArg(int pos); -DCbool valueBool [NARGS]; -DCshort valueShort [NARGS]; -DCchar valueChar [NARGS]; -DCint valueInt [NARGS]; -DClonglong valueLongLong[NARGS]; -DCdouble valueDouble [NARGS]; -DCpointer valuePointer [NARGS]; -DCfloat valueFloat [NARGS]; +static DCbool valueBool [NARGS]; +static DCshort valueShort [NARGS]; +static DCchar valueChar [NARGS]; +static DCint valueInt [NARGS]; +static DClonglong valueLongLong[NARGS]; +static DCdouble valueDouble [NARGS]; +static DCpointer valuePointer [NARGS]; +static DCfloat valueFloat [NARGS]; enum { ID_DOUBLE = 0,
--- a/test/suite2/case.cc Wed Sep 21 14:37:09 2022 +0200 +++ b/test/suite2/case.cc Wed Sep 21 15:20:58 2022 +0200 @@ -6,7 +6,7 @@ Description: License: - Copyright (c) 2007-2018 Daniel Adler <dadler@uni-goettingen.de>, + Copyright (c) 2007-2022 Daniel Adler <dadler@uni-goettingen.de>, Tassilo Philipp <tphilipp@potion-studios.com> Permission to use, copy, modify, and distribute this software for any @@ -46,7 +46,7 @@ DCValue* getArg(int pos) { return &mValue[pos]; } -int gID; +static int gID; int getId() { return gID; } extern "C" { @@ -126,3 +126,4 @@ #include "case.h" }; +
--- a/test/suite2/main.cc Wed Sep 21 14:37:09 2022 +0200 +++ b/test/suite2/main.cc Wed Sep 21 15:20:58 2022 +0200 @@ -6,7 +6,7 @@ Description: License: - Copyright (c) 2007-2018 Daniel Adler <dadler@uni-goettingen.de>, + Copyright (c) 2007-2022 Daniel Adler <dadler@uni-goettingen.de>, Tassilo Philipp <tphilipp@potion-studios.com> Permission to use, copy, modify, and distribute this software for any @@ -38,14 +38,14 @@ DCValue* getArg(int pos); -DCbool valueBool [MAXARGS]; -DCchar valueChar [MAXARGS]; -DCshort valueShort [MAXARGS]; -DCint valueInt [MAXARGS]; -DClonglong valueLongLong[MAXARGS]; -DCdouble valueDouble [MAXARGS]; -DCpointer valuePointer [MAXARGS]; -DCfloat valueFloat [MAXARGS]; +static DCbool valueBool [MAXARGS]; +static DCchar valueChar [MAXARGS]; +static DCshort valueShort [MAXARGS]; +static DCint valueInt [MAXARGS]; +static DClonglong valueLongLong[MAXARGS]; +static DCdouble valueDouble [MAXARGS]; +static DCpointer valuePointer [MAXARGS]; +static DCfloat valueFloat [MAXARGS]; void clearValues();
--- a/test/suite2_x86win32fast/case.cc Wed Sep 21 14:37:09 2022 +0200 +++ b/test/suite2_x86win32fast/case.cc Wed Sep 21 15:20:58 2022 +0200 @@ -6,7 +6,7 @@ Description: License: - Copyright (c) 2007-2018 Daniel Adler <dadler@uni-goettingen.de>, + Copyright (c) 2007-2022 Daniel Adler <dadler@uni-goettingen.de>, Tassilo Philipp <tphilipp@potion-studios.com> Permission to use, copy, modify, and distribute this software for any @@ -52,7 +52,7 @@ DCValue* getArg(int pos) { return &mValue[pos]; } -int gID; +static int gID; int getId() { return gID; } extern "C" {
--- a/test/suite2_x86win32fast/main.cc Wed Sep 21 14:37:09 2022 +0200 +++ b/test/suite2_x86win32fast/main.cc Wed Sep 21 15:20:58 2022 +0200 @@ -6,7 +6,7 @@ Description: License: - Copyright (c) 2007-2018 Daniel Adler <dadler@uni-goettingen.de>, + Copyright (c) 2007-2022 Daniel Adler <dadler@uni-goettingen.de>, Tassilo Philipp <tphilipp@potion-studios.com> Permission to use, copy, modify, and distribute this software for any @@ -40,15 +40,14 @@ DCValue* getArg(int pos); - -DCbool valueBool[MAXARGS]; -DCchar valueChar[MAXARGS]; -DCshort valueShort[MAXARGS]; -DCint valueInt[MAXARGS]; -DClonglong valueLongLong[MAXARGS]; -DCdouble valueDouble[MAXARGS]; -DCpointer valuePointer[MAXARGS]; -DCfloat valueFloat[MAXARGS]; +static DCbool valueBool [MAXARGS]; +static DCchar valueChar [MAXARGS]; +static DCshort valueShort [MAXARGS]; +static DCint valueInt [MAXARGS]; +static DClonglong valueLongLong[MAXARGS]; +static DCdouble valueDouble [MAXARGS]; +static DCpointer valuePointer [MAXARGS]; +static DCfloat valueFloat [MAXARGS]; void clearValues();
--- a/test/suite2_x86win32std/case.cc Wed Sep 21 14:37:09 2022 +0200 +++ b/test/suite2_x86win32std/case.cc Wed Sep 21 15:20:58 2022 +0200 @@ -6,7 +6,7 @@ Description: License: - Copyright (c) 2007-2018 Daniel Adler <dadler@uni-goettingen.de>, + Copyright (c) 2007-2022 Daniel Adler <dadler@uni-goettingen.de>, Tassilo Philipp <tphilipp@potion-studios.com> Permission to use, copy, modify, and distribute this software for any @@ -53,7 +53,7 @@ DCValue* getArg(int pos) { return &mValue[pos]; } -int gID; +static int gID; int getId() { return gID; } extern "C" {
--- a/test/suite2_x86win32std/main.cc Wed Sep 21 14:37:09 2022 +0200 +++ b/test/suite2_x86win32std/main.cc Wed Sep 21 15:20:58 2022 +0200 @@ -6,7 +6,7 @@ Description: License: - Copyright (c) 2007-2018 Daniel Adler <dadler@uni-goettingen.de>, + Copyright (c) 2007-2022 Daniel Adler <dadler@uni-goettingen.de>, Tassilo Philipp <tphilipp@potion-studios.com> Permission to use, copy, modify, and distribute this software for any @@ -39,15 +39,15 @@ DCValue* getArg(int pos); -DCbool valueBool[MAXARGS]; -DCchar valueChar[MAXARGS]; -DCshort valueShort[MAXARGS]; -DCint valueInt[MAXARGS]; -DClong valueLong[MAXARGS]; -DClonglong valueLongLong[MAXARGS]; -DCdouble valueDouble[MAXARGS]; -DCpointer valuePointer[MAXARGS]; -DCfloat valueFloat[MAXARGS]; +static DCbool valueBool [MAXARGS]; +static DCchar valueChar [MAXARGS]; +static DCshort valueShort [MAXARGS]; +static DCint valueInt [MAXARGS]; +static DClong valueLong [MAXARGS]; +static DClonglong valueLongLong[MAXARGS]; +static DCdouble valueDouble [MAXARGS]; +static DCpointer valuePointer [MAXARGS]; +static DCfloat valueFloat [MAXARGS]; void clearValues();
--- a/test/suite3/case.cc Wed Sep 21 14:37:09 2022 +0200 +++ b/test/suite3/case.cc Wed Sep 21 15:20:58 2022 +0200 @@ -6,7 +6,7 @@ Description: License: - Copyright (c) 2007-2018 Daniel Adler <dadler@uni-goettingen.de>, + Copyright (c) 2007-2022 Daniel Adler <dadler@uni-goettingen.de>, Tassilo Philipp <tphilipp@potion-studios.com> Permission to use, copy, modify, and distribute this software for any @@ -42,7 +42,7 @@ DCValue* getArg(int pos) { return &mValue[pos]; } -int gID; +static int gID; int getId() { return gID; } extern "C" {
--- a/test/suite3/main.cc Wed Sep 21 14:37:09 2022 +0200 +++ b/test/suite3/main.cc Wed Sep 21 15:20:58 2022 +0200 @@ -6,7 +6,7 @@ Description: License: - Copyright (c) 2007-2018 Daniel Adler <dadler@uni-goettingen.de>, + Copyright (c) 2007-2022 Daniel Adler <dadler@uni-goettingen.de>, Tassilo Philipp <tphilipp@potion-studios.com> Permission to use, copy, modify, and distribute this software for any @@ -39,10 +39,10 @@ DCValue* getArg(int pos); -DCint valueInt [NARGS]; -DClonglong valueLongLong[NARGS]; -DCdouble valueDouble [NARGS]; -DCfloat valueFloat [NARGS]; +static DCint valueInt [NARGS]; +static DClonglong valueLongLong[NARGS]; +static DCdouble valueDouble [NARGS]; +static DCfloat valueFloat [NARGS]; bool equals(int select, int pos, void* data)
--- a/test/suite_floats/case.cc Wed Sep 21 14:37:09 2022 +0200 +++ b/test/suite_floats/case.cc Wed Sep 21 15:20:58 2022 +0200 @@ -6,7 +6,7 @@ Description: License: - Copyright (c) 2007-2018 Daniel Adler <dadler@uni-goettingen.de>, + Copyright (c) 2007-2022 Daniel Adler <dadler@uni-goettingen.de>, Tassilo Philipp <tphilipp@potion-studios.com> Permission to use, copy, modify, and distribute this software for any @@ -45,7 +45,7 @@ DCValue* getArg(int pos) { return &mValue[pos]; } -int gID; +static int gID; int getId() { return gID; } extern "C" {
--- a/test/suite_floats/main.cc Wed Sep 21 14:37:09 2022 +0200 +++ b/test/suite_floats/main.cc Wed Sep 21 15:20:58 2022 +0200 @@ -6,7 +6,7 @@ Description: License: - Copyright (c) 2007-2018 Daniel Adler <dadler@uni-goettingen.de>, + Copyright (c) 2007-2022 Daniel Adler <dadler@uni-goettingen.de>, Tassilo Philipp <tphilipp@potion-studios.com> Permission to use, copy, modify, and distribute this software for any @@ -38,8 +38,8 @@ DCpointer getFunc(int x); DCValue* getArg(int pos); -DCdouble valueDouble [NARGS]; -DCfloat valueFloat [NARGS]; +static DCdouble valueDouble [NARGS]; +static DCfloat valueFloat [NARGS]; bool equals(int select, int pos, void* data)
--- a/test/suite_x86win32fast/case.cc Wed Sep 21 14:37:09 2022 +0200 +++ b/test/suite_x86win32fast/case.cc Wed Sep 21 15:20:58 2022 +0200 @@ -6,7 +6,7 @@ Description: License: - Copyright (c) 2007-2018 Daniel Adler <dadler@uni-goettingen.de>, + Copyright (c) 2007-2022 Daniel Adler <dadler@uni-goettingen.de>, Tassilo Philipp <tphilipp@potion-studios.com> Permission to use, copy, modify, and distribute this software for any @@ -46,7 +46,7 @@ DCValue* getArg(int pos) { return &mValue[pos]; } -int gID; +static int gID; int getId() { return gID; } #ifdef DC__C_GNU
--- a/test/suite_x86win32fast/main.cc Wed Sep 21 14:37:09 2022 +0200 +++ b/test/suite_x86win32fast/main.cc Wed Sep 21 15:20:58 2022 +0200 @@ -6,7 +6,7 @@ Description: License: - Copyright (c) 2007-2018 Daniel Adler <dadler@uni-goettingen.de>, + Copyright (c) 2007-2022 Daniel Adler <dadler@uni-goettingen.de>, Tassilo Philipp <tphilipp@potion-studios.com> Permission to use, copy, modify, and distribute this software for any @@ -39,14 +39,14 @@ DCValue* getArg(int pos); -DCbool valueBool[NARGS]; -DCshort valueShort[NARGS]; -DCchar valueChar[NARGS]; -DCint valueInt[NARGS]; -DClonglong valueLongLong[NARGS]; -DCdouble valueDouble[NARGS]; -DCpointer valuePointer[NARGS]; -DCfloat valueFloat[NARGS]; +static DCbool valueBool [NARGS]; +static DCshort valueShort [NARGS]; +static DCchar valueChar [NARGS]; +static DCint valueInt [NARGS]; +static DClonglong valueLongLong[NARGS]; +static DCdouble valueDouble [NARGS]; +static DCpointer valuePointer [NARGS]; +static DCfloat valueFloat [NARGS]; bool equals(int select, int pos, void* data)
--- a/test/suite_x86win32std/case.cc Wed Sep 21 14:37:09 2022 +0200 +++ b/test/suite_x86win32std/case.cc Wed Sep 21 15:20:58 2022 +0200 @@ -6,7 +6,7 @@ Description: License: - Copyright (c) 2007-2018 Daniel Adler <dadler@uni-goettingen.de>, + Copyright (c) 2007-2022 Daniel Adler <dadler@uni-goettingen.de>, Tassilo Philipp <tphilipp@potion-studios.com> Permission to use, copy, modify, and distribute this software for any @@ -45,7 +45,7 @@ DCValue* getArg(int pos) { return &mValue[pos]; } -int gID; +static int gID; int getId() { return gID; } #ifdef DC__C_GNU
--- a/test/suite_x86win32std/main.cc Wed Sep 21 14:37:09 2022 +0200 +++ b/test/suite_x86win32std/main.cc Wed Sep 21 15:20:58 2022 +0200 @@ -6,7 +6,7 @@ Description: License: - Copyright (c) 2007-2018 Daniel Adler <dadler@uni-goettingen.de>, + Copyright (c) 2007-2022 Daniel Adler <dadler@uni-goettingen.de>, Tassilo Philipp <tphilipp@potion-studios.com> Permission to use, copy, modify, and distribute this software for any @@ -38,14 +38,14 @@ DCValue* getArg(int pos); -DCbool valueBool[NARGS]; -DCshort valueShort[NARGS]; -DCchar valueChar[NARGS]; -DCint valueInt[NARGS]; -DClonglong valueLongLong[NARGS]; -DCdouble valueDouble[NARGS]; -DCpointer valuePointer[NARGS]; -DCfloat valueFloat[NARGS]; +static DCbool valueBool [NARGS]; +static DCshort valueShort [NARGS]; +static DCchar valueChar [NARGS]; +static DCint valueInt [NARGS]; +static DClonglong valueLongLong[NARGS]; +static DCdouble valueDouble [NARGS]; +static DCpointer valuePointer [NARGS]; +static DCfloat valueFloat [NARGS]; bool equals(int select, int pos, void* data)