|
@@ -183,6 +183,7 @@
|
|
#include "basex.h" /* init */
|
|
#include "basex.h" /* init */
|
|
#include "pvapi_init.h" /* init */
|
|
#include "pvapi_init.h" /* init */
|
|
#include "pv_core.h" /* register core pvars */
|
|
#include "pv_core.h" /* register core pvars */
|
|
|
|
+#include "ppcfg.h"
|
|
|
|
|
|
#ifdef DEBUG_DMALLOC
|
|
#ifdef DEBUG_DMALLOC
|
|
#include <dmalloc.h>
|
|
#include <dmalloc.h>
|
|
@@ -246,7 +247,8 @@ Options:\n\
|
|
-G file Create a pgid file\n\
|
|
-G file Create a pgid file\n\
|
|
-O nr Script optimization level (debugging option)\n\
|
|
-O nr Script optimization level (debugging option)\n\
|
|
-a mode Auto aliases mode: enable with yes or on,\n\
|
|
-a mode Auto aliases mode: enable with yes or on,\n\
|
|
- disable with no or off\n"
|
|
|
|
|
|
+ disable with no or off\n\
|
|
|
|
+ -A define Add config pre-processor define (e.g., -A WITH_AUTH)\n"
|
|
#ifdef STATS
|
|
#ifdef STATS
|
|
" -s file File to which statistics is dumped (disabled otherwise)\n"
|
|
" -s file File to which statistics is dumped (disabled otherwise)\n"
|
|
#endif
|
|
#endif
|
|
@@ -1649,6 +1651,7 @@ int main(int argc, char** argv)
|
|
struct timeval tval;
|
|
struct timeval tval;
|
|
fd_set fds;
|
|
fd_set fds;
|
|
int res;
|
|
int res;
|
|
|
|
+ char *p;
|
|
|
|
|
|
/*init*/
|
|
/*init*/
|
|
time(&up_since);
|
|
time(&up_since);
|
|
@@ -1667,7 +1670,7 @@ int main(int argc, char** argv)
|
|
"DBG_MSG_QA enabled, ser may exit abruptly\n");
|
|
"DBG_MSG_QA enabled, ser may exit abruptly\n");
|
|
#endif
|
|
#endif
|
|
|
|
|
|
- options= ":f:cm:dVhEb:l:L:n:vrRDTN:W:w:t:u:g:P:G:SQ:O:a:"
|
|
|
|
|
|
+ options= ":f:cm:dVhEb:l:L:n:vrRDTN:W:w:t:u:g:P:G:SQ:O:a:A:"
|
|
#ifdef STATS
|
|
#ifdef STATS
|
|
"s:"
|
|
"s:"
|
|
#endif
|
|
#endif
|
|
@@ -1749,6 +1752,26 @@ int main(int argc, char** argv)
|
|
/* user needed for possible shm. pre-init */
|
|
/* user needed for possible shm. pre-init */
|
|
user=optarg;
|
|
user=optarg;
|
|
break;
|
|
break;
|
|
|
|
+ case 'A':
|
|
|
|
+ p = strchr(optarg, '=');
|
|
|
|
+ if(p) {
|
|
|
|
+ *p = '\0';
|
|
|
|
+ }
|
|
|
|
+ if(pp_define(strlen(optarg), optarg)<0) {
|
|
|
|
+ fprintf(stderr, "error at define param: -A %s\n",
|
|
|
|
+ optarg);
|
|
|
|
+ goto error;
|
|
|
|
+ }
|
|
|
|
+ if(p) {
|
|
|
|
+ *p = '=';
|
|
|
|
+ p++;
|
|
|
|
+ if(pp_define_set(strlen(p), p)<0) {
|
|
|
|
+ fprintf(stderr, "error at define value: -A %s\n",
|
|
|
|
+ optarg);
|
|
|
|
+ goto error;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ break;
|
|
case 'b':
|
|
case 'b':
|
|
case 'l':
|
|
case 'l':
|
|
case 'n':
|
|
case 'n':
|
|
@@ -1864,6 +1887,7 @@ try_again:
|
|
case 'V':
|
|
case 'V':
|
|
case 'h':
|
|
case 'h':
|
|
case 'O':
|
|
case 'O':
|
|
|
|
+ case 'A':
|
|
break;
|
|
break;
|
|
case 'E':
|
|
case 'E':
|
|
log_stderr=1; // use in both getopt switches
|
|
log_stderr=1; // use in both getopt switches
|