projects
/
sort-networks.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Request X/Open 7 rather than declaring strdup ourselves.
[sort-networks.git]
/
src
/
sn-evolution.c
diff --git
a/src/sn-evolution.c
b/src/sn-evolution.c
index
d1b74fe
..
8774f4a
100644
(file)
--- a/
src/sn-evolution.c
+++ b/
src/sn-evolution.c
@@
-1,5
+1,5
@@
/**
/**
- *
collectd
- src/sn-evolution.c
+ *
libsortnetwork
- src/sn-evolution.c
* Copyright (C) 2008-2010 Florian octo Forster
*
* This program is free software; you can redistribute it and/or modify it
* Copyright (C) 2008-2010 Florian octo Forster
*
* This program is free software; you can redistribute it and/or modify it
@@
-23,7
+23,10
@@
# define _ISOC99_SOURCE
#endif
#ifndef _POSIX_C_SOURCE
# define _ISOC99_SOURCE
#endif
#ifndef _POSIX_C_SOURCE
-# define _POSIX_C_SOURCE 200112L
+# define _POSIX_C_SOURCE 200809L
+#endif
+#ifndef _XOPEN_SOURCE
+# define _XOPEN_SOURCE 700
#endif
#include <stdlib.h>
#endif
#include <stdlib.h>
@@
-50,10
+53,6
@@
# define __attribute__(x) /**/
#endif
# define __attribute__(x) /**/
#endif
-/* Yes, this is ugly, but the GNU libc doesn't export it with the above flags.
- * */
-char *strdup (const char *s);
-
static uint64_t iteration_counter = 0;
static int inputs_num = 16;
static int inputs_num_is_power_of_two = 1;
static uint64_t iteration_counter = 0;
static int inputs_num = 16;
static int inputs_num_is_power_of_two = 1;
@@
-229,7
+228,7
@@
static int create_offspring (void)
assert (p1 != NULL);
/* combine the two parents */
assert (p1 != NULL);
/* combine the two parents */
- n = sn_network_combine (p0, p1
, inputs_num_is_power_of_two
);
+ n = sn_network_combine (p0, p1);
sn_network_destroy (p0);
sn_network_destroy (p1);
sn_network_destroy (p0);
sn_network_destroy (p1);