mirror of
				https://gitlab.gnome.org/GNOME/glib.git
				synced 2025-10-31 00:12:19 +01:00 
			
		
		
		
	glib/tests/keyfile.c: Use g_close()
Use g_close() instead, as close() is really found in io.h on Windows, not unistd.h as on Unix, and hence unistd.h is not universally available. https://bugzilla.gnome.org/show_bug.cgi?id=719344
This commit is contained in:
		| @@ -3,7 +3,6 @@ | ||||
| #include <locale.h> | ||||
| #include <string.h> | ||||
| #include <stdlib.h> | ||||
| #include <unistd.h> | ||||
|  | ||||
| static GKeyFile * | ||||
| load_data (const gchar   *data, | ||||
| @@ -1381,7 +1380,9 @@ test_save (void) | ||||
|   file = g_strdup ("key_file_XXXXXX"); | ||||
|   fd = g_mkstemp (file); | ||||
|   g_assert (fd != -1); | ||||
|   close (fd); | ||||
|   ok = g_close (fd, &error); | ||||
|   g_assert (ok); | ||||
|   g_assert_no_error (error); | ||||
|   ok = g_key_file_save_to_file (kf, file, &error); | ||||
|   g_assert (ok); | ||||
|   g_assert_no_error (error); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user