diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index f2aa82f007..d049e96730 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -433,9 +433,9 @@ jobs: - name: "Configure" run: | ./bootstrap.sh - # We need to specify TMPPATH as we do not have write access to the + # We need to specify TMPDIR as we do not have write access to the # CI's /tmp directory. - ./configure CC=${CC} CFLAGS="${CFLAGS}" TMPPATH="." ${EXTRA_OPTIONS} + ./configure CC=${CC} CFLAGS="${CFLAGS}" TMPDIR="." ${EXTRA_OPTIONS} - name: "Compile" run: | diff --git a/CMake/cmake_config.h.in b/CMake/cmake_config.h.in index 3a212f49bf..b3767bb695 100644 --- a/CMake/cmake_config.h.in +++ b/CMake/cmake_config.h.in @@ -18,7 +18,7 @@ #cmakedefine01 FLINT_USES_FENV -#define FLINT_TMPPATH "@FLINT_TMPPATH@" +#define FLINT_TMPDIR "@FLINT_TMPDIR@" #ifdef _MSC_VER #define access _access diff --git a/CMakeLists.txt b/CMakeLists.txt index 3a13e63ec3..c3c67102fb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -55,10 +55,10 @@ if(CMAKE_BUILD_TYPE STREQUAL Debug) endif() # temporary directory -if(NOT DEFINED TMPPATH) - set(FLINT_TMPPATH "/tmp" CACHE STRING "Path to a directory meant for temporary files for host system (NOTE: Will probably become redundant in the future). Only relevant if host do not have read and write access to /tmp [default=/tmp].") +if(NOT DEFINED TMPDIR) + set(FLINT_TMPDIR "/tmp" CACHE STRING "Path to a directory meant for temporary files for host system. Only relevant if host do not have read and write access to /tmp [default=/tmp].") else() - set(FLINT_TMPPATH "${TMPPATH}" CACHE STRING "Path to a directory meant for temporary files for host system (NOTE: Will probably become redundant in the future). Only relevant if host do not have read and write access to /tmp [default=/tmp].") + set(FLINT_TMPDIR "${TMPDIR}" CACHE STRING "Path to a directory meant for temporary files for host system. Only relevant if host do not have read and write access to /tmp [default=/tmp].") endif() # pthread configuration diff --git a/configure.ac b/configure.ac index 8ca3fd5ed1..0932890e63 100644 --- a/configure.ac +++ b/configure.ac @@ -461,14 +461,14 @@ AC_ARG_VAR(ABI, [Desired ABI]) AC_ARG_VAR(LDCONFIG, [ldconfig tool]) -AC_ARG_VAR(TMPPATH, [Path to a directory meant for temporary files for host system (NOTE: Will probably become redundant in the future). Only relevant if host do not have read and write access to /tmp [default=/tmp].]) +AC_ARG_VAR(TMPDIR, [Specify directory meant for temporary files for host system. Only relevant if host do not have read and write access to /tmp [default=/tmp].]) -if test -z "$TMPPATH"; +if test -z "$TMPDIR"; then - TMPPATH="/tmp" + TMPDIR="/tmp" fi -AC_DEFINE_UNQUOTED([FLINT_TMPPATH], ["$TMPPATH"], [Define to set the default directory for temporary files]) +AC_DEFINE_UNQUOTED([FLINT_TMPDIR], ["$TMPDIR"], [Define to set the default directory for temporary files]) ################################################################################ # check programs and system diff --git a/src/qsieve/factor.c b/src/qsieve/factor.c index 32358d3457..38cd212afa 100644 --- a/src/qsieve/factor.c +++ b/src/qsieve/factor.c @@ -219,7 +219,7 @@ void qsieve_factor(fmpz_factor_t factors, const fmpz_t n) if (qs_inf->siqs == NULL) flint_throw(FLINT_ERROR, "fopen failed\n"); #else - strcpy(qs_inf->fname, FLINT_TMPPATH "/siqsXXXXXX"); + strcpy(qs_inf->fname, FLINT_TMPDIR "/siqsXXXXXX"); fd = mkstemp(qs_inf->fname); if (fd == -1) flint_throw(FLINT_ERROR, "mkstemp failed\n"); diff --git a/src/qsieve/init.c b/src/qsieve/init.c index 07bf00e6b6..269dff54e8 100644 --- a/src/qsieve/init.c +++ b/src/qsieve/init.c @@ -27,7 +27,7 @@ void qsieve_init(qs_t qs_inf, const fmpz_t n) #if (defined(__WIN32) && !defined(__CYGWIN__) && !defined(__MINGW32__) && !defined(__MINGW64__)) || defined(_MSC_VER) fname_alloc_size = MAX_PATH; #else - fname_alloc_size = sizeof(FLINT_TMPPATH "/siqsXXXXXX"); + fname_alloc_size = sizeof(FLINT_TMPDIR "/siqsXXXXXX"); #endif qs_inf->fname = (char *) flint_malloc(fname_alloc_size); /* space for filename */