URL
https://opencores.org/ocsvn/or1k/or1k/trunk
Go to most recent revision |
Only display areas with differences |
Details |
Blame |
View Log
Rev 578 |
Rev 1765 |
/*
|
/*
|
* Copyright (c) 1988 Regents of the University of California.
|
* Copyright (c) 1988 Regents of the University of California.
|
* All rights reserved.
|
* All rights reserved.
|
*
|
*
|
* Redistribution and use in source and binary forms are permitted
|
* Redistribution and use in source and binary forms are permitted
|
* provided that this notice is preserved and that due credit is given
|
* provided that this notice is preserved and that due credit is given
|
* to the University of California at Berkeley. The name of the University
|
* to the University of California at Berkeley. The name of the University
|
* may not be used to endorse or promote products derived from this
|
* may not be used to endorse or promote products derived from this
|
* software without specific written prior permission. This software
|
* software without specific written prior permission. This software
|
* is provided ``as is'' without express or implied warranty.
|
* is provided ``as is'' without express or implied warranty.
|
*
|
*
|
* RCS: @(#) $Id: tmpnam.c,v 1.1.1.1 2002-01-16 10:25:23 markom Exp $
|
* RCS: @(#) $Id: tmpnam.c,v 1.1.1.1 2002-01-16 10:25:23 markom Exp $
|
*/
|
*/
|
|
|
#include <sys/param.h>
|
#include <sys/param.h>
|
#include <sys/stat.h>
|
#include <sys/stat.h>
|
#include <sys/file.h>
|
#include <sys/file.h>
|
#include <stdio.h>
|
#include <stdio.h>
|
|
|
/*
|
/*
|
* Use /tmp instead of /usr/tmp, because L_tmpname is only 14 chars
|
* Use /tmp instead of /usr/tmp, because L_tmpname is only 14 chars
|
* on some machines (like NeXT machines) and /usr/tmp will cause
|
* on some machines (like NeXT machines) and /usr/tmp will cause
|
* buffer overflows.
|
* buffer overflows.
|
*/
|
*/
|
|
|
#ifdef P_tmpdir
|
#ifdef P_tmpdir
|
# undef P_tmpdir
|
# undef P_tmpdir
|
#endif
|
#endif
|
#define P_tmpdir "/tmp"
|
#define P_tmpdir "/tmp"
|
|
|
char *
|
char *
|
tmpnam(s)
|
tmpnam(s)
|
char *s;
|
char *s;
|
{
|
{
|
static char name[50];
|
static char name[50];
|
char *mktemp();
|
char *mktemp();
|
|
|
if (!s)
|
if (!s)
|
s = name;
|
s = name;
|
(void)sprintf(s, "%s/XXXXXX", P_tmpdir);
|
(void)sprintf(s, "%s/XXXXXX", P_tmpdir);
|
return(mktemp(s));
|
return(mktemp(s));
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.