• R/O
  • SSH
  • HTTPS

cstl: コミット


コミットメタ情報

リビジョン393 (tree)
日時2010-07-14 20:40:53
作者katono

ログメッセージ

#defineが重複するのを修正。

変更サマリ

差分

--- branches/try-vfunc/test/cstlgen.sh (revision 392)
+++ branches/try-vfunc/test/cstlgen.sh (revision 393)
@@ -372,7 +372,7 @@
372372 #define $included
373373 " >> "$path"".h"
374374 echo "#include <stddef.h>" >> "$path"".h"
375-echo "#include \"../cstl/common.h\"" >> "$path"".h"
375+echo "#include <cstl/common.h>" >> "$path"".h"
376376 if [ "$include_file" != "" ]; then
377377 echo "#include \"$include_file\"
378378 " >> "$path"".h"
@@ -469,28 +469,9 @@
469469 if [ $lower = "list" ]; then
470470 echo "\
471471 #if !defined(NDEBUG) && defined(CSTL_DEBUG)
472-#include <assert.h>
473472 #define CSTL_MAGIC_LIST(Name) ((Name *) -1)
474-#define CSTL_MAGIC(x) x
475-#define CSTL_ASSERT(x) assert(x)
476-#else
477-#define CSTL_MAGIC(x)
478-#define CSTL_ASSERT(x)
479473 #endif
480-#define CSTL_UNUSED_PARAM(x) (void) x
481474 " >> "$path"".c"
482-else
483-echo "\
484-#if !defined(NDEBUG) && defined(CSTL_DEBUG)
485-#include <assert.h>
486-#define CSTL_MAGIC(x) x
487-#define CSTL_ASSERT(x) assert(x)
488-#else
489-#define CSTL_MAGIC(x)
490-#define CSTL_ASSERT(x)
491-#endif
492-#define CSTL_UNUSED_PARAM(x) (void) x
493-" >> "$path"".c"
494475 fi
495476 if [ "$alloc" != "" ]; then
496477 if [ "$alloc" = "gc" ]; then
@@ -554,9 +535,9 @@
554535
555536 # コンパイル確認
556537 if [ "$nocompile" = "" ]; then
557- gcc -Wall -ansi -pedantic-errors "$path"".c" -c -DCSTL_DEBUG
558- gcc -Wall -ansi -pedantic-errors "$path"".c" -c
559- g++ -Wall -ansi -pedantic-errors "$path"".c" -c -DCSTL_DEBUG
560- g++ -Wall -ansi -pedantic-errors "$path"".c" -c
538+ gcc -Wall -ansi -pedantic-errors -I.. "$path"".c" -c -DCSTL_DEBUG
539+ gcc -Wall -ansi -pedantic-errors -I.. "$path"".c" -c
540+ g++ -Wall -ansi -pedantic-errors -I.. "$path"".c" -c -DCSTL_DEBUG
541+ g++ -Wall -ansi -pedantic-errors -I.. "$path"".c" -c
561542 rm "$path"".o"
562543 fi
--- branches/try-vfunc/test/Makefile (revision 392)
+++ branches/try-vfunc/test/Makefile (revision 393)
@@ -1,7 +1,7 @@
11 CC=gcc
22 # MEMORY=-DPOOL_DEBUG -DMY_MALLOC
33 # CSTLGEN=-DCSTLGEN
4-CFLAGS=-Wall -g -DCSTL_DEBUG $(MEMORY) #-fprofile-arcs -ftest-coverage
4+CFLAGS=-Wall -I.. -g -DCSTL_DEBUG $(MEMORY) #-fprofile-arcs -ftest-coverage
55 ifneq ($(MEMORY),)
66 POOL="pool"
77 endif
旧リポジトリブラウザで表示