Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Main
Synchronet
Commits
792b97e6
Commit
792b97e6
authored
Mar 23, 2004
by
deuce
Browse files
Use machine for lib dirs instead of os
parent
e7b1979b
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
120 additions
and
15 deletions
+120
-15
src/sbbs3/Common.gmake
src/sbbs3/Common.gmake
+2
-2
src/sbbs3/GNUmakefile
src/sbbs3/GNUmakefile
+6
-1
src/sbbs3/install/GNUmakefile
src/sbbs3/install/GNUmakefile
+8
-2
src/sbbs3/install/objects.mk
src/sbbs3/install/objects.mk
+2
-1
src/sbbs3/main.cpp
src/sbbs3/main.cpp
+6
-2
src/sbbs3/sbbs.h
src/sbbs3/sbbs.h
+5
-0
src/sbbs3/xtrn.cpp
src/sbbs3/xtrn.cpp
+91
-7
No files found.
src/sbbs3/Common.gmake
View file @
792b97e6
...
...
@@ -15,13 +15,13 @@ else
JS_CFLAGS += -I$(XPDEV)../../include/mozilla/js
endif
ifndef JSLIBDIR
JSLIBDIR := $(XPDEV)../../lib/mozilla/js/$(
os
).$(BUILD)
JSLIBDIR := $(XPDEV)../../lib/mozilla/js/$(
machine
).$(BUILD)
endif
ifndef JSLIB
JSLIB := js
endif
ifndef NSPRDIR
NSPRDIR := $(XPDEV)../../lib/mozilla/nspr/$(
os
).$(BUILD)
NSPRDIR := $(XPDEV)../../lib/mozilla/nspr/$(
machine
).$(BUILD)
endif
JS_LDFLAGS += -L$(JSLIBDIR) -l$(JSLIB)
#The following is needed for nspr support on Linux
...
...
src/sbbs3/GNUmakefile
View file @
792b97e6
...
...
@@ -43,7 +43,10 @@ CFLAGS += -I$(XPDEV)
CFLAGS
+=
$(UIFC_CFLAGS)
ifndef
bcc
LDFLAGS
+=
-lm
-lutil
LDFLAGS
+=
-lm
ifneq
($(os),sunos)
LDFLAGS
+=
-lutil
endif
endif
ifeq
($(os),sunos)
# Solaris
...
...
@@ -80,6 +83,7 @@ $(SBBSLIB) : $(SBBS)
$(QUIET)
touch
--
'
$(SBBSLIB)
'
ifneq
($(os),darwin)
ifneq
($(os),sunos)
SBBSLDFLAGS
:=
$(LDFLAGS)
-rpath-link
./
$(LIBODIR)
-rpath
./
#LDFLAGS += -Wl,-rpath-link,./$(LIBODIR),-rpath,./
LDFLAGS
+=
-Xlinker
-rpath
...
...
@@ -93,6 +97,7 @@ LDFLAGS += -Xlinker -rpath-link
LDFLAGS
+=
-Xlinker
$(NSPRDIR)
endif
endif
endif
CON_OBJS
=
$(LIBODIR)
/sbbscon.o
$(LIBODIR)
/conwrap.o
\
$(LIBODIR)
/sbbs_ini.o
...
...
src/sbbs3/install/GNUmakefile
View file @
792b97e6
...
...
@@ -17,17 +17,23 @@
#USE_CURSES = 1 # Curses version of UIFC
#USE_FLTK = 1 # Windowed version of UIFC
USE_UIFC32
:=
1
# New 32-bit version of UIFC
UIFC
=
../../uifc/
UIFC
_SRC
=
../../uifc/
XPDEV
=
../../xpdev/
NEED_UIFC
:=
1
include
$(XPDEV)/Common.gmake
include
$(UIFC)/Common.gmake
include
$(UIFC_SRC)/Common.gmake
CFLAGS
+=
-I
../
ifdef
STATIC
LDFLAGS
+=
-static
endif
ifeq
($(os),sunos)
LDFLAGS
+=
-lsocket
-lnsl
endif
$(SBBSINST)
:
$(OBJS)
ifdef
USE_DIALOG
$(QUIET)$(MAKE)
--no-print-directory
-C
../../libdialog
...
...
src/sbbs3/install/objects.mk
View file @
792b97e6
...
...
@@ -12,4 +12,5 @@ OBJS = $(LIBODIR)$(SLASH)sbbsinst.$(OFILE)\
$(LIBODIR)$(SLASH)
genwrap.
$(OFILE)
\
$(LIBODIR)$(SLASH)
dirwrap.
$(OFILE)
\
$(LIBODIR)$(SLASH)
filewrap.
$(OFILE)
\
$(LIBODIR)$(SLASH)
httpio.
$(OFILE)
$(LIBODIR)$(SLASH)
httpio.
$(OFILE)
\
$(LIBODIR)$(SLASH)
uifcx.
$(OFILE)
src/sbbs3/main.cpp
View file @
792b97e6
...
...
@@ -41,6 +41,10 @@
#ifdef __unix__
#include <sys/un.h>
#ifndef SUN_LEN
#define SUN_LEN(su) \
(sizeof(*(su)) - sizeof((su)->sun_path) + strlen((su)->sun_path))
#endif
#endif
//---------------------------------------------------------------------------
...
...
@@ -4004,7 +4008,7 @@ void DLLCALL bbs_thread(void* arg)
#ifdef __unix__ // unix-domain spy sockets
for
(
i
=
first_node
;
i
<=
last_node
;
i
++
)
{
if
((
uspy_listen_socket
[
i
-
1
]
=
socket
(
PF_
LOCAL
,
SOCK_STREAM
,
0
))
==
INVALID_SOCKET
)
if
((
uspy_listen_socket
[
i
-
1
]
=
socket
(
PF_
UNIX
,
SOCK_STREAM
,
0
))
==
INVALID_SOCKET
)
lprintf
(
LOG_ERR
,
"Node %d !ERROR %d creating local spy socket"
,
i
,
errno
);
else
{
...
...
@@ -4013,7 +4017,7 @@ void DLLCALL bbs_thread(void* arg)
startup
->
socket_open
(
startup
->
cbdata
,
TRUE
);
}
uspy_addr
.
sun_family
=
AF_
LOCAL
;
uspy_addr
.
sun_family
=
AF_
UNIX
;
if
((
unsigned
int
)
snprintf
(
str
,
sizeof
(
uspy_addr
.
sun_path
),
"%slocalspy%d.sock"
,
startup
->
temp_dir
,
i
)
>=
sizeof
(
uspy_addr
.
sun_path
))
...
...
src/sbbs3/sbbs.h
View file @
792b97e6
...
...
@@ -1024,6 +1024,11 @@ BOOL md(char *path);
/* file.cpp */
BOOL
filematch
(
char
*
filename
,
char
*
filespec
);
/* sbbscon.c */
#if defined(__unix__) && defined(NEEDS_DAEMON)
int
daemon
(
int
nochdir
,
int
noclose
);
#endif
#endif
/* SBBS */
extern
const
char
*
wday
[];
/* abbreviated weekday names */
...
...
src/sbbs3/xtrn.cpp
View file @
792b97e6
...
...
@@ -68,45 +68,100 @@
#include <termios.h>
#if defined(__QNX__)
/*
*
Control Character Defaults
*/
/*
* Control Character Defaults
*
/
#ifndef CTRL
#define CTRL(x) (x&037)
#endif
#ifndef CEOF
#define CEOF CTRL('d')
#endif
#ifndef CEOL
#define CEOL 0xff
/* XXX avoid _POSIX_VDISABLE */
#endif
#ifndef CERASE
#define CERASE 0177
#endif
#ifndef CERASE2
#define CERASE2 CTRL('h')
#endif
#ifndef CINTR
#define CINTR CTRL('c')
#endif
#ifndef CSTATUS
#define CSTATUS CTRL('t')
#endif
#ifndef CKILL
#define CKILL CTRL('u')
#endif
#ifndef CMIN
#define CMIN 1
#endif
#ifndef CQUIT
#define CQUIT 034
/* FS, ^\ */
#endif
#ifndef CSUSP
#define CSUSP CTRL('z')
#endif
#ifndef CTIME
#define CTIME 0
#endif
#ifndef CDSUSP
#define CDSUSP CTRL('y')
#endif
#ifndef CSTART
#define CSTART CTRL('q')
#endif
#ifndef CSTOP
#define CSTOP CTRL('s')
#endif
#ifndef CLNEXT
#define CLNEXT CTRL('v')
#endif
#ifndef CDISCARD
#define CDISCARD CTRL('o')
#endif
#ifndef CWERASE
#define CWERASE CTRL('w')
#endif
#ifndef CREPRINT
#define CREPRINT CTRL('r')
#endif
#ifndef CEOT
#define CEOT CEOF
/* compat */
#endif
/* compat */
#ifndef CBRK
#define CBRK CEOL
#endif
#ifndef CRPRNT
#define CRPRNT CREPRINT
#endif
#ifndef CFLUSH
#define CFLUSH CDISCARD
#endif
#if
defined(__solaris__) || defined(__QNX__)
#if
ndef TTYDEF_IFLAG
#define TTYDEF_IFLAG (BRKINT | ICRNL | IMAXBEL | IXON | IXANY)
#endif
#ifndef TTYDEF_OFLAG
#define TTYDEF_OFLAG (OPOST | ONLCR)
#endif
#ifndef TTYDEF_LFLAG
#define TTYDEF_LFLAG (ECHO | ICANON | ISIG | IEXTEN | ECHOE|ECHOKE|ECHOCTL)
#endif
#ifndef TTYDEF_CFLAG
#define TTYDEF_CFLAG (CREAD | CS8 | HUPCL)
#endif
#if defined(__QNX__) || defined(__solaris__)
static
cc_t
ttydefchars
[
NCCS
]
=
{
CEOF
,
CEOL
,
CEOL
,
CERASE
,
CWERASE
,
CKILL
,
CREPRINT
,
CERASE2
,
CINTR
,
CQUIT
,
CSUSP
,
CDSUSP
,
CSTART
,
CSTOP
,
CLNEXT
,
CDISCARD
,
CMIN
,
CTIME
,
CSTATUS
,
_POSIX_VDISABLE
CDISCARD
,
CMIN
,
CTIME
,
CSTATUS
#ifndef __solaris__
,
_POSIX_VDISABLE
#endif
};
#endif
...
...
@@ -1004,6 +1059,35 @@ BYTE* lf_expand(BYTE* inbuf, ulong inlen, BYTE* outbuf, ulong& newlen)
#define MAX_ARGS 1000
#ifdef NEEDS_SETENV
static
int
setenv
(
const
char
*
name
,
const
char
*
value
,
int
overwrite
)
{
char
*
envstr
;
char
*
oldenv
;
if
(
overwrite
||
getenv
(
name
)
==
NULL
)
{
envstr
=
(
char
*
)
malloc
(
strlen
(
name
)
+
strlen
(
value
)
+
2
);
if
(
envstr
==
NULL
)
{
errno
=
ENOMEM
;
return
(
-
1
);
}
putenv
(
envstr
);
}
return
(
0
);
}
#endif
#ifdef NEEDS_CFMAKERAW
void
cfmakeraw
(
struct
termios
*
t
)
{
t
->
c_iflag
&=
~
(
IMAXBEL
|
IGNBRK
|
BRKINT
|
PARMRK
|
ISTRIP
|
INLCR
|
IGNCR
|
ICRNL
|
IXON
);
t
->
c_oflag
&=
~
OPOST
;
t
->
c_lflag
&=
~
(
ECHO
|
ECHONL
|
ICANON
|
ISIG
|
IEXTEN
);
t
->
c_cflag
&=
~
(
CSIZE
|
PARENB
);
t
->
c_cflag
|=
CS8
;
}
#endif
#ifdef NEEDS_FORKPTY
static
int
login_tty
(
int
fd
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment