1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-15 16:20:17 +02:00

* posix.c (getlogin): getlogin() implementation for Windows.

* backtrace.c, ioext.c: Include <stdio.h>.

	* unif.c, script.c, rw.c, error.c: Include <io.h>, if it does
	exist.

	* cpp_sig_symbols.in: Added SIGBREAK.
This commit is contained in:
Martin Grabmüller 2001-07-03 15:27:56 +00:00
parent 166882e16b
commit 7beabedb0a
9 changed files with 50 additions and 1 deletions

View file

@ -1,3 +1,16 @@
2001-07-03 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
Some more compatibility patches for Windows.
* posix.c (getlogin): getlogin() implementation for Windows.
* backtrace.c, ioext.c: Include <stdio.h>.
* unif.c, script.c, rw.c, error.c: Include <io.h>, if it does
exist.
* cpp_sig_symbols.in: Added SIGBREAK.
2001-07-01 Marius Vollmer <mvo@zagadka.ping.de> 2001-07-01 Marius Vollmer <mvo@zagadka.ping.de>
* strports.c (scm_read_0str, scm_eval_0str): Call * strports.c (scm_read_0str, scm_eval_0str): Call

View file

@ -47,6 +47,7 @@
gjb@cs.washington.edu, http://www.cs.washington.edu/homes/gjb */ gjb@cs.washington.edu, http://www.cs.washington.edu/homes/gjb */
#include <stdio.h>
#include <ctype.h> #include <ctype.h>
#include "libguile/_scm.h" #include "libguile/_scm.h"

View file

@ -1,5 +1,6 @@
SIGABRT SIGABRT
SIGALRM SIGALRM
SIGBREAK
SIGBUS SIGBUS
SIGCHLD SIGCHLD
SIGCLD SIGCLD

View file

@ -61,6 +61,11 @@
#ifdef HAVE_UNISTD_H #ifdef HAVE_UNISTD_H
#include <unistd.h> #include <unistd.h>
#endif #endif
/* For Windows... */
#ifdef HAVE_IO_H
#include <io.h>
#endif

View file

@ -44,6 +44,7 @@
#include <stdio.h>
#include <errno.h> #include <errno.h>
#include "libguile/_scm.h" #include "libguile/_scm.h"

View file

@ -103,6 +103,7 @@ extern char *ttyname();
#ifdef __MINGW32__ #ifdef __MINGW32__
/* Some defines for Windows here. */ /* Some defines for Windows here. */
# include <process.h>
# define pipe(fd) _pipe (fd, 256, O_BINARY) # define pipe(fd) _pipe (fd, 256, O_BINARY)
#endif /* __MINGW32__ */ #endif /* __MINGW32__ */
@ -576,7 +577,6 @@ SCM_DEFINE (scm_getuid, "getuid", 0, 0, 0,
return SCM_MAKINUM (0L + getuid ()); return SCM_MAKINUM (0L + getuid ());
} }
#undef FUNC_NAME #undef FUNC_NAME
#endif /* __MINGW32__ */
@ -675,6 +675,8 @@ SCM_DEFINE (scm_seteuid, "seteuid", 1, 0, 0,
return SCM_UNSPECIFIED; return SCM_UNSPECIFIED;
} }
#undef FUNC_NAME #undef FUNC_NAME
#endif /* __MINGW32__ */
#ifdef HAVE_SETEGID #ifdef HAVE_SETEGID
SCM_DEFINE (scm_setegid, "setegid", 1, 0, 0, SCM_DEFINE (scm_setegid, "setegid", 1, 0, 0,
@ -1383,6 +1385,21 @@ SCM_DEFINE (scm_chroot, "chroot", 1, 0, 0,
#undef FUNC_NAME #undef FUNC_NAME
#endif /* HAVE_CHROOT */ #endif /* HAVE_CHROOT */
#ifdef __MINGW32__
/* Wrapper function to supplying `getlogin()' under Windows. */
static char * getlogin (void)
{
static char user[256];
static unsigned long len = 256;
if (!GetUserName (user, &len))
return NULL;
return user;
}
#endif /* __MINGW32__ */
#if HAVE_GETLOGIN #if HAVE_GETLOGIN
SCM_DEFINE (scm_getlogin, "getlogin", 0, 0, 0, SCM_DEFINE (scm_getlogin, "getlogin", 0, 0, 0,
(void), (void),

View file

@ -59,6 +59,9 @@
#ifdef HAVE_UNISTD_H #ifdef HAVE_UNISTD_H
#include <unistd.h> #include <unistd.h>
#endif #endif
#ifdef HAVE_IO_H
#include <io.h>
#endif

View file

@ -64,6 +64,10 @@
#include <unistd.h> /* for X_OK define */ #include <unistd.h> /* for X_OK define */
#endif #endif
#ifdef HAVE_IO_H
#include <io.h>
#endif
/* Concatentate str2 onto str1 at position n and return concatenated /* Concatentate str2 onto str1 at position n and return concatenated
string if file exists; 0 otherwise. */ string if file exists; 0 otherwise. */

View file

@ -74,6 +74,10 @@
#include <unistd.h> #include <unistd.h>
#endif #endif
#ifdef HAVE_IO_H
#include <io.h>
#endif
/* The set of uniform scm_vector types is: /* The set of uniform scm_vector types is:
* Vector of: Called: * Vector of: Called: