Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
2 changes: 1 addition & 1 deletion CMake/cmake_config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#cmakedefine01 FLINT_USES_FENV

#define FLINT_TMPPATH "@FLINT_TMPPATH@"
#define FLINT_TMPDIR "@FLINT_TMPDIR@"

#ifdef _MSC_VER
#define access _access
Expand Down
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/qsieve/factor.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
2 changes: 1 addition & 1 deletion src/qsieve/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

Expand Down