shithub: rgbds

Download patch

ref: 7d176245d824031a0d29bd295395ec0fe65f674c
parent: c65d58c5890c70ffa15054de4bef9c32d005a801
author: stag019 <[email protected]>
date: Mon Dec 23 09:40:53 EST 2013

Remove all implicit definitions of compiler provided functions.
<strings.h> cause strncasecmp to be define.

--- a/src/asm/lexer.c
+++ b/src/asm/lexer.c
@@ -1,6 +1,8 @@
+#define _XOPEN_SOURCE 500
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <strings.h>
 #include <ctype.h>
 
 #include "asm/asm.h"
--- a/src/asm/symbol.c
+++ b/src/asm/symbol.c
@@ -5,6 +5,7 @@
  *
  */
 
+#define _XOPEN_SOURCE 500
 #include <stdio.h>
 #include <string.h>
 #include <time.h>
--- a/src/asm/yaccprt1.y
+++ b/src/asm/yaccprt1.y
@@ -1,4 +1,5 @@
 %{
+#define _XOPEN_SOURCE 500
 #include <ctype.h>
 #include <errno.h>
 #include <stdbool.h>
@@ -5,6 +6,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <strings.h>
 
 #include "asm/symbol.h"
 #include "asm/asm.h"