Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit c04fa6c4 authored by rswindell's avatar rswindell

Switched to new src/xpdev wrapper files.

parent e1a55550
......@@ -129,7 +129,7 @@ char* sbbs_t::atcode(char* sp, char* str)
return(COPYRIGHT_NOTICE);
if(!strcmp(sp,"COMPILER")) {
COMPILER_DESC(str);
DESCRIBE_COMPILER(str);
return(str);
}
......
......@@ -4276,7 +4276,7 @@ const char* DLLCALL ftp_ver(void)
static char ver[256];
char compiler[32];
COMPILER_DESC(compiler);
DESCRIBE_COMPILER(compiler);
sprintf(ver,"%s v%s%s "
"Compiled %s %s with %s"
......@@ -4366,7 +4366,7 @@ void DLLCALL ftp_server(void* arg)
#endif
);
COMPILER_DESC(compiler);
DESCRIBE_COMPILER(compiler);
lprintf("Compiled %s %s with %s", __DATE__, __TIME__, compiler);
......@@ -4406,7 +4406,7 @@ void DLLCALL ftp_server(void* arg)
sprintf(startup->host_name,"%.*s",sizeof(startup->host_name),scfg.sys_inetaddr);
if(!(scfg.sys_misc&SM_LOCAL_TZ) && !(startup->options&FTP_OPT_LOCAL_TIMEZONE)) {
if(PUTENV("TZ=UTC0"))
if(putenv("TZ=UTC0"))
lprintf("!putenv() FAILED");
tzset();
......
......@@ -1022,7 +1022,7 @@ JSObject* DLLCALL js_CreateSystemObject(JSContext* cx, JSObject* parent
if(!JS_SetProperty(cx, sysobj, "msgbase_lib", &val))
return(NULL);
COMPILER_DESC(str);
DESCRIBE_COMPILER(str);
val = STRING_TO_JSVAL(JS_NewStringCopyZ(cx, str));
if(!JS_SetProperty(cx, sysobj, "compiled_with", &val))
return(NULL);
......
......@@ -2658,7 +2658,7 @@ const char* DLLCALL mail_ver(void)
static char ver[256];
char compiler[32];
COMPILER_DESC(compiler);
DESCRIBE_COMPILER(compiler);
sprintf(ver,"Synchronet Mail Server v%s%s SMBLIB v%s "
"Compiled %s %s with %s"
......@@ -2743,7 +2743,7 @@ void DLLCALL mail_server(void* arg)
#endif
);
COMPILER_DESC(compiler);
DESCRIBE_COMPILER(compiler);
lprintf("Compiled %s %s with %s", __DATE__, __TIME__, compiler);
......@@ -2776,7 +2776,7 @@ void DLLCALL mail_server(void* arg)
sprintf(startup->host_name,"%.*s",sizeof(startup->host_name),scfg.sys_inetaddr);
if(!(scfg.sys_misc&SM_LOCAL_TZ) && !(startup->options&MAIL_OPT_LOCAL_TIMEZONE)) {
if(PUTENV("TZ=UTC0"))
if(putenv("TZ=UTC0"))
lprintf("!putenv() FAILED");
tzset();
......
......@@ -39,7 +39,7 @@
#define _MAILSRVR_H_
#include "client.h" /* client_t */
#include "sbbsinet.h" /* SOCKET */
#include "sockwrap.h" /* SOCKET */
typedef struct {
......
......@@ -2916,7 +2916,7 @@ const char* DLLCALL bbs_ver(void)
static char ver[256];
char compiler[32];
COMPILER_DESC(compiler);
DESCRIBE_COMPILER(compiler);
sprintf(ver,"%s v%s%c%s SMBLIB v%s Compiled %s %s with %s"
,TELNET_SERVER
......@@ -3079,7 +3079,7 @@ void DLLCALL bbs_thread(void* arg)
lastuseron[0]=0;
char compiler[32];
COMPILER_DESC(compiler);
DESCRIBE_COMPILER(compiler);
lprintf("%s Version %s Revision %c%s"
,TELNET_SERVER
......@@ -3153,7 +3153,7 @@ void DLLCALL bbs_thread(void* arg)
sprintf(startup->host_name,"%.*s",sizeof(startup->host_name),scfg.sys_inetaddr);
if(!(scfg.sys_misc&SM_LOCAL_TZ) && !(startup->options&BBS_OPT_LOCAL_TIMEZONE)) {
if(PUTENV("TZ=UTC0"))
if(putenv("TZ=UTC0"))
lprintf("!putenv() FAILED");
tzset();
......
......@@ -45,7 +45,7 @@
#include <string.h> /* strchr */
/* Synchronet-specific */
#include "sbbsinet.h"
#include "sockwrap.h"
#include "gen_defs.h"
#include "smbdefs.h" /* _PACK */
......
......@@ -112,10 +112,12 @@
/***********************/
/* Synchronet-specific */
/***********************/
#include "sbbsinet.h"
#include "sbbswrap.h"
#include "genwrap.h"
#include "dirwrap.h"
#include "filewrap.h"
#include "sockwrap.h"
#include "threadwrap.h"
#include "smblib.h"
#include "smbwrap.h"
#include "ars_defs.h"
#include "scfgdefs.h"
#include "scfglib.h"
......@@ -758,7 +760,6 @@ extern "C" {
DLLEXPORT BOOL DLLCALL removefiledat(scfg_t* cfg, file_t* f);
DLLEXPORT BOOL DLLCALL addfiledat(scfg_t* cfg, file_t* f);
DLLEXPORT BOOL DLLCALL findfile(scfg_t* cfg, uint dirnum, char *filename);
DLLEXPORT char * DLLCALL getfname(char *path);
DLLEXPORT char * DLLCALL padfname(char *filename, char *str);
DLLEXPORT char * DLLCALL unpadfname(char *filename, char *str);
DLLEXPORT BOOL DLLCALL rmuserxfers(scfg_t* cfg, int fromuser, int destuser, char *fname);
......@@ -907,7 +908,6 @@ FILE * fnopen(int *file, char *str, int access);
void remove_re(char *str);
/* ver.cpp */
char* os_version(char *str);
char* socklib_version(char* str);
/* sortdir.cpp */
......
......@@ -970,7 +970,7 @@ const char* DLLCALL services_ver(void)
static char ver[256];
char compiler[32];
COMPILER_DESC(compiler);
DESCRIBE_COMPILER(compiler);
sprintf(ver,"Synchronet Services v%s%s "
"Compiled %s %s with %s"
......@@ -1049,7 +1049,7 @@ void DLLCALL services_thread(void* arg)
#endif
);
COMPILER_DESC(compiler);
DESCRIBE_COMPILER(compiler);
lprintf("Compiled %s %s with %s", __DATE__, __TIME__, compiler);
......@@ -1081,7 +1081,7 @@ void DLLCALL services_thread(void* arg)
sprintf(startup->host_name,"%.*s",sizeof(startup->host_name),scfg.sys_inetaddr);
if(!(scfg.sys_misc&SM_LOCAL_TZ) && !(startup->options&BBS_OPT_LOCAL_TIMEZONE)) {
if(PUTENV("TZ=UTC0"))
if(putenv("TZ=UTC0"))
lprintf("!putenv() FAILED");
tzset();
......
......@@ -44,7 +44,7 @@
#include "client.h"
#include "ringbuf.h"
#include "sbbswrap.h"
#include "threadwrap.h" /* sem_t */
typedef struct {
......
......@@ -71,60 +71,6 @@ char* socklib_version(char* str)
return(str);
}
char* os_version(char *str)
{
#if defined(__OS2__) && defined(__BORLANDC__)
sprintf(str,"OS/2 %u.%u (%u.%u)",_osmajor/10,_osminor/10,_osmajor,_osminor);
#elif defined(_WIN32)
/* Windows Version */
char* winflavor=nulstr;
OSVERSIONINFO winver;
winver.dwOSVersionInfoSize=sizeof(winver);
GetVersionEx(&winver);
switch(winver.dwPlatformId) {
case VER_PLATFORM_WIN32_NT:
winflavor="NT ";
break;
case VER_PLATFORM_WIN32s:
winflavor="Win32s ";
break;
case VER_PLATFORM_WIN32_WINDOWS:
winver.dwBuildNumber&=0xffff;
break;
}
sprintf(str,"Windows %sVersion %u.%02u (Build %u) %s"
,winflavor
,winver.dwMajorVersion, winver.dwMinorVersion
,winver.dwBuildNumber,winver.szCSDVersion);
#elif defined(__unix__)
struct utsname unixver;
if(uname(&unixver)!=0)
sprintf(str,"Unix (uname errno: %d)",errno);
else
sprintf(str,"%s %s %s"
,unixver.sysname /* e.g. "Linux" */
,unixver.release /* e.g. "2.2.14-5.0" */
,unixver.machine /* e.g. "i586" */
);
#else /* DOS && __BORLANDC__*/
sprintf(str,"DOS %u.%02u",_osmajor,_osminor);
#endif
return(str);
}
void sbbs_t::ver()
{
char str[128],compiler[32];
......@@ -137,7 +83,7 @@ void sbbs_t::ver()
center(str);
CRLF;
COMPILER_DESC(compiler);
DESCRIBE_COMPILER(compiler);
sprintf(str,"Revision %c%s %s %.5s "
"SMBLIB %s %s"
......
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