Skip to content

Commit

Permalink
Improved wisdown handling in ncm_cfg.
Browse files Browse the repository at this point in the history
  • Loading branch information
vitenti committed Mar 30, 2023
1 parent bd677fc commit eccf514
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions numcosmo/math/ncm_cfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -1790,7 +1790,13 @@ ncm_cfg_save_fftw_wisdom (const gchar *filename, ...)
gssize len = strlen (wisdown_str);
gboolean OK = FALSE;

#if GLIB_CHECK_VERSION (2, 66, 0)
OK = g_file_set_contents_full (full_filename, wisdown_str, len,
G_FILE_SET_CONTENTS_CONSISTENT,
0666, NULL);
#else /* GLIB_CHECK_VERSION (2, 66, 0) */
OK = g_file_set_contents (full_filename, wisdown_str, len, NULL);
#endif /* GLIB_CHECK_VERSION (2, 66, 0) */
g_assert (OK);

g_free (wisdown_str);
Expand All @@ -1808,7 +1814,14 @@ ncm_cfg_save_fftw_wisdom (const gchar *filename, ...)
gssize len = strlen (wisdown_str);
gboolean OK = FALSE;

#if GLIB_CHECK_VERSION (2, 66, 0)
OK = g_file_set_contents_full (full_filename, wisdown_str, len,
G_FILE_SET_CONTENTS_CONSISTENT,
0666, NULL);
#else /* GLIB_CHECK_VERSION (2, 66, 0) */
OK = g_file_set_contents (full_filename, wisdown_str, len, NULL);
#endif /* GLIB_CHECK_VERSION (2, 66, 0) */

g_assert (OK);

g_free (wisdown_str);
Expand Down

0 comments on commit eccf514

Please sign in to comment.