diff options
author | kevlo <kevlo@FreeBSD.org> | 2000-11-22 07:53:56 +0000 |
---|---|---|
committer | kevlo <kevlo@FreeBSD.org> | 2000-11-22 07:53:56 +0000 |
commit | ed4aaf9cc94d8cb280125a3a08c8dc05034d9f38 (patch) | |
tree | aa34eb2519e0226c7024e20fd96e2ed896b2fae8 /x11/kdelibs2 | |
parent | c0b78ce2de35db30247f3aaf0a98578d371e1d89 (diff) | |
download | FreeBSD-ports-ed4aaf9cc94d8cb280125a3a08c8dc05034d9f38.zip FreeBSD-ports-ed4aaf9cc94d8cb280125a3a08c8dc05034d9f38.tar.gz |
- Fix tmpnam() issue
- Fix typo. mkstemps() -> mkstemp()
Diffstat (limited to 'x11/kdelibs2')
-rw-r--r-- | x11/kdelibs2/files/patch-kcharsets.cpp | 11 | ||||
-rw-r--r-- | x11/kdelibs2/files/patch-kdesu_stub.c | 84 | ||||
-rw-r--r-- | x11/kdelibs2/files/patch-midfile.cc | 2 |
3 files changed, 89 insertions, 8 deletions
diff --git a/x11/kdelibs2/files/patch-kcharsets.cpp b/x11/kdelibs2/files/patch-kcharsets.cpp index d54e999..9d31d51 100644 --- a/x11/kdelibs2/files/patch-kcharsets.cpp +++ b/x11/kdelibs2/files/patch-kcharsets.cpp @@ -1,5 +1,5 @@ ---- kdecore/kcharsets.cpp.orig Mon Nov 20 16:41:35 2000 -+++ kdecore/kcharsets.cpp Mon Nov 20 16:44:34 2000 +--- kdecore/kcharsets.cpp.orig Mon Oct 16 19:06:25 2000 ++++ kdecore/kcharsets.cpp Wed Nov 22 14:30:14 2000 @@ -66,7 +66,7 @@ "set-gbk", "set-zh", @@ -28,14 +28,11 @@ QFont::TSCII, QFont::Unicode, QFont::Unicode, -@@ -552,8 +552,9 @@ +@@ -552,6 +552,7 @@ case QFont::Set_Zh: return "set-gbk"; case QFont::Set_Zh_TW: + return "cns11643.1986-*"; case QFont::Set_Big5: -- return "big5-0"; -+ return "big5"; + return "big5-0"; case QFont::AnyCharSet: - default: - break; diff --git a/x11/kdelibs2/files/patch-kdesu_stub.c b/x11/kdelibs2/files/patch-kdesu_stub.c new file mode 100644 index 0000000..c538fce --- /dev/null +++ b/x11/kdelibs2/files/patch-kdesu_stub.c @@ -0,0 +1,84 @@ +--- kdesu/kdesu_stub.c.orig Wed Nov 22 10:10:17 2000 ++++ kdesu/kdesu_stub.c Wed Nov 22 10:31:12 2000 +@@ -276,9 +276,17 @@ + xsetenv("DISPLAY", params[P_DISPLAY].value); + if (params[P_DISPLAY_AUTH].value[0]) + { ++#ifdef HAVE_MKSTEMP ++ int fd; ++ strcpy(fname, "/tmp/kdesu.XXXXXXXX"); ++ fout = fdopen(fd, "w"); ++ fd = mkstemp(fname); ++ if (fd == -1 || fout == NULL) ++#else + fname = tmpnam(0L); + fout = fopen(fname, "w"); + if (!fout) ++#endif + { + perror("kdesu_stub: fopen()"); + exit(1); +@@ -286,7 +294,22 @@ + fprintf(fout, "add %s %s\n", params[P_DISPLAY].value, + params[P_DISPLAY_AUTH].value); + fclose(fout); ++#ifdef HAVE_MKSTEMP ++ strcpy(xauthority, "/tmp/xauth.XXXXXXXX"); ++ { ++ int fd; ++ fd = mkstemp(xauthority); ++ if (fd == -1) ++ { ++ perror("kdesu_stub: mkstemp()"); ++ exit(1); ++ } ++ else ++ close(fd); ++ } ++#else + tmpnam(xauthority); ++#endif + xsetenv("XAUTHORITY", xauthority); + sprintf(command, "xauth source %s >/dev/null 2>&1", fname); + if (system(command)) +@@ -305,9 +328,17 @@ + auth = xstrsep(params[P_ICE_AUTH].value); + if (host[0]) + { ++#ifdef HAVE_MKSTEMP ++ int fd; ++ strcpy(fname, "/tmp/kdesu.XXXXXXXX"); ++ fd = mkstemp(fname); ++ fout = fdopen(fd, "w"); ++ if (fd == -1 || fout == NULL) ++#else + fname = tmpnam(0L); + fout = fopen(fname, "w"); + if (!fout) ++#endif + { + perror("kdesu_stub: fopen()"); + exit(1); +@@ -318,7 +349,22 @@ + for (i=0; host[i]; i++) + fprintf(fout, "add DCOP \"\" %s %s\n", host[i], auth[i]); + fclose(fout); ++#ifdef HAVE_MKSTEMP ++ strcpy(iceauthority, "/tmp/iceauth.XXXXXXXX"); ++ { ++ int fd; ++ fd = mkstemp(iceauthority); ++ if (fd == -1) ++ { ++ perror("kdesu_stub: mkstemp()"); ++ exit(1); ++ } ++ else ++ close(fd); ++ } ++#else + tmpnam(iceauthority); ++#endif + xsetenv("ICEAUTHORITY", iceauthority); + sprintf(command, "iceauth source %s >/dev/null 2>&1", fname); + if (system(command)) diff --git a/x11/kdelibs2/files/patch-midfile.cc b/x11/kdelibs2/files/patch-midfile.cc index 44fcd6f..c0ff4ff 100644 --- a/x11/kdelibs2/files/patch-midfile.cc +++ b/x11/kdelibs2/files/patch-midfile.cc @@ -6,7 +6,7 @@ } +#ifdef HAVE_MKSTEMP + strcpy(tmpname,"/tmp/KMid.XXXXXXXX"); -+ int fd=mkstemps(tmpname); ++ int fd=mkstemp(tmpname); + if (fd<0) + { + pclose(infile); |