mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-02 23:50:56 -08:00
Fixes for mingw32
This commit is contained in:
parent
9d449d9565
commit
63678eb25c
4 changed files with 32 additions and 33 deletions
|
|
@ -108,7 +108,7 @@ install-base:
|
|||
flatinstall: BUILD-STAMP
|
||||
$(MAKE) bindir=$(prefix) libdir=$(prefix) install-base
|
||||
cd c; $(MAKE) prefix=$(prefix) flatinstall
|
||||
cd doc; $(MAKE) prefix=$(prefix) flatinstall
|
||||
cd doc; $(MAKE) prefix=$(prefix) docdir=$(prefix)/doc flatinstall
|
||||
|
||||
uninstall:
|
||||
for i in $(TARGETS) ecl-config; do rm -rf $(bindir)/$$i; done
|
||||
|
|
|
|||
36
src/c/load.d
36
src/c/load.d
|
|
@ -18,25 +18,23 @@
|
|||
#include "internal.h"
|
||||
|
||||
#ifdef ENABLE_DLOPEN
|
||||
#ifdef HAVE_DLFCN_H
|
||||
#include <dlfcn.h>
|
||||
#define INIT_PREFIX "init_"
|
||||
#endif
|
||||
#ifdef HAVE_LINK_H
|
||||
#include <link.h>
|
||||
#endif
|
||||
#ifdef HAVE_MACH_O_DYLD_H
|
||||
#include <mach-o/dyld.h>
|
||||
#define INIT_PREFIX "_init_"
|
||||
#endif
|
||||
#if defined(mingw32) || defined(_MSC_VER)
|
||||
#ifdef _MSC_VER
|
||||
#include <windows.h>
|
||||
#endif
|
||||
#include <windef.h>
|
||||
#include <winbase.h>
|
||||
#define INIT_PREFIX "init_"
|
||||
#endif
|
||||
# ifdef HAVE_DLFCN_H
|
||||
# include <dlfcn.h>
|
||||
# define INIT_PREFIX "init_"
|
||||
# endif
|
||||
# ifdef HAVE_LINK_H
|
||||
# include <link.h>
|
||||
# endif
|
||||
# ifdef HAVE_MACH_O_DYLD_H
|
||||
# include <mach-o/dyld.h>
|
||||
# define INIT_PREFIX "_init_"
|
||||
# endif
|
||||
# if defined(mingw32) || defined(_MSC_VER)
|
||||
# include <windows.h>
|
||||
# include <windef.h>
|
||||
# include <winbase.h>
|
||||
# define INIT_PREFIX "init_"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_DLOPEN
|
||||
|
|
|
|||
|
|
@ -1096,9 +1096,6 @@ cl_symbols[] = {
|
|||
{SYS_ "GET-STRING-INPUT-STREAM-INDEX", SI_ORDINARY, si_get_string_input_stream_index, 1, OBJNULL},
|
||||
{SYS_ "GETENV", SI_ORDINARY, si_getenv, 1, OBJNULL},
|
||||
{SYS_ "GETCWD", SI_ORDINARY, si_getcwd, 0, OBJNULL},
|
||||
#ifdef _MSC_VER
|
||||
{SYS_ "GET-LIBRARY-PATHNAME", SI_ORDINARY, si_get_library_pathname, 0, OBJNULL},
|
||||
#endif
|
||||
{SYS_ "HASH-SET", SI_ORDINARY, si_hash_set, 3, OBJNULL},
|
||||
{SYS_ "HASH-TABLE-ITERATOR", SI_ORDINARY, si_hash_table_iterator, 1, OBJNULL},
|
||||
{SYS_ "IHS-ENV", SI_ORDINARY, si_ihs_env, 1, OBJNULL},
|
||||
|
|
@ -1458,6 +1455,9 @@ cl_symbols[] = {
|
|||
#endif
|
||||
|
||||
{EXT_ "RUN-PROGRAM", SI_ORDINARY, si_run_program, -1, OBJNULL},
|
||||
#if defined(_MSC_VER) || defined(mingw32)
|
||||
{SYS_ "GET-LIBRARY-PATHNAME", SI_ORDINARY, si_get_library_pathname, 0, OBJNULL},
|
||||
#endif
|
||||
|
||||
/* Tag for end of list */
|
||||
{NULL, CL_ORDINARY, NULL, -1, OBJNULL}};
|
||||
|
|
|
|||
|
|
@ -29,14 +29,15 @@
|
|||
#ifdef HAVE_DIRENT_H
|
||||
# include <dirent.h>
|
||||
#else
|
||||
# ifndef _MSC_VER
|
||||
# if !defined(_MSC_VER)
|
||||
# include <sys/dir.h>
|
||||
# else
|
||||
# include <windows.h>
|
||||
# undef ERROR
|
||||
# define MAXPATHLEN 512
|
||||
# endif
|
||||
#endif
|
||||
#if defined(_MSC_VER) || defined(mingw32)
|
||||
# include <windows.h>
|
||||
# undef ERROR
|
||||
# define MAXPATHLEN 512
|
||||
#endif
|
||||
#ifndef HAVE_MKSTEMP
|
||||
# include <fcntl.h>
|
||||
#endif
|
||||
|
|
@ -92,7 +93,7 @@ current_dir(void) {
|
|||
|
||||
static cl_object
|
||||
file_kind(char *filename, bool follow_links) {
|
||||
#ifdef _MSC_VER
|
||||
#if defined(_MSC_VER) || defined(mingw32)
|
||||
DWORD dw = GetFileAttributes( filename );
|
||||
if (dw == -1)
|
||||
return Cnil;
|
||||
|
|
@ -187,11 +188,11 @@ cl_truename(cl_object pathname)
|
|||
filename = OBJNULL;
|
||||
}
|
||||
#endif
|
||||
#ifdef _MSC_VER
|
||||
if (filename->pathname.device != Cnil)
|
||||
#if defined(_MSC_VER) || defined(mingw32)
|
||||
if (pathname->pathname.device != Cnil)
|
||||
{
|
||||
char device[3] = {'\0', ':', '\0'};
|
||||
device[0] = filename->pathname.device->string.self[0];
|
||||
device[0] = pathname->pathname.device->string.self[0];
|
||||
if (chdir( device ) < 0)
|
||||
goto ERROR;
|
||||
}
|
||||
|
|
@ -704,7 +705,7 @@ si_getcwd(void)
|
|||
return cl_parse_namestring(3, current_dir(), Cnil, Cnil);
|
||||
}
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#if defined(_MSC_VER) || defined(mingw32)
|
||||
cl_object
|
||||
si_get_library_pathname(void)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue