fixed win32 build files
This commit is contained in:
parent
a93f580ba8
commit
d1f4563964
@ -29,7 +29,7 @@ moo_CPPFLAGS = $(CPPFLAGS_ALL_COMMON)
|
|||||||
moo_LDFLAGS = $(LDFLAGS_ALL_COMMON)
|
moo_LDFLAGS = $(LDFLAGS_ALL_COMMON)
|
||||||
moo_LDADD = $(LIBADD_LIB_COMMON) -lmoox $(PTHREAD_LIBS)
|
moo_LDADD = $(LIBADD_LIB_COMMON) -lmoox $(PTHREAD_LIBS)
|
||||||
if WIN32
|
if WIN32
|
||||||
moo_LDADD += $(SOCKET_LIBS)
|
moo_LDADD += $(SOCKET_LIBS) -lpsapi
|
||||||
endif
|
endif
|
||||||
if ENABLE_STATIC_MODULE
|
if ENABLE_STATIC_MODULE
|
||||||
moo_DEPENDENCIES = ../lib/libmoo.la
|
moo_DEPENDENCIES = ../lib/libmoo.la
|
||||||
|
@ -91,7 +91,7 @@ host_triplet = @host@
|
|||||||
@ENABLE_LIBLTDL_TRUE@am__append_1 = $(LTDL_LIBS)
|
@ENABLE_LIBLTDL_TRUE@am__append_1 = $(LTDL_LIBS)
|
||||||
@ENABLE_LIBLTDL_FALSE@am__append_2 = $(DL_LIBS)
|
@ENABLE_LIBLTDL_FALSE@am__append_2 = $(DL_LIBS)
|
||||||
bin_PROGRAMS = moo$(EXEEXT)
|
bin_PROGRAMS = moo$(EXEEXT)
|
||||||
@WIN32_TRUE@am__append_3 = $(SOCKET_LIBS)
|
@WIN32_TRUE@am__append_3 = $(SOCKET_LIBS) -lpsapi
|
||||||
@ENABLE_STATIC_MODULE_FALSE@moo_DEPENDENCIES = $(am__DEPENDENCIES_4) \
|
@ENABLE_STATIC_MODULE_FALSE@moo_DEPENDENCIES = $(am__DEPENDENCIES_4) \
|
||||||
@ENABLE_STATIC_MODULE_FALSE@ $(am__DEPENDENCIES_1) \
|
@ENABLE_STATIC_MODULE_FALSE@ $(am__DEPENDENCIES_1) \
|
||||||
@ENABLE_STATIC_MODULE_FALSE@ $(am__DEPENDENCIES_5)
|
@ENABLE_STATIC_MODULE_FALSE@ $(am__DEPENDENCIES_5)
|
||||||
|
@ -66,7 +66,6 @@ libmoo_la_SOURCES = \
|
|||||||
moo-rbt.h \
|
moo-rbt.h \
|
||||||
moo-utl.h \
|
moo-utl.h \
|
||||||
moo-prv.h \
|
moo-prv.h \
|
||||||
moo-std.h \
|
|
||||||
pack1.h \
|
pack1.h \
|
||||||
unpack.h \
|
unpack.h \
|
||||||
bigint.c \
|
bigint.c \
|
||||||
@ -98,13 +97,13 @@ libmoo_la_CPPFLAGS = $(CPPFLAGS_LIB_COMMON) $(CPPFLAGS_PFMOD)
|
|||||||
libmoo_la_LDFLAGS = $(LDFLAGS_LIB_COMMON)
|
libmoo_la_LDFLAGS = $(LDFLAGS_LIB_COMMON)
|
||||||
libmoo_la_LIBADD = $(LIBADD_LIB_COMMON)
|
libmoo_la_LIBADD = $(LIBADD_LIB_COMMON)
|
||||||
|
|
||||||
libmoox_la_SOURCES = std.c
|
libmoox_la_SOURCES = std.c moo-std.h
|
||||||
if WIN32
|
if WIN32
|
||||||
libmoox_la_SOURCES += poll-msw.c poll-msw.h
|
libmoox_la_SOURCES += poll-msw.c poll-msw.h
|
||||||
endif
|
endif
|
||||||
libmoox_la_CPPFLAGS = $(CPPFLAGS_LIB_COMMON) $(CPPFLAGS_PFMOD)
|
libmoox_la_CPPFLAGS = $(CPPFLAGS_LIB_COMMON) $(CPPFLAGS_PFMOD)
|
||||||
libmoox_la_LDFLAGS = $(LDFLAGS_LIB_COMMON)
|
libmoox_la_LDFLAGS = $(LDFLAGS_LIB_COMMON)
|
||||||
libmoox_la_LIBADD = $(LIBADD_LIB_COMMON) -lmoo
|
libmoox_la_LIBADD = $(LIBADD_LIB_COMMON) -lmoo
|
||||||
|
|
||||||
if ENABLE_STATIC_MODULE
|
if ENABLE_STATIC_MODULE
|
||||||
libmoo_la_LIBADD += -lmoo-stdio
|
libmoo_la_LIBADD += -lmoo-stdio
|
||||||
|
@ -178,7 +178,7 @@ libmoo_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
|||||||
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||||
$(libmoo_la_LDFLAGS) $(LDFLAGS) -o $@
|
$(libmoo_la_LDFLAGS) $(LDFLAGS) -o $@
|
||||||
libmoox_la_DEPENDENCIES = $(am__DEPENDENCIES_5)
|
libmoox_la_DEPENDENCIES = $(am__DEPENDENCIES_5)
|
||||||
am__libmoox_la_SOURCES_DIST = std.c poll-msw.c poll-msw.h
|
am__libmoox_la_SOURCES_DIST = std.c moo-std.h poll-msw.c poll-msw.h
|
||||||
@WIN32_TRUE@am__objects_1 = libmoox_la-poll-msw.lo
|
@WIN32_TRUE@am__objects_1 = libmoox_la-poll-msw.lo
|
||||||
am_libmoox_la_OBJECTS = libmoox_la-std.lo $(am__objects_1)
|
am_libmoox_la_OBJECTS = libmoox_la-std.lo $(am__objects_1)
|
||||||
libmoox_la_OBJECTS = $(am_libmoox_la_OBJECTS)
|
libmoox_la_OBJECTS = $(am_libmoox_la_OBJECTS)
|
||||||
@ -450,7 +450,6 @@ libmoo_la_SOURCES = \
|
|||||||
moo-rbt.h \
|
moo-rbt.h \
|
||||||
moo-utl.h \
|
moo-utl.h \
|
||||||
moo-prv.h \
|
moo-prv.h \
|
||||||
moo-std.h \
|
|
||||||
pack1.h \
|
pack1.h \
|
||||||
unpack.h \
|
unpack.h \
|
||||||
bigint.c \
|
bigint.c \
|
||||||
@ -484,10 +483,10 @@ libmoo_la_LDFLAGS = $(LDFLAGS_LIB_COMMON)
|
|||||||
libmoo_la_LIBADD = $(LIBADD_LIB_COMMON) $(am__append_7) \
|
libmoo_la_LIBADD = $(LIBADD_LIB_COMMON) $(am__append_7) \
|
||||||
$(am__append_8) $(am__append_10) $(am__append_12) \
|
$(am__append_8) $(am__append_10) $(am__append_12) \
|
||||||
$(am__append_14)
|
$(am__append_14)
|
||||||
libmoox_la_SOURCES = std.c $(am__append_6)
|
libmoox_la_SOURCES = std.c moo-std.h $(am__append_6)
|
||||||
libmoox_la_CPPFLAGS = $(CPPFLAGS_LIB_COMMON) $(CPPFLAGS_PFMOD)
|
libmoox_la_CPPFLAGS = $(CPPFLAGS_LIB_COMMON) $(CPPFLAGS_PFMOD)
|
||||||
libmoox_la_LDFLAGS = $(LDFLAGS_LIB_COMMON)
|
libmoox_la_LDFLAGS = $(LDFLAGS_LIB_COMMON)
|
||||||
libmoox_la_LIBADD = $(LIBADD_LIB_COMMON) -lmoo
|
libmoox_la_LIBADD = $(LIBADD_LIB_COMMON) -lmoo
|
||||||
@ENABLE_STATIC_MODULE_TRUE@libmoo_la_DEPENDENCIES = $(abs_builddir)/../mod/libmoo-stdio.la \
|
@ENABLE_STATIC_MODULE_TRUE@libmoo_la_DEPENDENCIES = $(abs_builddir)/../mod/libmoo-stdio.la \
|
||||||
@ENABLE_STATIC_MODULE_TRUE@ $(am__append_9) $(am__append_11) \
|
@ENABLE_STATIC_MODULE_TRUE@ $(am__append_9) $(am__append_11) \
|
||||||
@ENABLE_STATIC_MODULE_TRUE@ $(am__append_13) $(am__append_15)
|
@ENABLE_STATIC_MODULE_TRUE@ $(am__append_13) $(am__append_15)
|
||||||
|
@ -59,17 +59,14 @@ static moo_pfrc_t pf_open (moo_t* moo, moo_mod_t* mod, moo_ooi_t nargs)
|
|||||||
HANDLE h;
|
HANDLE h;
|
||||||
moo_ooi_t immv;
|
moo_ooi_t immv;
|
||||||
|
|
||||||
h = GetStdHandle(STD_INPUT_HANDLE);
|
h = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||||
if (h == INVALID_HANDLE_VALUE) return 0;
|
if (h == INVALID_HANDLE_VALUE) return 0;
|
||||||
if (h == NULL)
|
if (h == NULL)
|
||||||
{
|
{
|
||||||
|
/* the program doens't have an associated handle for stdin. is it a service? */
|
||||||
}
|
}
|
||||||
|
|
||||||
imm = moo_makeimm (moo, h);
|
MOO_STACK_SETRET (moo, nargs, MOO_SMPTR_TO_OOP(h));
|
||||||
if (imm <= -1)
|
|
||||||
{
|
|
||||||
/* error */
|
|
||||||
}
|
|
||||||
|
|
||||||
#elif defined(__DOS__)
|
#elif defined(__DOS__)
|
||||||
moo->errnum = MOO_ENOIMPL;
|
moo->errnum = MOO_ENOIMPL;
|
||||||
@ -88,7 +85,7 @@ static moo_pfrc_t pf_open (moo_t* moo, moo_mod_t* mod, moo_ooi_t nargs)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
con->fd = open ("/dev/tty", O_RDWR, 0);
|
con->fd = open("/dev/tty", O_RDWR, 0);
|
||||||
if (con->fd == -1)
|
if (con->fd == -1)
|
||||||
{
|
{
|
||||||
/* TODO: failed to open /dev/stdout */
|
/* TODO: failed to open /dev/stdout */
|
||||||
@ -99,13 +96,13 @@ static moo_pfrc_t pf_open (moo_t* moo, moo_mod_t* mod, moo_ooi_t nargs)
|
|||||||
con->fd_opened = 1;
|
con->fd_opened = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
term = getenv ("TERM");
|
term = getenv("TERM");
|
||||||
if (term && setupterm (term, con->fd, &err) == OK)
|
if (term && setupterm(term, con->fd, &err) == OK)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
con->cup = tigetstr ("cup"); /* TODO: error check */
|
con->cup = tigetstr("cup"); /* TODO: error check */
|
||||||
con->clear = tigetstr ("clear");
|
con->clear = tigetstr("clear");
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
{
|
{
|
||||||
@ -131,9 +128,16 @@ static moo_pfrc_t pf_open (moo_t* moo, moo_mod_t* mod, moo_ooi_t nargs)
|
|||||||
static moo_pfrc_t pf_close (moo_t* moo, moo_mod_t* mod, moo_ooi_t nargs)
|
static moo_pfrc_t pf_close (moo_t* moo, moo_mod_t* mod, moo_ooi_t nargs)
|
||||||
{
|
{
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
|
moo_oop_t arg;
|
||||||
HANDLE h;
|
HANDLE h;
|
||||||
|
|
||||||
h = MOO_STACK_GETARG (moo, nargs, 0);
|
con = MOO_STACK_GETARG(moo, nargs, 0);
|
||||||
|
h = MOO_OOP_TO_SMPTR(con);
|
||||||
|
|
||||||
|
/*if (h != XXX)
|
||||||
|
{
|
||||||
|
CloseHandle (h);
|
||||||
|
}*/
|
||||||
#elif defined(__DOS__)
|
#elif defined(__DOS__)
|
||||||
|
|
||||||
/* TODO */
|
/* TODO */
|
||||||
@ -153,8 +157,9 @@ static moo_pfrc_t pf_close (moo_t* moo, moo_mod_t* mod, moo_ooi_t nargs)
|
|||||||
static moo_pfrc_t pf_write (moo_t* moo, moo_mod_t* mod, moo_ooi_t nargs)
|
static moo_pfrc_t pf_write (moo_t* moo, moo_mod_t* mod, moo_ooi_t nargs)
|
||||||
{
|
{
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
|
/* TODO: */
|
||||||
#elif defined(__DOS__)
|
#elif defined(__DOS__)
|
||||||
|
/* TODO: */
|
||||||
#else
|
#else
|
||||||
console_t* con;
|
console_t* con;
|
||||||
moo_oop_char_t msg;
|
moo_oop_char_t msg;
|
||||||
|
Loading…
Reference in New Issue
Block a user