Update.
1998-12-15 Andreas Jaeger <aj@arthur.rhein-neckar.de> * stdio-common/tst-tmpnam.c (main): Use void as parameter to avoid warnings about unused args. Fix comment. 1998-12-15 Andreas Jaeger <aj@arthur.rhein-neckar.de> * sysdeps/posix/tempname.c (__path_search): Correct last patch.
This commit is contained in:
parent
181a8546c8
commit
b61af6fc2e
@ -1,3 +1,12 @@
|
|||||||
|
1998-12-15 Andreas Jaeger <aj@arthur.rhein-neckar.de>
|
||||||
|
|
||||||
|
* stdio-common/tst-tmpnam.c (main): Use void as parameter to avoid
|
||||||
|
warnings about unused args. Fix comment.
|
||||||
|
|
||||||
|
1998-12-15 Andreas Jaeger <aj@arthur.rhein-neckar.de>
|
||||||
|
|
||||||
|
* sysdeps/posix/tempname.c (__path_search): Correct last patch.
|
||||||
|
|
||||||
1998-12-14 Ulrich Drepper <drepper@cygnus.com>
|
1998-12-14 Ulrich Drepper <drepper@cygnus.com>
|
||||||
|
|
||||||
* sunrpc/rpc/xdr.h (IXDR_GET_INT32): Case pointer before reading from
|
* sunrpc/rpc/xdr.h (IXDR_GET_INT32): Case pointer before reading from
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
main (int argc, char *argv[])
|
main (void)
|
||||||
{
|
{
|
||||||
const char *name;
|
const char *name;
|
||||||
int retval = 0;
|
int retval = 0;
|
||||||
@ -33,7 +33,7 @@ main (int argc, char *argv[])
|
|||||||
|
|
||||||
printf ("name = %s\n", name);
|
printf ("name = %s\n", name);
|
||||||
|
|
||||||
/* Make sure the name is based on the value in TMPDIR. */
|
/* Make sure the name is not based on the value in TMPDIR. */
|
||||||
if (strncmp (name, "/usr", 4) == 0)
|
if (strncmp (name, "/usr", 4) == 0)
|
||||||
{
|
{
|
||||||
puts ("error: `tmpnam' used TMPDIR value");
|
puts ("error: `tmpnam' used TMPDIR value");
|
||||||
|
@ -69,14 +69,17 @@ __path_search (char *tmpl, size_t tmpl_len, const char *dir, const char *pfx,
|
|||||||
else if (dir != NULL && direxists (dir))
|
else if (dir != NULL && direxists (dir))
|
||||||
/* nothing */ ;
|
/* nothing */ ;
|
||||||
}
|
}
|
||||||
if (direxists (P_tmpdir))
|
if (dir != NULL)
|
||||||
dir = P_tmpdir;
|
|
||||||
else if (strcmp (P_tmpdir, "/tmp") != 0 && direxists ("/tmp"))
|
|
||||||
dir = "/tmp";
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
__set_errno (ENOENT);
|
if (direxists (P_tmpdir))
|
||||||
return -1;
|
dir = P_tmpdir;
|
||||||
|
else if (strcmp (P_tmpdir, "/tmp") != 0 && direxists ("/tmp"))
|
||||||
|
dir = "/tmp";
|
||||||
|
else
|
||||||
|
{
|
||||||
|
__set_errno (ENOENT);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dlen = strlen (dir);
|
dlen = strlen (dir);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user