OSDN Git Service

patch for building on mac with gcc-8
authorSHIRAKATA Kentaro <argrath@ub32.org>
Fri, 14 Jun 2019 07:34:36 +0000 (16:34 +0900)
committerSHIRAKATA Kentaro <argrath@ub32.org>
Sun, 16 Jun 2019 16:37:59 +0000 (01:37 +0900)
.travis.yml
include/tradstdc.h
japanese/set_mac.sh
sys/unix/hints/macosx10.10

index 378f858..4729f39 100644 (file)
@@ -7,6 +7,8 @@ os:
 compiler:
   - gcc
 
+osx_image: xcode10.2
+
 addons:
   apt:
     packages:
@@ -14,7 +16,7 @@ addons:
   homebrew:
     packages:
     - nkf
-    - gcc@5
+    - gcc@8
 
 before_script:
   - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then sh japanese/set_mac.sh ; fi
index 12a0d4a..979c7d3 100644 (file)
@@ -432,9 +432,11 @@ typedef genericptr genericptr_t; /* (void *) or (char *) */
 /* disable gcc's __attribute__((__warn_unused_result__)) since explicitly
    discarding the result by casting to (void) is not accepted as a 'use' */
 #define __warn_unused_result__ /*empty*/
+#ifndef MACOSX /*JP*//*\8dÅ\8bß\82ÌXCode\82Å\82Í\82±\82ê\82ª\8bó\82É\82È\82é\82Æ\83G\83\89\81[\82É\82È\82é*/
 #define warn_unused_result /*empty*/
 #endif
 #endif
+#endif
 
 #ifndef PRINTF_F
 #define PRINTF_F(f, v)
index 51c44ce..435b908 100644 (file)
@@ -1,3 +1,3 @@
-brew link --overwrite gcc@5
+brew link --overwrite gcc@8
 find . -type f -name '*.c' -or -name '*.h'|xargs -n1 nkf -Sw --cp932 --overwrite
 sh sys/unix/setup.sh sys/unix/hints/macosx10.10
index fcb68df..38e1317 100644 (file)
@@ -58,8 +58,8 @@ GAMEGRP  = games
 # build to run in the source tree - primarily for development.  Build with "make all"
 #WANT_SOURCE_INSTALL=1
 
-CC=gcc-5
-CFLAGS+=-fexec-charset=cp932 -Wno-comment -Wno-unused-parameter -Wno-overlength-strings
+CC=gcc-8
+CFLAGS+=-fexec-charset=cp932 -Wno-comment -Wno-unused-parameter -Wno-overlength-strings -Wno-format-overflow
 
 # At the moment this is just for debugging, but in the future it could be
 # useful for other things.  Requires SYSCF and an ANSI compiler.