Commit 2b4a2e0a authored by deuce's avatar deuce
Browse files

Minor changes to allow building jsdoor with mingw32.

Hopfully this doesn't break the Borland or Watcom (?!) builds.
parent 4da501e7
......@@ -108,8 +108,13 @@ endif
CFLAGS += $(JS_CFLAGS) $(CRYPT_CFLAGS) $(UIFC-MT_CFLAGS) $(XPDEV-MT_CFLAGS) $(SMBLIB_CFLAGS) $(CIOLIB-MT_CFLAGS) $(ENCODE_CFLAGS) $(HASH_CFLAGS)
CFLAGS += -I../comio
vpath %.c ../comio
ifeq ($(os), win32)
OBJS += $(MTOBJODIR)$(DIRSEP)comio_win32$(OFILE)
JSDOOR_OBJS += $(MTOBJODIR)$(DIRSEP)comio_win32$(OFILE)
else
OBJS += $(MTOBJODIR)$(DIRSEP)comio_nix$(OFILE)
JSDOOR_OBJS += $(MTOBJODIR)$(DIRSEP)comio_nix$(OFILE)
endif
LDFLAGS += $(UIFC-MT_LDFLAGS) $(XPDEV-MT_LDFLAGS) $(SMBLIB_LDFLAGS) $(ENCODE_LDFLAGS) $(HASH_LDFLAGS) $(CIOLIB-MT_LDFLAGS) $(JS_LDFLAGS) $(CRYPT_LDFLAGS)
# Monolithic Synchronet executable Build Rule
......
......@@ -575,7 +575,7 @@ long sbbs_t::js_execfile(const char *cmd, const char* startup_dir, JSObject* sco
jsval old_js_argv = JSVAL_VOID;
jsval old_js_argc = JSVAL_VOID;
jsval rval;
int32_t result=0;
int32 result=0;
if(js_cx==NULL) {
errormsg(WHERE,ERR_CHK,"JavaScript support",0);
......
......@@ -669,7 +669,7 @@ js_getnum(JSContext *cx, uintN argc, jsval *arglist)
{
jsval *argv=JS_ARGV(cx, arglist);
uint32_t maxnum=~0;
int32_t dflt=0;
int32 dflt=0;
sbbs_t* sbbs;
jsrefcount rc;
......
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <gen_defs.h>
#ifdef __unix__
#define XP_UNIX
......
/* $Id$ */
// vi: tabstop=4
#include <gen_defs.h> /* SLEEP() */
#include "js_rtpool.h"
#include <threadwrap.h> /* Must be included after jsapi.h */
#include <genwrap.h> /* SLEEP() */
......
......@@ -1505,6 +1505,10 @@ void change_settings(void)
" Chooses the font size used by the custom screen mode\n";
j = 0;
for (k=0; k==0;) {
/* TODO:
* Show current values.
* Apply on change
*/
subopts[0] = "Rows";
subopts[1] = "Columns";
subopts[2] = "Font Size";
......
......@@ -29,32 +29,34 @@ ifeq ($(os),linux) # Linux
XPDEV-MT_LIBS += -lpthread
endif
ifeq ($(os),win32) # MinGW32
XPDEV_LIBS += -lws2_32 -lwinmm -lnetapi32
XPDEV-MT_LIBS += -lws2_32 -lwinmm -lnetapi32
XPDEV_LIBS += -lws2_32 -lwinmm -lnetapi32 -liphlpapi
XPDEV-MT_LIBS += -lws2_32 -lwinmm -lnetapi32 -liphlpapi
endif
ifeq ($(shell if [ -c /dev/urandom ] ; then echo YES ; fi),YES)
XPDEV-MT_CFLAGS += -DHAS_DEV_URANDOM -DURANDOM_DEV=\"/dev/urandom\"
XPDEV_CFLAGS += -DHAS_DEV_URANDOM -DURANDOM_DEV=\"/dev/urandom\"
endif
ifeq ($(shell if [ -L /dev/urandom ] ; then echo YES ; fi),YES)
XPDEV-MT_CFLAGS += -DHAS_DEV_URANDOM -DURANDOM_DEV=\"/dev/urandom\"
XPDEV_CFLAGS += -DHAS_DEV_URANDOM -DURANDOM_DEV=\"/dev/urandom\"
endif
ifeq ($(shell if [ -c /dev/random ] ; then echo YES ; fi),YES)
XPDEV-MT_CFLAGS += -DHAS_DEV_RANDOM -DRANDOM_DEV=\"/dev/random\"
XPDEV_CFLAGS += -DHAS_DEV_RANDOM -DRANDOM_DEV=\"/dev/random\"
endif
ifeq ($(shell if [ -f /usr/include/dev/speaker/speaker.h ] ; then echo YES ; fi),YES)
XPDEV-MT_CFLAGS += -DHAS_DEV_SPEAKER_SPEAKER_H
XPDEV_CFLAGS += -DHAS_DEV_SPEAKER_SPEAKER_H
endif
ifeq ($(shell if [ -f /usr/include/machine/speaker.h ] ; then echo YES ; fi),YES)
XPDEV-MT_CFLAGS += -DHAS_MACHINE_SPEAKER_H
XPDEV_CFLAGS += -DHAS_MACHINE_SPEAKER_H
endif
ifeq ($(shell if [ -f /usr/include/machine/spkr.h ] ; then echo YES ; fi),YES)
XPDEV-MT_CFLAGS += -DHAS_MACHINE_SPKR_H
XPDEV_CFLAGS += -DHAS_MACHINE_SPKR_H
ifneq ($(os),win32)
ifeq ($(shell if [ -c /dev/urandom ] ; then echo YES ; fi),YES)
XPDEV-MT_CFLAGS += -DHAS_DEV_URANDOM -DURANDOM_DEV=\"/dev/urandom\"
XPDEV_CFLAGS += -DHAS_DEV_URANDOM -DURANDOM_DEV=\"/dev/urandom\"
endif
ifeq ($(shell if [ -L /dev/urandom ] ; then echo YES ; fi),YES)
XPDEV-MT_CFLAGS += -DHAS_DEV_URANDOM -DURANDOM_DEV=\"/dev/urandom\"
XPDEV_CFLAGS += -DHAS_DEV_URANDOM -DURANDOM_DEV=\"/dev/urandom\"
endif
ifeq ($(shell if [ -c /dev/random ] ; then echo YES ; fi),YES)
XPDEV-MT_CFLAGS += -DHAS_DEV_RANDOM -DRANDOM_DEV=\"/dev/random\"
XPDEV_CFLAGS += -DHAS_DEV_RANDOM -DRANDOM_DEV=\"/dev/random\"
endif
ifeq ($(shell if [ -f /usr/include/dev/speaker/speaker.h ] ; then echo YES ; fi),YES)
XPDEV-MT_CFLAGS += -DHAS_DEV_SPEAKER_SPEAKER_H
XPDEV_CFLAGS += -DHAS_DEV_SPEAKER_SPEAKER_H
endif
ifeq ($(shell if [ -f /usr/include/machine/speaker.h ] ; then echo YES ; fi),YES)
XPDEV-MT_CFLAGS += -DHAS_MACHINE_SPEAKER_H
XPDEV_CFLAGS += -DHAS_MACHINE_SPEAKER_H
endif
ifeq ($(shell if [ -f /usr/include/machine/spkr.h ] ; then echo YES ; fi),YES)
XPDEV-MT_CFLAGS += -DHAS_MACHINE_SPKR_H
XPDEV_CFLAGS += -DHAS_MACHINE_SPKR_H
endif
endif
# FreeBSD, OpenBSD, NetBSD, Linux, SunOS, and Darwin all have random()/srandom()
......
......@@ -78,7 +78,7 @@ int DLLCALL safe_snprintf(char *dst, size_t size, const char *fmt, ...)
return(numchars);
}
#ifdef _MSC_VER
#ifdef _WIN32
/****************************************************************************/
/* Case insensitive version of strstr() - currently heavy-handed */
/****************************************************************************/
......
......@@ -244,7 +244,7 @@ extern "C" {
#endif
#endif
#if defined(_MSC_VER)
#if defined(_WIN32)
DLLEXPORT char* DLLCALL strcasestr(const char* haystack, const char* needle);
#endif
......
......@@ -61,6 +61,9 @@
/* Let's agree on a standard WinSock symbol here, people */
#define _WINSOCKAPI_
#endif
#ifndef MSG_WAITALL
#define MSG_WAITALL 0x08
#endif
#elif defined __unix__ /* Unix-variant */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment