* lib/clean-temp.c: Include <stdint.h> instead of defining uintptr_t.
* lib/gl_array_list.c: Likewise.
* lib/gl_array_map.c: Likewise.
* lib/gl_array_set.c: Likewise.
* lib/gl_carray_list.c: Likewise.
* lib/gl_sublist.c: Likewise.
* lib/gl_avltreehash_list.c (uintptr_t): Remove definition.
* lib/gl_rbtreehash_list.c (uintptr_t): Likewise.
* lib/gl_hash_map.c (uintptr_t): Likewise.
* lib/gl_hash_set.c (uintptr_t): Likewise.
* lib/gl_linkedhash_list.c (uintptr_t): Likewise.
* lib/gl_linkedhash_map.c (uintptr_t): Likewise.
* lib/gl_linkedhash_set.c (uintptr_t): Likewise.
* lib/iconv.c (uintptr_t): Likewise.
* lib/iconv_close.c (uintptr_t): Likewise.
* tests/test-lock.c: Include <stdint.h>.
(once_contender_thread, test_once): Cast through 'intptr_t' instead of
'long'.
* modules/clean-temp (Depends-on): Add stdint.
* modules/array-list (Depends-on): Likewise.
* modules/array-map (Depends-on): Likewise.
* modules/array-set (Depends-on): Likewise.
* modules/carray-list (Depends-on): Likewise.
* modules/sublist (Depends-on): Likewise.
* modules/lock-tests (Depends-on): Likewise.
+2019-04-27 Bruno Haible <bruno@clisp.org>
+
+ Fix gcc warnings on 64-bit mode mingw.
+ * lib/clean-temp.c: Include <stdint.h> instead of defining uintptr_t.
+ * lib/gl_array_list.c: Likewise.
+ * lib/gl_array_map.c: Likewise.
+ * lib/gl_array_set.c: Likewise.
+ * lib/gl_carray_list.c: Likewise.
+ * lib/gl_sublist.c: Likewise.
+ * lib/gl_avltreehash_list.c (uintptr_t): Remove definition.
+ * lib/gl_rbtreehash_list.c (uintptr_t): Likewise.
+ * lib/gl_hash_map.c (uintptr_t): Likewise.
+ * lib/gl_hash_set.c (uintptr_t): Likewise.
+ * lib/gl_linkedhash_list.c (uintptr_t): Likewise.
+ * lib/gl_linkedhash_map.c (uintptr_t): Likewise.
+ * lib/gl_linkedhash_set.c (uintptr_t): Likewise.
+ * lib/iconv.c (uintptr_t): Likewise.
+ * lib/iconv_close.c (uintptr_t): Likewise.
+ * tests/test-lock.c: Include <stdint.h>.
+ (once_contender_thread, test_once): Cast through 'intptr_t' instead of
+ 'long'.
+ * modules/clean-temp (Depends-on): Add stdint.
+ * modules/array-list (Depends-on): Likewise.
+ * modules/array-map (Depends-on): Likewise.
+ * modules/array-set (Depends-on): Likewise.
+ * modules/carray-list (Depends-on): Likewise.
+ * modules/sublist (Depends-on): Likewise.
+ * modules/lock-tests (Depends-on): Likewise.
+
2019-04-27 Bruno Haible <bruno@clisp.org>
error: Tweak indentation.
#include <fcntl.h>
#include <limits.h>
#include <stdbool.h>
+#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
# define PATH_MAX 1024
#endif
-#ifndef uintptr_t
-# define uintptr_t unsigned long
-#endif
-
/* The use of 'volatile' in the types below (and ISO C 99 section 5.1.2.3.(5))
ensure that while constructing or modifying the data structures, the field
/* Specification. */
#include "gl_array_list.h"
+#include <stdint.h>
#include <stdlib.h>
/* Get memcpy. */
#include <string.h>
/* Checked size_t computations. */
#include "xsize.h"
-#ifndef uintptr_t
-# define uintptr_t unsigned long
-#endif
-
/* -------------------------- gl_list_t Data Type -------------------------- */
/* Concrete gl_list_impl type, valid for this file only. */
/* Specification. */
#include "gl_array_map.h"
+#include <stdint.h>
#include <stdlib.h>
/* Checked size_t computations. */
#include "xsize.h"
-#ifndef uintptr_t
-# define uintptr_t unsigned long
-#endif
-
/* --------------------------- gl_map_t Data Type --------------------------- */
struct pair
/* Specification. */
#include "gl_array_set.h"
+#include <stdint.h>
#include <stdlib.h>
/* Checked size_t computations. */
#include "xsize.h"
-#ifndef uintptr_t
-# define uintptr_t unsigned long
-#endif
-
/* --------------------------- gl_set_t Data Type --------------------------- */
/* Concrete gl_set_impl type, valid for this file only. */
/* Specification. */
#include "gl_avltreehash_list.h"
-#include <stdint.h> /* for SIZE_MAX */
+#include <stdint.h> /* for uintptr_t, SIZE_MAX */
#include <stdlib.h>
#include "gl_avltree_oset.h"
#include "xsize.h"
-#ifndef uintptr_t
-# define uintptr_t unsigned long
-#endif
-
#define WITH_HASHTABLE 1
/* Which kind of binary trees to use for ordered sets. Quite arbitrary. */
/* Specification. */
#include "gl_carray_list.h"
+#include <stdint.h>
#include <stdlib.h>
/* Get memcpy. */
#include <string.h>
/* Checked size_t computations. */
#include "xsize.h"
-#ifndef uintptr_t
-# define uintptr_t unsigned long
-#endif
-
/* -------------------------- gl_list_t Data Type -------------------------- */
/* Concrete gl_list_impl type, valid for this file only. */
/* Specification. */
#include "gl_hash_map.h"
-#include <stdint.h> /* for SIZE_MAX */
+#include <stdint.h> /* for uintptr_t, SIZE_MAX */
#include <stdlib.h>
#include "xsize.h"
-#ifndef uintptr_t
-# define uintptr_t unsigned long
-#endif
-
/* --------------------------- gl_map_t Data Type --------------------------- */
#include "gl_anyhash1.h"
/* Specification. */
#include "gl_hash_set.h"
-#include <stdint.h> /* for SIZE_MAX */
+#include <stdint.h> /* for uintptr_t, SIZE_MAX */
#include <stdlib.h>
#include "xsize.h"
-#ifndef uintptr_t
-# define uintptr_t unsigned long
-#endif
-
/* --------------------------- gl_set_t Data Type --------------------------- */
#include "gl_anyhash1.h"
/* Specification. */
#include "gl_linkedhash_list.h"
-#include <stdint.h> /* for SIZE_MAX */
+#include <stdint.h> /* for uintptr_t, SIZE_MAX */
#include <stdlib.h>
#include "xsize.h"
-#ifndef uintptr_t
-# define uintptr_t unsigned long
-#endif
-
#define WITH_HASHTABLE 1
/* -------------------------- gl_list_t Data Type -------------------------- */
/* Specification. */
#include "gl_linkedhash_map.h"
-#include <stdint.h> /* for SIZE_MAX */
+#include <stdint.h> /* for uintptr_t, SIZE_MAX */
#include <stdlib.h>
#include "xsize.h"
-#ifndef uintptr_t
-# define uintptr_t unsigned long
-#endif
-
/* --------------------------- gl_map_t Data Type --------------------------- */
#include "gl_anyhash1.h"
/* Specification. */
#include "gl_linkedhash_set.h"
-#include <stdint.h> /* for SIZE_MAX */
+#include <stdint.h> /* for uintptr_t, SIZE_MAX */
#include <stdlib.h>
#include "xsize.h"
-#ifndef uintptr_t
-# define uintptr_t unsigned long
-#endif
-
/* --------------------------- gl_set_t Data Type --------------------------- */
#include "gl_anyhash1.h"
/* Specification. */
#include "gl_rbtreehash_list.h"
-#include <stdint.h> /* for SIZE_MAX */
+#include <stdint.h> /* for uintptr_t, SIZE_MAX */
#include <stdlib.h>
#include "gl_rbtree_oset.h"
#include "xsize.h"
-#ifndef uintptr_t
-# define uintptr_t unsigned long
-#endif
-
#define WITH_HASHTABLE 1
/* Which kind of binary trees to use for ordered sets. Quite arbitrary. */
/* Specification. */
#include "gl_sublist.h"
+#include <stdint.h>
#include <stdlib.h>
-#ifndef uintptr_t
-# define uintptr_t unsigned long
-#endif
-
/* -------------------------- gl_list_t Data Type -------------------------- */
/* Concrete gl_list_impl type, valid for this file only. */
# include <stdint.h>
# include <stdlib.h>
# include "unistr.h"
-# ifndef uintptr_t
-# define uintptr_t unsigned long
-# endif
#endif
#if REPLACE_ICONV_UTF
#include <iconv.h>
#include <stdint.h>
-#ifndef uintptr_t
-# define uintptr_t unsigned long
-#endif
int
rpl_iconv_close (iconv_t cd)
Depends-on:
list
+stdint
xsize
configure.ac:
Depends-on:
map
+stdint
xsize
configure.ac:
Depends-on:
set
+stdint
xsize
configure.ac:
Depends-on:
list
+stdint
xsize
configure.ac:
Depends-on:
stdbool
+stdint
unistd
error
fatal-signal
Depends-on:
thread
+stdint
usleep
yield
Depends-on:
list
+stdint
configure.ac:
an "OK" result even without ENABLE_LOCKING (on Linux/x86). */
#define REPEAT_COUNT 50000
+#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
static void *
once_contender_thread (void *arg)
{
- int id = (int) (long) arg;
+ int id = (int) (intptr_t) arg;
int repeat;
for (repeat = 0; repeat <= REPEAT_COUNT; repeat++)
/* Spawn the threads. */
for (i = 0; i < THREAD_COUNT; i++)
- threads[i] = gl_thread_create (once_contender_thread, (void *) (long) i);
+ threads[i] =
+ gl_thread_create (once_contender_thread, (void *) (intptr_t) i);
for (repeat = 0; repeat <= REPEAT_COUNT; repeat++)
{