104 lines
2.7 KiB
Diff
104 lines
2.7 KiB
Diff
--- tcl/uutcl.c
|
|
+++ tcl/uutcl.c
|
|
@@ -340,7 +340,7 @@
|
|
static void
|
|
uutcl_UpdateParameter (Tcl_Interp *interp)
|
|
{
|
|
- char *cval;
|
|
+ const char *cval;
|
|
|
|
if ((cval = Tcl_GetVar (interp, "OptionFast", TCL_GLOBAL_ONLY))!=NULL)
|
|
UUSetOption (UUOPT_FAST, atoi (cval), NULL);
|
|
--- unix/uudeview.c
|
|
+++ unix/uudeview.c
|
|
@@ -434,7 +434,7 @@
|
|
return 0;
|
|
}
|
|
|
|
- if ((stdfile = tempnam (NULL, "uu")) == NULL) {
|
|
+ if ((stdfile = _FP_tempnam (NULL, "uu")) == NULL) {
|
|
fprintf (stderr, "proc_stdin: cannot get temporary file\n");
|
|
return 0;
|
|
}
|
|
--- uulib/fptools.c
|
|
+++ uulib/fptools.c
|
|
@@ -83,7 +83,7 @@
|
|
*/
|
|
|
|
char * TOOLEXPORT
|
|
-_FP_strdup (char *string)
|
|
+_FP_strdup (const char *string)
|
|
{
|
|
char *result;
|
|
|
|
@@ -507,5 +507,15 @@
|
|
char * TOOLEXPORT
|
|
_FP_tempnam (char *dir, char *pfx)
|
|
{
|
|
- return _FP_strdup (tmpnam (NULL));
|
|
+ int fd;
|
|
+ char fileName[100];
|
|
+
|
|
+ strncpy(fileName, pfx, 90);
|
|
+ strcat(fileName, "XXXXXX");
|
|
+ fd = mkstemp(fileName);
|
|
+ if (fd == -1)
|
|
+ return NULL;
|
|
+ close(fd);
|
|
+ unlink(fileName);
|
|
+ return _FP_strdup (fileName);
|
|
}
|
|
--- uulib/fptools.h
|
|
+++ uulib/fptools.h
|
|
@@ -33,7 +33,7 @@
|
|
#endif
|
|
|
|
void TOOLEXPORT _FP_free _ANSI_ARGS_((void *));
|
|
-char * TOOLEXPORT _FP_strdup _ANSI_ARGS_((char *));
|
|
+char * TOOLEXPORT _FP_strdup _ANSI_ARGS_((const char *));
|
|
char * TOOLEXPORT _FP_strncpy _ANSI_ARGS_((char *, char *, int));
|
|
void * TOOLEXPORT _FP_memdup _ANSI_ARGS_((void *, int));
|
|
int TOOLEXPORT _FP_stricmp _ANSI_ARGS_((char *, char *));
|
|
--- uulib/uudeview.h
|
|
+++ uulib/uudeview.h
|
|
@@ -188,7 +188,7 @@
|
|
|
|
int UUEXPORT UUInitialize _ANSI_ARGS_((void));
|
|
int UUEXPORT UUGetOption _ANSI_ARGS_((int, int *, char *, int));
|
|
-int UUEXPORT UUSetOption _ANSI_ARGS_((int, int, char *));
|
|
+int UUEXPORT UUSetOption _ANSI_ARGS_((int, int, const char *));
|
|
char * UUEXPORT UUstrerror _ANSI_ARGS_((int));
|
|
int UUEXPORT UUSetMsgCallback _ANSI_ARGS_((void *,
|
|
void (*) (void *,
|
|
--- uulib/uulib.c
|
|
+++ uulib/uulib.c
|
|
@@ -504,7 +504,7 @@
|
|
}
|
|
|
|
int UUEXPORT
|
|
-UUSetOption (int option, int ivalue, char *cvalue)
|
|
+UUSetOption (int option, int ivalue, const char *cvalue)
|
|
{
|
|
switch (option) {
|
|
case UUOPT_FAST:
|
|
--- uulib/uunconc.c
|
|
+++ uulib/uunconc.c
|
|
@@ -1264,7 +1264,7 @@
|
|
else
|
|
mode = "wb"; /* otherwise in binary */
|
|
|
|
- if ((data->binfile = tempnam (NULL, "uu")) == NULL) {
|
|
+ if ((data->binfile = _FP_tempnam (NULL, "uu")) == NULL) {
|
|
UUMessage (uunconc_id, __LINE__, UUMSG_ERROR,
|
|
uustring (S_NO_TEMP_NAME));
|
|
return UURET_NOMEM;
|
|
@@ -1426,7 +1426,7 @@
|
|
*/
|
|
|
|
if (data->uudet == BH_ENCODED && data->binfile) {
|
|
- if ((ntmp = tempnam (NULL, "uu")) == NULL) {
|
|
+ if ((ntmp = _FP_tempnam (NULL, "uu")) == NULL) {
|
|
UUMessage (uunconc_id, __LINE__, UUMSG_ERROR,
|
|
uustring (S_NO_TEMP_NAME));
|
|
progress.action = 0;
|