Same as in patch patch-registry+source+registry.cxx

This part was just wrong. mkstemp does return a file descriptor,
not a string. This could lead to crashes. MacOS will have the same
problems.
This commit is contained in:
Martin Blapp 2003-04-03 22:17:17 +00:00
parent 98853485fa
commit c163578692
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=78066
17 changed files with 238 additions and 0 deletions

View File

@ -0,0 +1,14 @@
--- ../codemaker/source/codemaker/global.cxx.orig Fri Apr 4 00:14:50 2003
+++ ../codemaker/source/codemaker/global.cxx Fri Apr 4 00:14:53 2003
@@ -164,11 +164,7 @@
strncat(tmpPattern, "/", sizeof(tmpPattern)-1-strlen(tmpPattern));
strncat(tmpPattern, pPrefix, sizeof(tmpPattern)-1-strlen(tmpPattern));
strncat(tmpPattern, "XXXXXX", sizeof(tmpPattern)-1-strlen(tmpPattern));
-#if defined(FREEBSD) || defined(MACOSX)
- pTmpName = mkstemp(tmpPattern);
-#else
pTmpName = mktemp(tmpPattern);
-#endif
#endif
return OString(pTmpName);

View File

@ -0,0 +1,14 @@
--- ../codemaker/source/codemaker/global.cxx.orig Fri Apr 4 00:14:50 2003
+++ ../codemaker/source/codemaker/global.cxx Fri Apr 4 00:14:53 2003
@@ -164,11 +164,7 @@
strncat(tmpPattern, "/", sizeof(tmpPattern)-1-strlen(tmpPattern));
strncat(tmpPattern, pPrefix, sizeof(tmpPattern)-1-strlen(tmpPattern));
strncat(tmpPattern, "XXXXXX", sizeof(tmpPattern)-1-strlen(tmpPattern));
-#if defined(FREEBSD) || defined(MACOSX)
- pTmpName = mkstemp(tmpPattern);
-#else
pTmpName = mktemp(tmpPattern);
-#endif
#endif
return OString(pTmpName);

View File

@ -0,0 +1,14 @@
--- ../codemaker/source/codemaker/global.cxx.orig Fri Apr 4 00:14:50 2003
+++ ../codemaker/source/codemaker/global.cxx Fri Apr 4 00:14:53 2003
@@ -164,11 +164,7 @@
strncat(tmpPattern, "/", sizeof(tmpPattern)-1-strlen(tmpPattern));
strncat(tmpPattern, pPrefix, sizeof(tmpPattern)-1-strlen(tmpPattern));
strncat(tmpPattern, "XXXXXX", sizeof(tmpPattern)-1-strlen(tmpPattern));
-#if defined(FREEBSD) || defined(MACOSX)
- pTmpName = mkstemp(tmpPattern);
-#else
pTmpName = mktemp(tmpPattern);
-#endif
#endif
return OString(pTmpName);

View File

@ -0,0 +1,14 @@
--- ../codemaker/source/codemaker/global.cxx.orig Fri Apr 4 00:14:50 2003
+++ ../codemaker/source/codemaker/global.cxx Fri Apr 4 00:14:53 2003
@@ -164,11 +164,7 @@
strncat(tmpPattern, "/", sizeof(tmpPattern)-1-strlen(tmpPattern));
strncat(tmpPattern, pPrefix, sizeof(tmpPattern)-1-strlen(tmpPattern));
strncat(tmpPattern, "XXXXXX", sizeof(tmpPattern)-1-strlen(tmpPattern));
-#if defined(FREEBSD) || defined(MACOSX)
- pTmpName = mkstemp(tmpPattern);
-#else
pTmpName = mktemp(tmpPattern);
-#endif
#endif
return OString(pTmpName);

View File

@ -0,0 +1,14 @@
--- ../codemaker/source/codemaker/global.cxx.orig Fri Apr 4 00:14:50 2003
+++ ../codemaker/source/codemaker/global.cxx Fri Apr 4 00:14:53 2003
@@ -164,11 +164,7 @@
strncat(tmpPattern, "/", sizeof(tmpPattern)-1-strlen(tmpPattern));
strncat(tmpPattern, pPrefix, sizeof(tmpPattern)-1-strlen(tmpPattern));
strncat(tmpPattern, "XXXXXX", sizeof(tmpPattern)-1-strlen(tmpPattern));
-#if defined(FREEBSD) || defined(MACOSX)
- pTmpName = mkstemp(tmpPattern);
-#else
pTmpName = mktemp(tmpPattern);
-#endif
#endif
return OString(pTmpName);

View File

@ -0,0 +1,14 @@
--- ../codemaker/source/codemaker/global.cxx.orig Fri Apr 4 00:14:50 2003
+++ ../codemaker/source/codemaker/global.cxx Fri Apr 4 00:14:53 2003
@@ -164,11 +164,7 @@
strncat(tmpPattern, "/", sizeof(tmpPattern)-1-strlen(tmpPattern));
strncat(tmpPattern, pPrefix, sizeof(tmpPattern)-1-strlen(tmpPattern));
strncat(tmpPattern, "XXXXXX", sizeof(tmpPattern)-1-strlen(tmpPattern));
-#if defined(FREEBSD) || defined(MACOSX)
- pTmpName = mkstemp(tmpPattern);
-#else
pTmpName = mktemp(tmpPattern);
-#endif
#endif
return OString(pTmpName);

View File

@ -0,0 +1,14 @@
--- ../codemaker/source/codemaker/global.cxx.orig Fri Apr 4 00:14:50 2003
+++ ../codemaker/source/codemaker/global.cxx Fri Apr 4 00:14:53 2003
@@ -164,11 +164,7 @@
strncat(tmpPattern, "/", sizeof(tmpPattern)-1-strlen(tmpPattern));
strncat(tmpPattern, pPrefix, sizeof(tmpPattern)-1-strlen(tmpPattern));
strncat(tmpPattern, "XXXXXX", sizeof(tmpPattern)-1-strlen(tmpPattern));
-#if defined(FREEBSD) || defined(MACOSX)
- pTmpName = mkstemp(tmpPattern);
-#else
pTmpName = mktemp(tmpPattern);
-#endif
#endif
return OString(pTmpName);

View File

@ -0,0 +1,14 @@
--- ../codemaker/source/codemaker/global.cxx.orig Fri Apr 4 00:14:50 2003
+++ ../codemaker/source/codemaker/global.cxx Fri Apr 4 00:14:53 2003
@@ -164,11 +164,7 @@
strncat(tmpPattern, "/", sizeof(tmpPattern)-1-strlen(tmpPattern));
strncat(tmpPattern, pPrefix, sizeof(tmpPattern)-1-strlen(tmpPattern));
strncat(tmpPattern, "XXXXXX", sizeof(tmpPattern)-1-strlen(tmpPattern));
-#if defined(FREEBSD) || defined(MACOSX)
- pTmpName = mkstemp(tmpPattern);
-#else
pTmpName = mktemp(tmpPattern);
-#endif
#endif
return OString(pTmpName);

View File

@ -0,0 +1,14 @@
--- ../codemaker/source/codemaker/global.cxx.orig Fri Apr 4 00:14:50 2003
+++ ../codemaker/source/codemaker/global.cxx Fri Apr 4 00:14:53 2003
@@ -164,11 +164,7 @@
strncat(tmpPattern, "/", sizeof(tmpPattern)-1-strlen(tmpPattern));
strncat(tmpPattern, pPrefix, sizeof(tmpPattern)-1-strlen(tmpPattern));
strncat(tmpPattern, "XXXXXX", sizeof(tmpPattern)-1-strlen(tmpPattern));
-#if defined(FREEBSD) || defined(MACOSX)
- pTmpName = mkstemp(tmpPattern);
-#else
pTmpName = mktemp(tmpPattern);
-#endif
#endif
return OString(pTmpName);

View File

@ -0,0 +1,14 @@
--- ../codemaker/source/codemaker/global.cxx.orig Fri Apr 4 00:14:50 2003
+++ ../codemaker/source/codemaker/global.cxx Fri Apr 4 00:14:53 2003
@@ -164,11 +164,7 @@
strncat(tmpPattern, "/", sizeof(tmpPattern)-1-strlen(tmpPattern));
strncat(tmpPattern, pPrefix, sizeof(tmpPattern)-1-strlen(tmpPattern));
strncat(tmpPattern, "XXXXXX", sizeof(tmpPattern)-1-strlen(tmpPattern));
-#if defined(FREEBSD) || defined(MACOSX)
- pTmpName = mkstemp(tmpPattern);
-#else
pTmpName = mktemp(tmpPattern);
-#endif
#endif
return OString(pTmpName);

View File

@ -0,0 +1,14 @@
--- ../codemaker/source/codemaker/global.cxx.orig Fri Apr 4 00:14:50 2003
+++ ../codemaker/source/codemaker/global.cxx Fri Apr 4 00:14:53 2003
@@ -164,11 +164,7 @@
strncat(tmpPattern, "/", sizeof(tmpPattern)-1-strlen(tmpPattern));
strncat(tmpPattern, pPrefix, sizeof(tmpPattern)-1-strlen(tmpPattern));
strncat(tmpPattern, "XXXXXX", sizeof(tmpPattern)-1-strlen(tmpPattern));
-#if defined(FREEBSD) || defined(MACOSX)
- pTmpName = mkstemp(tmpPattern);
-#else
pTmpName = mktemp(tmpPattern);
-#endif
#endif
return OString(pTmpName);

View File

@ -0,0 +1,14 @@
--- ../codemaker/source/codemaker/global.cxx.orig Fri Apr 4 00:14:50 2003
+++ ../codemaker/source/codemaker/global.cxx Fri Apr 4 00:14:53 2003
@@ -164,11 +164,7 @@
strncat(tmpPattern, "/", sizeof(tmpPattern)-1-strlen(tmpPattern));
strncat(tmpPattern, pPrefix, sizeof(tmpPattern)-1-strlen(tmpPattern));
strncat(tmpPattern, "XXXXXX", sizeof(tmpPattern)-1-strlen(tmpPattern));
-#if defined(FREEBSD) || defined(MACOSX)
- pTmpName = mkstemp(tmpPattern);
-#else
pTmpName = mktemp(tmpPattern);
-#endif
#endif
return OString(pTmpName);

View File

@ -0,0 +1,14 @@
--- ../codemaker/source/codemaker/global.cxx.orig Fri Apr 4 00:14:50 2003
+++ ../codemaker/source/codemaker/global.cxx Fri Apr 4 00:14:53 2003
@@ -164,11 +164,7 @@
strncat(tmpPattern, "/", sizeof(tmpPattern)-1-strlen(tmpPattern));
strncat(tmpPattern, pPrefix, sizeof(tmpPattern)-1-strlen(tmpPattern));
strncat(tmpPattern, "XXXXXX", sizeof(tmpPattern)-1-strlen(tmpPattern));
-#if defined(FREEBSD) || defined(MACOSX)
- pTmpName = mkstemp(tmpPattern);
-#else
pTmpName = mktemp(tmpPattern);
-#endif
#endif
return OString(pTmpName);

View File

@ -0,0 +1,14 @@
--- ../codemaker/source/codemaker/global.cxx.orig Fri Apr 4 00:14:50 2003
+++ ../codemaker/source/codemaker/global.cxx Fri Apr 4 00:14:53 2003
@@ -164,11 +164,7 @@
strncat(tmpPattern, "/", sizeof(tmpPattern)-1-strlen(tmpPattern));
strncat(tmpPattern, pPrefix, sizeof(tmpPattern)-1-strlen(tmpPattern));
strncat(tmpPattern, "XXXXXX", sizeof(tmpPattern)-1-strlen(tmpPattern));
-#if defined(FREEBSD) || defined(MACOSX)
- pTmpName = mkstemp(tmpPattern);
-#else
pTmpName = mktemp(tmpPattern);
-#endif
#endif
return OString(pTmpName);

View File

@ -0,0 +1,14 @@
--- ../codemaker/source/codemaker/global.cxx.orig Fri Apr 4 00:14:50 2003
+++ ../codemaker/source/codemaker/global.cxx Fri Apr 4 00:14:53 2003
@@ -164,11 +164,7 @@
strncat(tmpPattern, "/", sizeof(tmpPattern)-1-strlen(tmpPattern));
strncat(tmpPattern, pPrefix, sizeof(tmpPattern)-1-strlen(tmpPattern));
strncat(tmpPattern, "XXXXXX", sizeof(tmpPattern)-1-strlen(tmpPattern));
-#if defined(FREEBSD) || defined(MACOSX)
- pTmpName = mkstemp(tmpPattern);
-#else
pTmpName = mktemp(tmpPattern);
-#endif
#endif
return OString(pTmpName);

View File

@ -0,0 +1,14 @@
--- ../codemaker/source/codemaker/global.cxx.orig Fri Apr 4 00:14:50 2003
+++ ../codemaker/source/codemaker/global.cxx Fri Apr 4 00:14:53 2003
@@ -164,11 +164,7 @@
strncat(tmpPattern, "/", sizeof(tmpPattern)-1-strlen(tmpPattern));
strncat(tmpPattern, pPrefix, sizeof(tmpPattern)-1-strlen(tmpPattern));
strncat(tmpPattern, "XXXXXX", sizeof(tmpPattern)-1-strlen(tmpPattern));
-#if defined(FREEBSD) || defined(MACOSX)
- pTmpName = mkstemp(tmpPattern);
-#else
pTmpName = mktemp(tmpPattern);
-#endif
#endif
return OString(pTmpName);

View File

@ -0,0 +1,14 @@
--- ../codemaker/source/codemaker/global.cxx.orig Fri Apr 4 00:14:50 2003
+++ ../codemaker/source/codemaker/global.cxx Fri Apr 4 00:14:53 2003
@@ -164,11 +164,7 @@
strncat(tmpPattern, "/", sizeof(tmpPattern)-1-strlen(tmpPattern));
strncat(tmpPattern, pPrefix, sizeof(tmpPattern)-1-strlen(tmpPattern));
strncat(tmpPattern, "XXXXXX", sizeof(tmpPattern)-1-strlen(tmpPattern));
-#if defined(FREEBSD) || defined(MACOSX)
- pTmpName = mkstemp(tmpPattern);
-#else
pTmpName = mktemp(tmpPattern);
-#endif
#endif
return OString(pTmpName);