1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

[osdep] const in tempname

This commit is contained in:
Witold Filipczyk 2022-02-21 16:49:59 +01:00
parent 4245634782
commit 29bbf225b5
2 changed files with 7 additions and 3 deletions

View File

@ -1033,7 +1033,9 @@ get_system_str(int xwin)
/* tempnam() replacement without races */ /* tempnam() replacement without races */
int isdirectory(char *path) { static int
isdirectory(const char *path)
{
struct stat ss; struct stat ss;
if (path == NULL) if (path == NULL)
return 0; return 0;
@ -1042,7 +1044,9 @@ int isdirectory(char *path) {
return S_ISDIR(ss.st_mode); return S_ISDIR(ss.st_mode);
} }
char *tempname(char *dir, const char *pfx, char *suff) { char *
tempname(const char *dir, const char *pfx, char *suff)
{
struct string path; struct string path;
char *ret; char *ret;
int fd; int fd;

View File

@ -52,7 +52,7 @@ int resize_window(int, int, int, int);
int can_resize_window(int); int can_resize_window(int);
int can_open_os_shell(int); int can_open_os_shell(int);
void set_highpri(void); void set_highpri(void);
char *tempname(char *dir, const char *pfx, char *suff); char *tempname(const char *dir, const char *pfx, char *suff);
#ifdef USE_OPEN_PREALLOC #ifdef USE_OPEN_PREALLOC
int open_prealloc(char *, int, int, off_t); int open_prealloc(char *, int, int, off_t);