aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDuncaen <mail@duncano.de>2018-03-21 00:24:40 +0100
committerDuncaen <mail@duncano.de>2018-03-21 00:27:14 +0100
commit2c348c94fd2bec34f39dc04a22b1913d32dae7c7 (patch)
treefa71d6e43734370a120288df902296ec047aa04e
parentb8a3ef7640a4f9f569a69f7cf1f74624af6eec1f (diff)
downloadlobase-2c348c94fd2bec34f39dc04a22b1913d32dae7c7.tar.gz
lib,bin,usr.bin: define _GNU_SOURCE for reallocarray in files where missing
-rw-r--r--bin/ed/glbl.c1
-rw-r--r--bin/ed/undo.c1
-rw-r--r--lib/libopenbsd/compat/fgetwln.c2
-rw-r--r--lib/libopenbsd/gen/fts.c1
-rw-r--r--lib/libopenbsd/gen/glob.c1
-rw-r--r--lib/libopenbsd/gen/setmode.c2
-rw-r--r--lib/libopenbsd/gen/vis.c1
-rw-r--r--lib/libopenbsd/regex/regcomp.c1
-rw-r--r--lib/libopenbsd/regex/regexec.c1
-rw-r--r--usr.bin/awk/b.c1
-rw-r--r--usr.bin/awk/run.c1
-rw-r--r--usr.bin/bc/bc.y6
-rw-r--r--usr.bin/col/col.c1
-rw-r--r--usr.bin/column/column.c2
-rw-r--r--usr.bin/compress/main.c1
-rw-r--r--usr.bin/dc/bcode.c1
-rw-r--r--usr.bin/dc/mem.c1
17 files changed, 17 insertions, 8 deletions
diff --git a/bin/ed/glbl.c b/bin/ed/glbl.c
index 27ebc0c..8d02344 100644
--- a/bin/ed/glbl.c
+++ b/bin/ed/glbl.c
@@ -29,6 +29,7 @@
* SUCH DAMAGE.
*/
+#define _GNU_SOURCE /* for reallocarray */
#include <sys/ioctl.h>
#include <sys/wait.h>
diff --git a/bin/ed/undo.c b/bin/ed/undo.c
index 4291be0..0acdd37 100644
--- a/bin/ed/undo.c
+++ b/bin/ed/undo.c
@@ -28,6 +28,7 @@
* SUCH DAMAGE.
*/
+#define _GNU_SOURCE /* for reallocarray */
#include <regex.h>
#include <signal.h>
#include <stdio.h>
diff --git a/lib/libopenbsd/compat/fgetwln.c b/lib/libopenbsd/compat/fgetwln.c
index 166c93d..c4f3425 100644
--- a/lib/libopenbsd/compat/fgetwln.c
+++ b/lib/libopenbsd/compat/fgetwln.c
@@ -24,7 +24,7 @@
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#define _GNU_SOURCE
+#define _GNU_SOURCE /* for reallocarry */
#include <stdlib.h>
#include <stdio.h>
#include <wchar.h>
diff --git a/lib/libopenbsd/gen/fts.c b/lib/libopenbsd/gen/fts.c
index 125a37f..12b9b5c 100644
--- a/lib/libopenbsd/gen/fts.c
+++ b/lib/libopenbsd/gen/fts.c
@@ -29,6 +29,7 @@
* SUCH DAMAGE.
*/
+#define _GNU_SOURCE /* for reallocarray */
#include <sys/param.h> /* ALIGN */
#include <sys/stat.h>
diff --git a/lib/libopenbsd/gen/glob.c b/lib/libopenbsd/gen/glob.c
index dafae84..44df0b2 100644
--- a/lib/libopenbsd/gen/glob.c
+++ b/lib/libopenbsd/gen/glob.c
@@ -56,6 +56,7 @@
* Number of matches in the current invocation of glob.
*/
+#define _GNU_SOURCE /* for reallocarray */
#include <sys/stat.h>
#include <ctype.h>
diff --git a/lib/libopenbsd/gen/setmode.c b/lib/libopenbsd/gen/setmode.c
index ce241d2..b9b1119 100644
--- a/lib/libopenbsd/gen/setmode.c
+++ b/lib/libopenbsd/gen/setmode.c
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
-
+#define _GNU_SOURCE /* for reallocarray */
#include <sys/types.h>
#include <sys/stat.h>
diff --git a/lib/libopenbsd/gen/vis.c b/lib/libopenbsd/gen/vis.c
index 4400c7b..c72f5af 100644
--- a/lib/libopenbsd/gen/vis.c
+++ b/lib/libopenbsd/gen/vis.c
@@ -28,6 +28,7 @@
* SUCH DAMAGE.
*/
+#define _GNU_SOURCE /* for reallocarray */
#include <sys/types.h>
#include <errno.h>
#include <ctype.h>
diff --git a/lib/libopenbsd/regex/regcomp.c b/lib/libopenbsd/regex/regcomp.c
index 19c86cc..41b0e68 100644
--- a/lib/libopenbsd/regex/regcomp.c
+++ b/lib/libopenbsd/regex/regcomp.c
@@ -34,6 +34,7 @@
* @(#)regcomp.c 8.5 (Berkeley) 3/20/94
*/
+#define _GNU_SOURCE /* for reallocarray */
#include <sys/types.h>
#include <stdio.h>
#include <string.h>
diff --git a/lib/libopenbsd/regex/regexec.c b/lib/libopenbsd/regex/regexec.c
index ed6a4b8..bb5d032 100644
--- a/lib/libopenbsd/regex/regexec.c
+++ b/lib/libopenbsd/regex/regexec.c
@@ -41,6 +41,7 @@
* macros that code uses. This lets the same code operate on two different
* representations for state sets.
*/
+#define _GNU_SOURCE /* for reallocarray */
#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
diff --git a/usr.bin/awk/b.c b/usr.bin/awk/b.c
index cfc0a57..a3a8380 100644
--- a/usr.bin/awk/b.c
+++ b/usr.bin/awk/b.c
@@ -27,6 +27,7 @@ THIS SOFTWARE.
#define DEBUG
+#define _GNU_SOURCE /* for reallocarray */
#include <ctype.h>
#include <stdio.h>
#include <string.h>
diff --git a/usr.bin/awk/run.c b/usr.bin/awk/run.c
index 17dcf0c..01d03ae 100644
--- a/usr.bin/awk/run.c
+++ b/usr.bin/awk/run.c
@@ -24,6 +24,7 @@ THIS SOFTWARE.
****************************************************************/
#define DEBUG
+#define _GNU_SOURCE /* for reallocarray */
#include <stdio.h>
#include <ctype.h>
#include <setjmp.h>
diff --git a/usr.bin/bc/bc.y b/usr.bin/bc/bc.y
index 4b96b09..b820fc6 100644
--- a/usr.bin/bc/bc.y
+++ b/usr.bin/bc/bc.y
@@ -29,11 +29,7 @@
* the same as the code generated by the older version, to provide
* easy regression testing.
*/
-#if defined(__linux__)
-# if !defined(_GNU_SOURCE)
-# define _GNU_SOURCE
-# endif
-#endif
+#define _GNU_SOURCE /* for reallocarry, asprintf */
#include <sys/types.h>
#include <sys/wait.h>
diff --git a/usr.bin/col/col.c b/usr.bin/col/col.c
index c3c51b4..d5df738 100644
--- a/usr.bin/col/col.c
+++ b/usr.bin/col/col.c
@@ -33,6 +33,7 @@
* SUCH DAMAGE.
*/
+#define _GNU_SOURCE /* for reallocarray */
#include <ctype.h>
#include <err.h>
#include <string.h>
diff --git a/usr.bin/column/column.c b/usr.bin/column/column.c
index 0a327a1..105836e 100644
--- a/usr.bin/column/column.c
+++ b/usr.bin/column/column.c
@@ -30,7 +30,7 @@
* SUCH DAMAGE.
*/
-#define _GNU_SOURCE
+#define _GNU_SOURCE /* for reallocarray */
#include <sys/types.h>
#include <sys/ioctl.h>
diff --git a/usr.bin/compress/main.c b/usr.bin/compress/main.c
index 9152b31..fad7846 100644
--- a/usr.bin/compress/main.c
+++ b/usr.bin/compress/main.c
@@ -30,6 +30,7 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
+#define _GNU_SOURCE /* for reallocarray */
#include <sys/time.h>
#include <sys/stat.h>
diff --git a/usr.bin/dc/bcode.c b/usr.bin/dc/bcode.c
index 04f40a9..3641acf 100644
--- a/usr.bin/dc/bcode.c
+++ b/usr.bin/dc/bcode.c
@@ -16,6 +16,7 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+#define _GNU_SOURCE /* for reallocarray */
#include <err.h>
#include <limits.h>
#include <signal.h>
diff --git a/usr.bin/dc/mem.c b/usr.bin/dc/mem.c
index 2fc83d2..345fee5 100644
--- a/usr.bin/dc/mem.c
+++ b/usr.bin/dc/mem.c
@@ -16,6 +16,7 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+#define _GNU_SOURCE /* for reallocarray */
#include <openssl/err.h>
#include <err.h>