diff --git a/Makefile.rules b/Makefile.rules index 5a5f61fb33..f69cf6e172 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -192,13 +192,13 @@ SYSINFO_CPPFLAGS = GAP_CPPFLAGS += -I$(builddir)/build SYSINFO_CPPFLAGS += -I$(abs_builddir)/build -# The other source files are relative to the srcdir -GAP_CPPFLAGS += -I$(srcdir)/src -SYSINFO_CPPFLAGS += -I$(abs_srcdir)/src - -# For backwards compatibility with certain packages and their kernel -# extensions, also add the root of the srcdir to the package CPPFLAGS -SYSINFO_CPPFLAGS += -I$(abs_srcdir) +# The other source files are bundled and exported through the few headers in +# the `src/extra/` directory. We deliberately do not add `src/` itself as an +# include directory to improve portability: it helps avoid clashes between our +# headers and system headers (e.g. for `io.h` this would otherwise be a +# problem on MinGW). +GAP_CPPFLAGS += -I$(srcdir)/src/extra +SYSINFO_CPPFLAGS += -I$(abs_srcdir)/src/extra # Add GAP_DEFINES (from autoconf, contains -D flags) GAP_CPPFLAGS += $(GAP_DEFINES) @@ -513,10 +513,11 @@ libgap$(SHLIB_EXT): $(LIBGAP_FULL) gap$(EXEEXT): build/obj/src/main.c.o $(OBJS) cnf/GAP-LDFLAGS cnf/GAP-LIBS cnf/GAP-OBJS $(QUIET_LINK)$(LINK) $(GAP_LDFLAGS) $< $(OBJS) $(GAP_LIBS) -o $@ -# generate a modified copy of main.c for use by the `gap-install` binary -build/main.c: src/main.c config.status +# generate a special main.c which sets SYS_DEFAULT_PATHS and then includes +# regular main.c; this is used to build the `gap-install` binary +build/main.c: sysinfo.gap @echo "#define SYS_DEFAULT_PATHS \"$(libdir)/gap;$(datarootdir)/gap\"" > $@ - @cat $< >> $@ + @echo "#include \"$(abs_srcdir)/src/main.c\"" >> $@ # build rule for the gap executable used by the `install-bin` target build/gap-install: build/obj/build/main.c.o libgap$(SHLIB_EXT) cnf/GAP-LDFLAGS cnf/GAP-LIBS cnf/GAP-OBJS @@ -542,7 +543,7 @@ build/c_%.c: $(srcdir)/lib/%.g build/gap-nocomp$(EXEEXT) # The "ffdata" target regenerates build/ffdata.{c,h} using etc/ffgen.c ######################################################################## -ffgen: $(srcdir)/etc/ffgen.c src/common.h build/config.h +ffgen: $(srcdir)/etc/ffgen.c build/config.h $(QUIET_CC)$(CC) -Wall -Wextra $(GAP_CPPFLAGS) $< -o $@ build/ffdata.h build/ffdata.c: ffgen @@ -669,7 +670,7 @@ install-gaproot: install-dirs CITATION # the following lines adjust variables for the installed sysinfo.gap -install-sysinfo: SYSINFO_CPPFLAGS = -I${includedir}/gap -I${includedir} $(GAP_DEFINES) +install-sysinfo: SYSINFO_CPPFLAGS = -I${includedir}/gap/extra $(GAP_DEFINES) install-sysinfo: SYSINFO_LDFLAGS = $(ABI_CFLAGS) install-sysinfo: SYSINFO_GAP = $(bindir)/gap install-sysinfo: SYSINFO_GAC = $(bindir)/gac @@ -686,6 +687,8 @@ install-headers: $(FFDATA_H) build/version.h $(INSTALL) -m 0644 $(builddir)/build/version.h $(DESTDIR)$(includedir)/gap $(INSTALL) -d -m 0755 $(DESTDIR)$(includedir)/gap/hpc $(INSTALL) -m 0644 $(srcdir)/src/hpc/*.h $(DESTDIR)$(includedir)/gap/hpc + $(INSTALL) -d -m 0755 $(DESTDIR)$(includedir)/gap/extra + $(INSTALL) -m 0644 $(srcdir)/src/extra/*.h $(DESTDIR)$(includedir)/gap/extra install-libgap: install-dirs $(LIBGAP_FULL) libgap.pc $(INSTALL) -d -m 0755 $(DESTDIR)$(libdir) diff --git a/etc/ffgen.c b/etc/ffgen.c index 0b225cad96..c002e9a39d 100644 --- a/etc/ffgen.c +++ b/etc/ffgen.c @@ -62,7 +62,7 @@ void emit_code(FILE * dest, int header) fprintf(dest, "#ifndef GAP_FFDATA_H\n"); fprintf(dest, "#define GAP_FFDATA_H\n"); fprintf(dest, "\n"); - fprintf(dest, "#include \"common.h\"\n"); + fprintf(dest, "#include \n"); fprintf(dest, "\n"); fprintf(dest, "enum {\n"); fprintf(dest, " NUM_SHORT_FINITE_FIELDS = %d,\n", num_ff); @@ -72,18 +72,18 @@ void emit_code(FILE * dest, int header) fprintf(dest, " VAL_BITS_FFE = %d\n", needed_bits(MAX_FF - 1)); fprintf(dest, "};\n"); fprintf(dest, "\n"); - fprintf(dest, "extern const UInt4 SizeFF[NUM_SHORT_FINITE_FIELDS+1];\n"); - fprintf(dest, "extern const UInt1 DegrFF[NUM_SHORT_FINITE_FIELDS+1];\n"); - fprintf(dest, "extern const UInt4 CharFF[NUM_SHORT_FINITE_FIELDS+1];\n"); + fprintf(dest, "extern const uint32_t SizeFF[NUM_SHORT_FINITE_FIELDS+1];\n"); + fprintf(dest, "extern const uint8_t DegrFF[NUM_SHORT_FINITE_FIELDS+1];\n"); + fprintf(dest, "extern const uint32_t CharFF[NUM_SHORT_FINITE_FIELDS+1];\n"); fprintf(dest, "\n"); if (num_ff < 65536) - fprintf(dest, "typedef UInt2 FF;\n"); + fprintf(dest, "typedef uint16_t FF;\n"); else - fprintf(dest, "typedef UInt4 FF;\n"); + fprintf(dest, "typedef uint32_t FF;\n"); if (MAX_FF <= 65536) - fprintf(dest, "typedef UInt2 FFV;\n"); + fprintf(dest, "typedef uint16_t FFV;\n"); else - fprintf(dest, "typedef UInt4 FFV;\n"); + fprintf(dest, "typedef uint32_t FFV;\n"); fprintf(dest, "\n"); fprintf(dest, "#endif // GAP_FFDATA_H\n"); } @@ -94,7 +94,7 @@ void emit_code(FILE * dest, int header) fprintf(dest, " * to find them. Indices start at 1.\n"); fprintf(dest, " */\n"); fprintf(dest, "\n"); - fprintf(dest, "const UInt1 DegrFF[NUM_SHORT_FINITE_FIELDS+1] = {\n"); + fprintf(dest, "const uint8_t DegrFF[NUM_SHORT_FINITE_FIELDS+1] = {\n"); fprintf(dest, " %3d,", 0); for (i = 0, j = 1; i <= MAX_FF; i++) { if (is_ff[i]) { @@ -109,7 +109,7 @@ void emit_code(FILE * dest, int header) fprintf(dest, "\n"); fprintf(dest, "};\n"); fprintf(dest, "\n"); - fprintf(dest, "const UInt4 CharFF[NUM_SHORT_FINITE_FIELDS+1] = {\n"); + fprintf(dest, "const uint32_t CharFF[NUM_SHORT_FINITE_FIELDS+1] = {\n"); fprintf(dest, " %9d,", 0); for (i = 0, j = 1; i <= MAX_FF; i++) { if (is_ff[i]) { @@ -124,7 +124,7 @@ void emit_code(FILE * dest, int header) fprintf(dest, "\n"); fprintf(dest, "};\n"); fprintf(dest, "\n"); - fprintf(dest, "const UInt4 SizeFF[NUM_SHORT_FINITE_FIELDS+1] = {\n"); + fprintf(dest, "const uint32_t SizeFF[NUM_SHORT_FINITE_FIELDS+1] = {\n"); fprintf(dest, " %9d,", 0); for (i = 0, j = 1; i <= MAX_FF; i++) { if (is_ff[i]) { diff --git a/src/extra/compiled.h b/src/extra/compiled.h new file mode 100644 index 0000000000..342d79ecf4 --- /dev/null +++ b/src/extra/compiled.h @@ -0,0 +1,20 @@ +/**************************************************************************** +** +** This file is part of GAP, a system for computational discrete algebra. +** +** Copyright of GAP belongs to its developers, whose names are too numerous +** to list here. Please refer to the COPYRIGHT file for details. +** +** SPDX-License-Identifier: GPL-2.0-or-later +** +** This header is provided for backwards compatibility with GAP kernel +** extensions that are not yet using the `gap_all.h` header (available since +** GAP 4.12). Most of these used `compiled.h` instead. +*/ + +#ifndef GAP_EXTRA_COMPILED_H +#define GAP_EXTRA_COMPILED_H + +#include "../compiled.h" + +#endif // GAP_EXTRA_COMPILED_H diff --git a/src/extra/gap_all.h b/src/extra/gap_all.h new file mode 100644 index 0000000000..4c8401ddb0 --- /dev/null +++ b/src/extra/gap_all.h @@ -0,0 +1,19 @@ +/**************************************************************************** +** +** This file is part of GAP, a system for computational discrete algebra. +** +** Copyright of GAP belongs to its developers, whose names are too numerous +** to list here. Please refer to the COPYRIGHT file for details. +** +** SPDX-License-Identifier: GPL-2.0-or-later +** +** This header includes most of the other GAP headers, and is meant to be +** included by GAP kernel extensions. +*/ + +#ifndef GAP_EXTRA_GAP_ALL_H +#define GAP_EXTRA_GAP_ALL_H + +#include "../gap_all.h" + +#endif // GAP_EXTRA_GAP_ALL_H diff --git a/src/extra/libgap-api.h b/src/extra/libgap-api.h new file mode 100644 index 0000000000..9c8358bfb2 --- /dev/null +++ b/src/extra/libgap-api.h @@ -0,0 +1,18 @@ +/**************************************************************************** +** +** This file is part of GAP, a system for computational discrete algebra. +** +** Copyright of GAP belongs to its developers, whose names are too numerous +** to list here. Please refer to the COPYRIGHT file for details. +** +** SPDX-License-Identifier: GPL-2.0-or-later +** +** This header includes LibGAP API, the API for using GAP as shared library. +*/ + +#ifndef GAP_EXTRA_LIBGAP_API_H +#define GAP_EXTRA_LIBGAP_API_H + +#include "../libgap-api.h" + +#endif // GAP_EXTRA_LIBGAP_API_H diff --git a/src/hpc/aobjects.c b/src/hpc/aobjects.c index abb467c9fa..0186e85380 100644 --- a/src/hpc/aobjects.c +++ b/src/hpc/aobjects.c @@ -10,27 +10,27 @@ ** This file contains the GAP interface for thread primitives. */ -#include "hpc/aobjects.h" - -#include "hpc/guards.h" -#include "hpc/thread.h" -#include "hpc/traverse.h" - -#include "ariths.h" -#include "bool.h" -#include "calls.h" -#include "error.h" -#include "fibhash.h" -#include "gaputils.h" -#include "gvars.h" -#include "io.h" -#include "lists.h" -#include "modules.h" -#include "objects.h" -#include "plist.h" -#include "precord.h" -#include "records.h" -#include "stringobj.h" +#include "aobjects.h" + +#include "guards.h" +#include "thread.h" +#include "traverse.h" + +#include "../ariths.h" +#include "../bool.h" +#include "../calls.h" +#include "../error.h" +#include "../fibhash.h" +#include "../gaputils.h" +#include "../gvars.h" +#include "../io.h" +#include "../lists.h" +#include "../modules.h" +#include "../objects.h" +#include "../plist.h" +#include "../precord.h" +#include "../records.h" +#include "../stringobj.h" #include // for labs diff --git a/src/hpc/aobjects.h b/src/hpc/aobjects.h index c5516b5486..0938f12c9a 100644 --- a/src/hpc/aobjects.h +++ b/src/hpc/aobjects.h @@ -11,8 +11,8 @@ #ifndef GAP_AOBJECTS_H #define GAP_AOBJECTS_H -#include "objects.h" -#include "hpc/atomic.h" +#include "../objects.h" +#include "atomic.h" #ifndef HPCGAP #error This header is only meant to be used with HPC-GAP diff --git a/src/hpc/atomic.h b/src/hpc/atomic.h index dcb96979e0..00d2c8b113 100644 --- a/src/hpc/atomic.h +++ b/src/hpc/atomic.h @@ -11,7 +11,7 @@ #ifndef GAP_ATOMIC_H #define GAP_ATOMIC_H -#include "common.h" +#include "../common.h" #ifndef HPCGAP #error This header is only meant to be used with HPC-GAP diff --git a/src/hpc/cpu.c b/src/hpc/cpu.c index e28f8f3b12..c99bb9cb96 100644 --- a/src/hpc/cpu.c +++ b/src/hpc/cpu.c @@ -8,7 +8,7 @@ ** SPDX-License-Identifier: GPL-2.0-or-later */ -#include "hpc/cpu.h" +#include "cpu.h" #include diff --git a/src/hpc/cpu.h b/src/hpc/cpu.h index 8750913306..7cbabd55c8 100644 --- a/src/hpc/cpu.h +++ b/src/hpc/cpu.h @@ -11,7 +11,7 @@ #ifndef GAP_HPC_CPU_H #define GAP_HPC_CPU_H -#include "common.h" +#include "../common.h" #ifndef HPCGAP #error This header is only meant to be used with HPC-GAP diff --git a/src/hpc/guards.h b/src/hpc/guards.h index 8e04e6a95a..b22572843e 100644 --- a/src/hpc/guards.h +++ b/src/hpc/guards.h @@ -11,8 +11,8 @@ #ifndef GAP_HPC_GUARD_H #define GAP_HPC_GUARD_H -#include "hpc/region.h" -#include "hpc/tls.h" +#include "region.h" +#include "tls.h" #ifndef HPCGAP #error This header is only meant to be used with HPC-GAP diff --git a/src/hpc/misc.c b/src/hpc/misc.c index a7b962adea..29cb8d0629 100644 --- a/src/hpc/misc.c +++ b/src/hpc/misc.c @@ -8,7 +8,7 @@ ** SPDX-License-Identifier: GPL-2.0-or-later */ -#include "hpc/misc.h" +#include "misc.h" #include #include diff --git a/src/hpc/misc.h b/src/hpc/misc.h index 124d76e390..8d7388c389 100644 --- a/src/hpc/misc.h +++ b/src/hpc/misc.h @@ -11,7 +11,7 @@ #ifndef GAP_HPC_MISC_H #define GAP_HPC_MISC_H -#include "common.h" +#include "../common.h" #ifndef HPCGAP #error This header is only meant to be used with HPC-GAP diff --git a/src/hpc/region.c b/src/hpc/region.c index 2838571991..4569c0bb96 100644 --- a/src/hpc/region.c +++ b/src/hpc/region.c @@ -8,17 +8,17 @@ ** SPDX-License-Identifier: GPL-2.0-or-later */ -#include "hpc/region.h" +#include "region.h" #ifdef USE_BOEHM_GC -#include "boehm_gc.h" +#include "../boehm_gc.h" #endif -#include "gasman.h" -#include "objects.h" +#include "../gasman.h" +#include "../objects.h" -// #include "hpc/misc.h" -#include "hpc/thread.h" -#include "hpc/guards.h" +// #include "misc.h" +#include "thread.h" +#include "guards.h" #include diff --git a/src/hpc/region.h b/src/hpc/region.h index beb4337cda..f5ade0c159 100644 --- a/src/hpc/region.h +++ b/src/hpc/region.h @@ -11,13 +11,13 @@ #ifndef GAP_REGION_H #define GAP_REGION_H -#include "common.h" +#include "../common.h" #ifndef HPCGAP #error This header is only meant to be used with HPC-GAP #endif -#include "hpc/atomic.h" +#include "atomic.h" typedef struct Region Region; diff --git a/src/hpc/serialize.c b/src/hpc/serialize.c index 4ac2904df9..3dcd730d93 100644 --- a/src/hpc/serialize.c +++ b/src/hpc/serialize.c @@ -8,22 +8,22 @@ ** SPDX-License-Identifier: GPL-2.0-or-later */ -#include "hpc/serialize.h" - -#include "bool.h" -#include "calls.h" -#include "error.h" -#include "gvars.h" -#include "modules.h" -#include "objset.h" -#include "plist.h" -#include "precord.h" -#include "rational.h" -#include "records.h" -#include "stringobj.h" -#include "trycatch.h" - -#include "hpc/aobjects.h" +#include "serialize.h" + +#include "../bool.h" +#include "../calls.h" +#include "../error.h" +#include "../gvars.h" +#include "../modules.h" +#include "../objset.h" +#include "../plist.h" +#include "../precord.h" +#include "../rational.h" +#include "../records.h" +#include "../stringobj.h" +#include "../trycatch.h" + +#include "aobjects.h" #include diff --git a/src/hpc/serialize.h b/src/hpc/serialize.h index 11e77b0222..3ad8d6effd 100644 --- a/src/hpc/serialize.h +++ b/src/hpc/serialize.h @@ -11,7 +11,7 @@ #ifndef GAP_SERIALIZE_H #define GAP_SERIALIZE_H -#include "common.h" +#include "../common.h" typedef struct SerializerState SerializerState; typedef struct DeserializerState DeserializerState; diff --git a/src/hpc/thread.c b/src/hpc/thread.c index e63e1ebe4c..420074bf93 100644 --- a/src/hpc/thread.c +++ b/src/hpc/thread.c @@ -8,22 +8,22 @@ ** SPDX-License-Identifier: GPL-2.0-or-later */ -#include "hpc/thread.h" - -#include "code.h" -#include "error.h" -#include "fibhash.h" -#include "gapstate.h" -#include "gvars.h" -#include "modules.h" -#include "plist.h" -#include "stats.h" -#include "stringobj.h" -#include "vars.h" - -#include "hpc/guards.h" -#include "hpc/misc.h" -#include "hpc/threadapi.h" +#include "thread.h" + +#include "../code.h" +#include "../error.h" +#include "../fibhash.h" +#include "../gapstate.h" +#include "../gvars.h" +#include "../modules.h" +#include "../plist.h" +#include "../stats.h" +#include "../stringobj.h" +#include "../vars.h" + +#include "guards.h" +#include "misc.h" +#include "threadapi.h" #include #include diff --git a/src/hpc/thread.h b/src/hpc/thread.h index d5b5007ba3..1b0b39b2c1 100644 --- a/src/hpc/thread.h +++ b/src/hpc/thread.h @@ -11,7 +11,7 @@ #ifndef GAP_THREAD_H #define GAP_THREAD_H -#include "common.h" +#include "../common.h" #if !defined(HPCGAP) @@ -26,8 +26,8 @@ #else -#include "hpc/tlsconfig.h" -#include "hpc/region.h" +#include "tlsconfig.h" +#include "region.h" // Maximum number of threads excluding the main thread #define MAX_THREADS 1023 diff --git a/src/hpc/threadapi.c b/src/hpc/threadapi.c index 9ff14e2591..0a11e5e1cc 100644 --- a/src/hpc/threadapi.c +++ b/src/hpc/threadapi.c @@ -10,34 +10,34 @@ ** This file contains the GAP interface for thread primitives. */ -#include "hpc/threadapi.h" - -#include "bool.h" -#include "calls.h" -#include "code.h" -#include "error.h" -#include "funcs.h" -#include "gvars.h" -#include "io.h" -#include "lists.h" -#include "modules.h" -#include "objects.h" -#include "plist.h" -#include "precord.h" -#include "read.h" -#include "records.h" -#include "set.h" -#include "stats.h" -#include "stringobj.h" -#include "trycatch.h" -#include "vars.h" - -#include "hpc/guards.h" -#include "hpc/misc.h" -#include "hpc/region.h" -#include "hpc/thread.h" -#include "hpc/tls.h" -#include "hpc/traverse.h" +#include "threadapi.h" + +#include "../bool.h" +#include "../calls.h" +#include "../code.h" +#include "../error.h" +#include "../funcs.h" +#include "../gvars.h" +#include "../io.h" +#include "../lists.h" +#include "../modules.h" +#include "../objects.h" +#include "../plist.h" +#include "../precord.h" +#include "../read.h" +#include "../records.h" +#include "../set.h" +#include "../stats.h" +#include "../stringobj.h" +#include "../trycatch.h" +#include "../vars.h" + +#include "guards.h" +#include "misc.h" +#include "region.h" +#include "thread.h" +#include "tls.h" +#include "traverse.h" #include #include diff --git a/src/hpc/threadapi.h b/src/hpc/threadapi.h index 5e064f03cd..5f136ba94d 100644 --- a/src/hpc/threadapi.h +++ b/src/hpc/threadapi.h @@ -11,9 +11,9 @@ #ifndef GAP_THREADAPI_H #define GAP_THREADAPI_H -#include "objects.h" +#include "../objects.h" -#include "gvars.h" +#include "../gvars.h" #include diff --git a/src/hpc/tls.c b/src/hpc/tls.c index 2f831f6ef2..49e621a436 100644 --- a/src/hpc/tls.c +++ b/src/hpc/tls.c @@ -8,8 +8,8 @@ ** SPDX-License-Identifier: GPL-2.0-or-later */ -#include "gapstate.h" -#include "hpc/thread.h" +#include "../gapstate.h" +#include "thread.h" #include diff --git a/src/hpc/tls.h b/src/hpc/tls.h index 80ee594c81..113264c576 100644 --- a/src/hpc/tls.h +++ b/src/hpc/tls.h @@ -11,7 +11,7 @@ #ifndef GAP_TLS_H #define GAP_TLS_H -#include "system.h" +#include "../system.h" #if !defined(HPCGAP) #error This header is only meant to be used with HPC-GAP @@ -60,7 +60,7 @@ // assembly code for pthread_getspecific() is implemented in a way // consistent with such code. -#include "hpc/tlsconfig.h" +#include "tlsconfig.h" #include diff --git a/src/hpc/tlsconfig.h b/src/hpc/tlsconfig.h index d2b6fad6ee..7c8caed57a 100644 --- a/src/hpc/tlsconfig.h +++ b/src/hpc/tlsconfig.h @@ -11,7 +11,7 @@ #ifndef GAP_TLSCONFIG_H #define GAP_TLSCONFIG_H -#include "common.h" +#include "../common.h" #if !defined(HPCGAP) #error This header is only meant to be used with HPC-GAP diff --git a/src/hpc/traverse.c b/src/hpc/traverse.c index 9a3900b28d..864ef5a13b 100644 --- a/src/hpc/traverse.c +++ b/src/hpc/traverse.c @@ -11,17 +11,17 @@ /* * Functionality to traverse nested object structures. */ -#include "hpc/traverse.h" +#include "traverse.h" -#include "bool.h" -#include "error.h" -#include "fibhash.h" -#include "gaputils.h" -#include "modules.h" -#include "plist.h" +#include "../bool.h" +#include "../error.h" +#include "../fibhash.h" +#include "../gaputils.h" +#include "../modules.h" +#include "../plist.h" -#include "hpc/guards.h" -#include "hpc/thread.h" +#include "guards.h" +#include "thread.h" #ifndef WARD_ENABLED diff --git a/src/hpc/traverse.h b/src/hpc/traverse.h index e75dac0b8c..5b5989f033 100644 --- a/src/hpc/traverse.h +++ b/src/hpc/traverse.h @@ -11,7 +11,7 @@ #ifndef GAP_TRAVERSE_H #define GAP_TRAVERSE_H -#include "common.h" +#include "../common.h" typedef struct TraversalState TraversalState; diff --git a/src/version.h.in b/src/version.h.in index ced22cc7b7..1a8f835589 100644 --- a/src/version.h.in +++ b/src/version.h.in @@ -13,9 +13,6 @@ #ifndef GAP_VERSION_H #define GAP_VERSION_H -#include "common.h" - - /**************************************************************************** ** ** GAP_KERNEL_MAJOR_VERSION diff --git a/tst/testkernel/dstruct.c b/tst/testkernel/dstruct.c index d219dd3b1b..0da28f7d19 100644 --- a/tst/testkernel/dstruct.c +++ b/tst/testkernel/dstruct.c @@ -15,7 +15,7 @@ static int int_cmp(int a, int b) #define ELEM_TYPE int #define COMPARE int_cmp -#include "baltree.h" +#include "gap/baltree.h" void ShowTree(intTree * btree) { @@ -84,7 +84,7 @@ void TestScapegoatTrees(void) #define ELEM_TYPE int #define COMPARE int_cmp -#include "dynarray.h" +#include "gap/dynarray.h" void ShowArray(intArray * arr) { diff --git a/tst/testlibgap/api.c b/tst/testlibgap/api.c index ab232cf4ca..f2f6cc81db 100644 --- a/tst/testlibgap/api.c +++ b/tst/testlibgap/api.c @@ -11,7 +11,6 @@ */ #include "common.h" -#include "intobj.h" #include @@ -100,7 +99,7 @@ void matrices(void) Obj mat, val, row, ret; mat = GAP_NewPlist(1); - val = INTOBJ_INT(42); + val = GAP_NewObjIntFromInt(42); assert(!GAP_IsMatrixOrMatrixObj(mat)); // empty list, not yet a matrix assert(!GAP_IsMatrixObj(mat)); @@ -113,8 +112,8 @@ void matrices(void) assert(!GAP_IsMatrix(val)); row = GAP_NewPlist(2); - GAP_AssList(row, 1, INTOBJ_INT(1)); - GAP_AssList(row, 2, INTOBJ_INT(2)); + GAP_AssList(row, 1, GAP_NewObjIntFromInt(1)); + GAP_AssList(row, 2, GAP_NewObjIntFromInt(2)); GAP_AssList(mat, 1, row); assert(!GAP_IsMatrixOrMatrixObj(row)); assert(!GAP_IsMatrixObj(row)); diff --git a/tst/testlibgap/trycatch.c b/tst/testlibgap/trycatch.c index 55dd1e781d..393bd298f7 100644 --- a/tst/testlibgap/trycatch.c +++ b/tst/testlibgap/trycatch.c @@ -1,7 +1,7 @@ /* * Small program to test libgap linkability and basic working */ -#include "trycatch.h" +#include "gap_all.h" #include "common.h" static int level = 0;