New defines: LOGDIR/EGWDIR/CGIDIR set in Makefile.
[egate.git] / www / wcgi.c
index 722d109..9653642 100644 (file)
  * USE OR PERFORMANCE OF THIS SOFTWARE.
  *
  * $Log: wcgi.c,v $
- * Revision 1.11  1996/01/08 08:42:19  adam
+ * Revision 1.12  1996/01/09 10:46:49  adam
+ * New defines: LOGDIR/EGWDIR/CGIDIR set in Makefile.
+ *
+ * Revision 1.11  1996/01/08  08:42:19  adam
  * Handles method GET.
  *
  * Revision 1.10  1996/01/05  16:21:20  adam
@@ -100,8 +103,6 @@ the server, please reload the server's 'front page'."
 #include <gw-db.h>
 #include "wproto.h"
 
-#define CGIDIR "/usr/local/etc/httpd/cgi-bin"
-
 static char *prog = "cgi";
 
 static char serverp[256] = {'\0'};
@@ -170,7 +171,7 @@ int main()
 
     chdir ("/usr/local/etc/httpd/cgi-bin");
     gw_log_init ("egw");
-    gw_log_file (GW_LOG_ALL, "/usr/local/etc/httpd/logs/egwcgi_log");
+    gw_log_file (GW_LOG_ALL, LOGDIR "/egwcgi_log");
     gw_log_level (GW_LOG_ALL);
     gw_log (GW_LOG_STAT, prog, "Europagate www cgi server");
 
@@ -207,7 +208,7 @@ int main()
        path_info++;
     if (*path_info)
        *(path_info++) = '\0';
-    if (!(gw_db = gw_db_open ("www.db", 1, 1)))
+    if (!(gw_db = gw_db_open (EGWDIR "/www.db", 1, 1)))
     {
         gw_log (GW_LOG_FATAL, prog, "gw_db_open");
         exit (1);