mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 11:40:18 +02:00
Remove unnecessary dirent includes and defines. Include
local `win32-uname.h' for MinGW. Extern declaration of `mkstemp()' for systems where it does not exists. Make `getlogin()' available on M$-Windows.
This commit is contained in:
parent
e2c801663c
commit
4f68365d03
1 changed files with 10 additions and 19 deletions
|
@ -126,23 +126,6 @@ extern char ** environ;
|
|||
#include <sys/utsname.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_DIRENT_H
|
||||
# include <dirent.h>
|
||||
# define NAMLEN(dirent) strlen((dirent)->d_name)
|
||||
#else
|
||||
# define dirent direct
|
||||
# define NAMLEN(dirent) (dirent)->d_namlen
|
||||
# if HAVE_SYS_NDIR_H
|
||||
# include <sys/ndir.h>
|
||||
# endif
|
||||
# if HAVE_SYS_DIR_H
|
||||
# include <sys/dir.h>
|
||||
# endif
|
||||
# if HAVE_NDIR_H
|
||||
# include <ndir.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SETLOCALE
|
||||
#include <locale.h>
|
||||
#endif
|
||||
|
@ -994,7 +977,11 @@ SCM_DEFINE (scm_fork, "primitive-fork", 0, 0, 0,
|
|||
#undef FUNC_NAME
|
||||
#endif /* HAVE_FORK */
|
||||
|
||||
#ifdef HAVE_UNAME
|
||||
#ifdef __MINGW32__
|
||||
# include "win32-uname.h"
|
||||
#endif
|
||||
|
||||
#if defined (HAVE_UNAME) || defined (__MINGW32__)
|
||||
SCM_DEFINE (scm_uname, "uname", 0, 0, 0,
|
||||
(),
|
||||
"Return an object with some information about the computer\n"
|
||||
|
@ -1082,6 +1069,10 @@ SCM_DEFINE (scm_tmpnam, "tmpnam", 0, 0, 0,
|
|||
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_MKSTEMP
|
||||
extern int mkstemp (char *);
|
||||
#endif
|
||||
|
||||
SCM_DEFINE (scm_mkstemp, "mkstemp!", 1, 0, 0,
|
||||
(SCM tmpl),
|
||||
"Create a new unique file in the file system and returns a new\n"
|
||||
|
@ -1385,7 +1376,7 @@ static char * getlogin (void)
|
|||
#endif /* __MINGW32__ */
|
||||
|
||||
|
||||
#if HAVE_GETLOGIN
|
||||
#if defined (HAVE_GETLOGIN) || defined (__MINGW32__)
|
||||
SCM_DEFINE (scm_getlogin, "getlogin", 0, 0, 0,
|
||||
(void),
|
||||
"Return a string containing the name of the user logged in on\n"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue