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 238fe598 authored by rswindell's avatar rswindell

Created environment vars for date info (even for 32-bit externals).

parent 9ac76b83
...@@ -299,7 +299,13 @@ public: ...@@ -299,7 +299,13 @@ public:
ulong timeleft; /* Number of seconds user has left online */ ulong timeleft; /* Number of seconds user has left online */
char sbbsnode[MAX_PATH+1]; /* Environment var to contain node dir path */ char sbbsnode[MAX_PATH+1]; /* Environment var to contain node dir path */
char sbbsnnum[MAX_PATH+1]; /* Environment var to contain node num */ char sbbsnnum[MAX_PATH+1]; /* Environment var to contain node num */
char sbbsctrl[MAX_PATH+1]; /* Environmetn var to contain ctrl dir path */ char sbbsctrl[MAX_PATH+1]; /* Environment var to contain ctrl dir path */
char env_day[16]; /* Environment var for day of month */
char env_weekday[16]; /* Environment var for name of weekday */
char env_month[16]; /* Environment var for month number (1-based) */
char env_monthname[16]; /* Environment var for day of month abbreviation */
char env_year[16]; /* Environment var for the year */
char *comspec; /* Pointer to environment variable COMSPEC */ char *comspec; /* Pointer to environment variable COMSPEC */
ushort altul; /* Upload to alternate path flag */ ushort altul; /* Upload to alternate path flag */
char cid[LEN_CID+1]; /* Caller ID (IP Address) of current caller */ char cid[LEN_CID+1]; /* Caller ID (IP Address) of current caller */
......
...@@ -287,7 +287,7 @@ int sbbs_t::external(char* cmdline, long mode, char* startup_dir) ...@@ -287,7 +287,7 @@ int sbbs_t::external(char* cmdline, long mode, char* startup_dir)
if(native && mode&EX_OUTR && !(mode&EX_OFFLINE)) if(native && mode&EX_OUTR && !(mode&EX_OFFLINE))
use_pipes=true; use_pipes=true;
if(native) { // Native (32-bit) external if(native || mode&EX_OFFLINE) { // Native (32-bit) external
// Current environment passed to child process // Current environment passed to child process
sprintf(dszlog,"DSZLOG=%sPROTOCOL.LOG",cfg.node_dir); sprintf(dszlog,"DSZLOG=%sPROTOCOL.LOG",cfg.node_dir);
...@@ -299,6 +299,13 @@ int sbbs_t::external(char* cmdline, long mode, char* startup_dir) ...@@ -299,6 +299,13 @@ int sbbs_t::external(char* cmdline, long mode, char* startup_dir)
putenv(sbbsnnum); /* create environment var to contain node num */ putenv(sbbsnnum); /* create environment var to contain node num */
sprintf(sbbsctrl,"SBBSCTRL=%s",cfg.ctrl_dir); sprintf(sbbsctrl,"SBBSCTRL=%s",cfg.ctrl_dir);
putenv(sbbsctrl); putenv(sbbsctrl);
if(tm_p!=NULL) {
sprintf(env_day ,"DAY=%02u\n" ,tm_p->tm_mday);
sprintf(env_weekday ,"WEEKDAY=%s\n" ,wday[tm_p->tm_wday]);
sprintf(env_monthname ,"MONTHNAME=%s\n" ,mon[tm_p->tm_mon]);
sprintf(env_month ,"MONTH=%02u\n" ,tm_p->tm_mon+1);
sprintf(env_year ,"YEAR=%u\n" ,1900+tm_p->tm_year);
}
} else { // DOS external } else { // DOS external
...@@ -608,7 +615,7 @@ int sbbs_t::external(char* cmdline, long mode, char* startup_dir) ...@@ -608,7 +615,7 @@ int sbbs_t::external(char* cmdline, long mode, char* startup_dir)
Sleep(500); Sleep(500);
} else { } else {
if(nt) { // Windows NT/2000 if(nt || use_pipes) { // Windows NT/2000
/* Write to VDD */ /* Write to VDD */
......
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