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 62de4d22 authored by rswindell's avatar rswindell

Created os_version() and socklib_version() functions for other modules to use.

parent 2bcb306a
......@@ -789,6 +789,10 @@ extern "C" {
/* conobj.cpp */
JSObject* js_CreateConsoleObject(JSContext* cx, JSObject* parent);
/* sockobj.c */
JSObject* DLLCALL js_CreateSocketObject(scfg_t* cfg, JSContext* cx, JSObject* parent
,char* name, SOCKET);
#endif
#ifdef SBBS /* These aren't exported */
......@@ -822,6 +826,10 @@ extern "C" {
/* qwk.cpp */
void remove_re(char *str);
/* ver.cpp */
char* os_version(char *str);
char* socklib_version(char* str);
/* sortdir.cpp */
int fnamecmp_a(char **str1, char **str2); /* for use with resort() */
int fnamecmp_d(char **str1, char **str2);
......
......@@ -38,10 +38,11 @@
#include "sbbs.h"
#if defined(JAVASCRIPT) || defined(__unix__)
#define BETA " alpha"
#define BETA " Alpha"
#else
#define BETA " beta" /* Space if non-beta, " beta" otherwise */
#define BETA " Beta" /* Space if non-beta, " beta" otherwise */
#endif
extern "C" const char* beta_version = BETA;
#if defined(_WINSOCKAPI_)
extern WSADATA WSAData;
......@@ -51,46 +52,27 @@
#include <sys/utsname.h> /* uname() */
#endif
void sbbs_t::ver()
char* socklib_version(char* str)
{
char str[128],compiler[32];
CRLF;
strcpy(str,VERSION_NOTICE);
#if defined(_DEBUG)
strcat(str,"Debug");
#endif
center(str);
CRLF;
#if defined(_WINSOCKAPI_)
COMPILER_DESC(compiler);
strcpy(str,WSAData.szDescription);
sprintf(str,"Revision %c%s %s %.5s "
"SMBLIB %s %s"
,REVISION,BETA,__DATE__,__TIME__
,smb_lib_ver(),compiler);
#elif defined(__GLIBC__)
center(str);
CRLF;
sprintf(str,"GLIBC %u.%u",__GLIBC__,__GLIBC_MINOR__);
sprintf(str,"%s - http://www.synchro.net", COPYRIGHT_NOTICE);
center(str);
CRLF;
#ifdef JAVASCRIPT
center((char *)JS_GetImplementationVersion());
CRLF;
#else
strcpy(str,"No socket library version available");
#endif
#if defined(_WINSOCKAPI_)
center(WSAData.szDescription);
CRLF;
#endif
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);
......@@ -140,6 +122,45 @@ void sbbs_t::ver()
#endif
return(str);
}
void sbbs_t::ver()
{
char str[128],compiler[32];
CRLF;
strcpy(str,VERSION_NOTICE);
#if defined(_DEBUG)
strcat(str,"Debug");
#endif
center(str);
CRLF;
COMPILER_DESC(compiler);
sprintf(str,"Revision %c%s %s %.5s "
"SMBLIB %s %s"
,REVISION,BETA,__DATE__,__TIME__
,smb_lib_ver(),compiler);
center(str);
CRLF;
sprintf(str,"%s - http://www.synchro.net", COPYRIGHT_NOTICE);
center(str);
CRLF;
#ifdef JAVASCRIPT
center((char *)JS_GetImplementationVersion());
CRLF;
#endif
center(socklib_version(str));
CRLF;
center(os_version(str));
}
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