From fed30a84c78995d0800db7b98b0807a97ebabbf0 Mon Sep 17 00:00:00 2001 From: Emmanuel Bertin Date: Fri, 11 Oct 2024 16:27:26 +0200 Subject: [PATCH 1/2] Fix issues reported by user ryandesign. --- configure.ac | 2 +- src/fits/fitscat.c | 10 ++++------ src/fits/fitswrite.c | 12 +++++------- 3 files changed, 10 insertions(+), 14 deletions(-) diff --git a/configure.ac b/configure.ac index 07e1b37..cf0601e 100644 --- a/configure.ac +++ b/configure.ac @@ -31,7 +31,7 @@ define([AC_CACHE_LOAD],) define([AC_CACHE_SAVE],) # This is your standard AstrOmatic source code... -AC_INIT([SExtractor],[2.28.0],[astromatic@astromatic.iap.fr], +AC_INIT([SExtractor],[2.28.1],[astromatic@astromatic.iap.fr], [sextractor],[http://astromatic.net/software/sextractor]) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_AUX_DIR(autoconf) diff --git a/src/fits/fitscat.c b/src/fits/fitscat.c index efe9a0c..dac7757 100644 --- a/src/fits/fitscat.c +++ b/src/fits/fitscat.c @@ -7,7 +7,7 @@ * * This file part of: AstrOmatic FITS/LDAC library * -* Copyright: (C) 1995-2023 CFHT/IAP/CNRS/SorbonneU +* Copyright: (C) 1995-2024 CEA/AIM/UParisSaclay * * License: GNU General Public License * @@ -23,8 +23,6 @@ * along with AstrOmatic software. * If not, see . * -* Last modified: 25/02/2023 -* *%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ #ifdef HAVE_CONFIG_H @@ -176,8 +174,8 @@ PURPOSE Close a file previously opened by cfitsio INPUT fitsfile structure. OUTPUT RETURN_OK if everything went as expected (exit in error otherwise). NOTES the fitsfile pointer is set to NULL; -AUTHOR E. Bertin (CFHT/IAP/CNRS/SorbonneU) -VERSION 25/02/2023 +AUTHOR E. Bertin (CEA/AIM/UParisSaclay) +VERSION 11/10/2024 ***/ int close_cfitsio(catstruct *cat) { @@ -190,7 +188,7 @@ int close_cfitsio(catstruct *cat) { cat->filename); } else { // Successfully closed FITS file with cfitsio - cat->infptr == NULL; + cat->infptr = NULL; // Free random seed in CFITSIO. QFREE(fits_rand_value); } diff --git a/src/fits/fitswrite.c b/src/fits/fitswrite.c index 6cda309..7727515 100644 --- a/src/fits/fitswrite.c +++ b/src/fits/fitswrite.c @@ -7,7 +7,7 @@ * * This file part of: AstrOmatic FITS/LDAC library * -* Copyright: (C) 1995-2020 IAP/CNRS/SorbonneU +* Copyright: (C) 1995-2024 CEA/AIM/UParisSaclay * * License: GNU General Public License * @@ -23,8 +23,6 @@ * along with AstrOmatic software. * If not, see . * -* Last modified: 26/08/2020 -* *%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ #ifdef HAVE_CONFIG_H @@ -452,7 +450,7 @@ void print_obj(FILE *stream, tabstruct *tab) fprintf(stream, "F"); } else - fprintf(stream, key->printf?key->printf:"%d", (int)*ptr); + fprintf(stream, *key->printf?key->printf:"%d", (int)*ptr); if (i) putc(' ', stream); break; @@ -480,8 +478,8 @@ INPUT Output stream Table structure. OUTPUT -. NOTES -. -AUTHOR G. Tissier & E.Bertin (IAP) -VERSION 13/06/2012 +AUTHOR G. Tissier (IAP) & E.Bertin (CEA/AIM/UParisSaclay) +VERSION 11/10/2024 ***/ void voprint_obj(FILE *stream, tabstruct *tab) @@ -538,7 +536,7 @@ void voprint_obj(FILE *stream, tabstruct *tab) fprintf(stream, "F"); } else - fprintf(stream, key->printf?key->printf:"%d", (int)*ptr); + fprintf(stream, *key->printf?key->printf:"%d", (int)*ptr); if (i) putc(' ', stream); break; From ce96b568fc444cecd8019cb6852cccbc1fdf1d28 Mon Sep 17 00:00:00 2001 From: Emmanuel Bertin Date: Wed, 18 Dec 2024 12:19:53 +0100 Subject: [PATCH 2/2] Fix build issue with --enable-threads option. --- configure.ac | 10 +++++----- src/fft.c | 6 ++++-- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/configure.ac b/configure.ac index cf0601e..7bebffe 100644 --- a/configure.ac +++ b/configure.ac @@ -7,7 +7,9 @@ # # This file part of: SExtractor # -# Copyright: (C) 2002-2023 CFHT/IAP/CNRS/SorbonneU +# Copyright: (C) 2002-2021 IAP/CNRS/SorbonneU +# (C) 2021-2023 CFHT/CNRS +# (C) 2023-2024 CEA/AIM/UParisSaclay # # License: GNU General Public License # @@ -22,7 +24,7 @@ # You should have received a copy of the GNU General Public License # along with SExtractor. If not, see . # -# Last modified: 07/03/2023 +# Last modified: 18/12/2024 # #%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -31,7 +33,7 @@ define([AC_CACHE_LOAD],) define([AC_CACHE_SAVE],) # This is your standard AstrOmatic source code... -AC_INIT([SExtractor],[2.28.1],[astromatic@astromatic.iap.fr], +AC_INIT([SExtractor],[2.28.2],[astromatic@astromatic.iap.fr], [sextractor],[http://astromatic.net/software/sextractor]) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_AUX_DIR(autoconf) @@ -246,8 +248,6 @@ AC_ARG_ENABLE(threads, fi, use_pthreads=yes ) -# Deactivate multithreading for now -use_pthreads="no" # Provide special option for profiling AC_MSG_CHECKING([for profiler mode]) diff --git a/src/fft.c b/src/fft.c index bbc2e99..6482202 100644 --- a/src/fft.c +++ b/src/fft.c @@ -7,7 +7,9 @@ * * This file part of: SExtractor * -* Copyright: (C) 2007-2017 IAP/CNRS/UPMC +# Copyright: (C) 2002-2021 IAP/CNRS/SorbonneU +# (C) 2021-2023 CFHT/CNRS +# (C) 2023-2024 CEA/AIM/UParisSaclay * * License: GNU General Public License * @@ -69,7 +71,7 @@ void fft_init(int nthreads) #ifdef USE_THREADS if (nthreads > 1) { - if (!fftw_init_threads()) + if (!fftwf_init_threads()) error(EXIT_FAILURE, "*Error*: thread initialization failed in ", "FFTW"); fftwf_plan_with_nthreads(prefs.nthreads); }