[Ttssh2-commit] [4846] CygTerm:

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2012年 2月 29日 (水) 19:16:17 JST


Revision: 4846
          http://sourceforge.jp/projects/ttssh2/svn/view?view=rev&revision=4846
Author:   yutakapon
Date:     2012-02-29 19:16:17 +0900 (Wed, 29 Feb 2012)
Log Message:
-----------
CygTerm:
 - gcc4でコンパイルできるようにした。
 - mktemp()セキュリティ警告対策

Modified Paths:
--------------
    trunk/cygterm/Makefile
    trunk/cygterm/cygterm.cc

-------------- next part --------------
Modified: trunk/cygterm/Makefile
===================================================================
--- trunk/cygterm/Makefile	2012-02-28 21:24:41 UTC (rev 4845)
+++ trunk/cygterm/Makefile	2012-02-29 10:16:17 UTC (rev 4846)
@@ -30,7 +30,9 @@
 	strip $(EXE)
 
 $(LAUNCH) : $(LAUNCH_SRC) $(RES)
-	$(CC) $(CFLAGS) $(LDFLAGS) -mno-cygwin -o $(LAUNCH) $(LAUNCH_SRC) $(RES)
+	( $(CC) $(CFLAGS) $(LDFLAGS) -mno-cygwin -o $(LAUNCH) $(LAUNCH_SRC) $(RES) ) || \
+	( gcc-3 $(CFLAGS) $(LDFLAGS) -mno-cygwin -o $(LAUNCH) $(LAUNCH_SRC) $(RES) ) || \
+	( i686-w64-mingw32-gcc $(CFLAGS) $(LDFLAGS) -mno-cygwin -o $(LAUNCH) $(LAUNCH_SRC) $(RES) ) 
 	strip $(LAUNCH)
 
 $(RC):

Modified: trunk/cygterm/cygterm.cc
===================================================================
--- trunk/cygterm/cygterm.cc	2012-02-28 21:24:41 UTC (rev 4845)
+++ trunk/cygterm/cygterm.cc	2012-02-29 10:16:17 UTC (rev 4846)
@@ -383,8 +383,8 @@
                 strcpy(dot, "rc");
             }
         }
-        mktemp(tmp_conf);
-        FILE* fp = fopen(tmp_conf, "w");
+        int fd = mkstemp(tmp_conf);
+        FILE* fp = fdopen(fd, "w");
         if (fp != NULL) {
             if (pw_ent != NULL) {
                 fprintf(fp, "ENV_1=USER=%s\n",  pw_ent->pw_name);



Ttssh2-commit メーリングリストの案内
Back to archive index