mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=101
This commit is contained in:
parent
a994fe0520
commit
9b5c58698c
|
@ -21,6 +21,10 @@
|
|||
#include <math.h>
|
||||
#include <time.h>
|
||||
|
||||
#ifdef _USING_FCGI_
|
||||
#undef _USING_FCGI_
|
||||
#endif
|
||||
|
||||
#include "error_numbers.h"
|
||||
#include "file_names.h"
|
||||
#include "parse.h"
|
||||
|
|
|
@ -0,0 +1,68 @@
|
|||
DEPTH = ..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
all: cgi
|
||||
|
||||
CFLAGS = -g -Wall -include /usr/local/include/fcgi_stdio.h -d _USING_FCGI_ @DEFS@ -I@top_srcdir@/db -I@top_srcdir@/lib -I@top_srcdir@/tools
|
||||
CC = g++ $(CFLAGS)
|
||||
|
||||
CLIBS = @LIBS@ -lfcgi -lfcgi++
|
||||
|
||||
PROGS = cgi feeder show_shmem
|
||||
|
||||
all: $(PROGS)
|
||||
|
||||
CGI_OBJS = \
|
||||
handle_request.o \
|
||||
main.o \
|
||||
sched_shmem.o \
|
||||
server_types.o \
|
||||
../db/db_mysql.o \
|
||||
../db/mysql_util.o \
|
||||
../lib/shmem.o \
|
||||
parse.o \
|
||||
../tools/process_result_template.o
|
||||
|
||||
FEEDER_OBJS = \
|
||||
feeder.o \
|
||||
sched_shmem.o \
|
||||
../db/db_mysql.o \
|
||||
../db/mysql_util.o \
|
||||
../lib/shmem.o
|
||||
|
||||
SHOW_SHMEM_OBJS = \
|
||||
show_shmem.o \
|
||||
sched_shmem.o \
|
||||
../db/db_mysql.o \
|
||||
../db/mysql_util.o \
|
||||
../lib/shmem.o
|
||||
|
||||
MYSQL_DIR = /usr/local/mysql/lib
|
||||
MYSQL_LIBS = \
|
||||
-L$(MYSQL_DIR) -L/sw/lib/mysql -L/usr/local/lib/mysql \
|
||||
-lmysqlclient -L/usr/local/lib -lz \
|
||||
-lm $(NETLIBS)
|
||||
|
||||
.C.o:
|
||||
$(CC) -c -o $*.o $<
|
||||
.c.o:
|
||||
$(CC) -c -o $*.o $<
|
||||
|
||||
cgi: $(CGI_OBJS)
|
||||
$(CC) $(CGI_OBJS) $(MYSQL_LIBS) $(CLIBS) -o cgi
|
||||
|
||||
feeder: $(FEEDER_OBJS)
|
||||
$(CC) $(FEEDER_OBJS) $(MYSQL_LIBS) $(CLIBS) -o feeder
|
||||
|
||||
show_shmem: $(SHOW_SHMEM_OBJS)
|
||||
$(CC) $(SHOW_SHMEM_OBJS) $(MYSQL_LIBS) $(CLIBS) -o show_shmem
|
||||
|
||||
dependencies: @srcdir@/*.C
|
||||
$(CC) -M @srcdir@/*.C > dependencies
|
||||
|
||||
include dependencies
|
||||
|
||||
clean:
|
||||
rm -f $(PROGS) *.o core dependencies config.cache
|
|
@ -5,10 +5,10 @@ VPATH = @srcdir@
|
|||
|
||||
all: cgi
|
||||
|
||||
CFLAGS = -g -Wall -include /usr/local/include/fcgi_stdio.h @DEFS@ -I@top_srcdir@/db -I@top_srcdir@/lib -I@top_srcdir@/tools
|
||||
CFLAGS = -g -Wall @DEFS@ -I@top_srcdir@/db -I@top_srcdir@/lib -I@top_srcdir@/tools
|
||||
CC = g++ $(CFLAGS)
|
||||
|
||||
CLIBS = @LIBS@ -lfcgi -lfcgi++
|
||||
CLIBS = @LIBS@
|
||||
|
||||
PROGS = cgi feeder show_shmem
|
||||
|
||||
|
|
|
@ -0,0 +1,68 @@
|
|||
DEPTH = ..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
all: cgi
|
||||
|
||||
CFLAGS = -g -Wall @DEFS@ -I@top_srcdir@/db -I@top_srcdir@/lib -I@top_srcdir@/tools
|
||||
CC = g++ $(CFLAGS)
|
||||
|
||||
CLIBS = @LIBS@
|
||||
|
||||
PROGS = cgi feeder show_shmem
|
||||
|
||||
all: $(PROGS)
|
||||
|
||||
CGI_OBJS = \
|
||||
handle_request.o \
|
||||
main.o \
|
||||
sched_shmem.o \
|
||||
server_types.o \
|
||||
../db/db_mysql.o \
|
||||
../db/mysql_util.o \
|
||||
../lib/shmem.o \
|
||||
../lib/parse.o \
|
||||
../tools/process_result_template.o
|
||||
|
||||
FEEDER_OBJS = \
|
||||
feeder.o \
|
||||
sched_shmem.o \
|
||||
../db/db_mysql.o \
|
||||
../db/mysql_util.o \
|
||||
../lib/shmem.o
|
||||
|
||||
SHOW_SHMEM_OBJS = \
|
||||
show_shmem.o \
|
||||
sched_shmem.o \
|
||||
../db/db_mysql.o \
|
||||
../db/mysql_util.o \
|
||||
../lib/shmem.o
|
||||
|
||||
MYSQL_DIR = /usr/local/mysql/lib
|
||||
MYSQL_LIBS = \
|
||||
-L$(MYSQL_DIR) -L/sw/lib/mysql -L/usr/local/lib/mysql \
|
||||
-lmysqlclient -L/usr/local/lib -lz \
|
||||
-lm $(NETLIBS)
|
||||
|
||||
.C.o:
|
||||
$(CC) -c -o $*.o $<
|
||||
.c.o:
|
||||
$(CC) -c -o $*.o $<
|
||||
|
||||
cgi: $(CGI_OBJS)
|
||||
$(CC) $(CGI_OBJS) $(MYSQL_LIBS) $(CLIBS) -o cgi
|
||||
|
||||
feeder: $(FEEDER_OBJS)
|
||||
$(CC) $(FEEDER_OBJS) $(MYSQL_LIBS) $(CLIBS) -o feeder
|
||||
|
||||
show_shmem: $(SHOW_SHMEM_OBJS)
|
||||
$(CC) $(SHOW_SHMEM_OBJS) $(MYSQL_LIBS) $(CLIBS) -o show_shmem
|
||||
|
||||
dependencies: @srcdir@/*.C
|
||||
$(CC) -M @srcdir@/*.C > dependencies
|
||||
|
||||
include dependencies
|
||||
|
||||
clean:
|
||||
rm -f $(PROGS) *.o core dependencies config.cache
|
|
@ -46,7 +46,9 @@
|
|||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#ifdef _USING_FCGI_
|
||||
#include "/usr/local/include/fcgi_stdio.h"
|
||||
#endif
|
||||
|
||||
#include "db.h"
|
||||
#include "shmem.h"
|
||||
|
|
|
@ -21,11 +21,19 @@
|
|||
#include <sys/wait.h>
|
||||
#include <time.h>
|
||||
|
||||
#ifdef _USING_FCGI_
|
||||
#include "/usr/local/include/fcgi_stdio.h"
|
||||
#endif
|
||||
|
||||
#include "db.h"
|
||||
#include "backend_lib.h"
|
||||
|
||||
#ifndef _USING_FCGI_
|
||||
#include "parse.h"
|
||||
#else
|
||||
#include "fcgi_parse.h"
|
||||
#endif
|
||||
|
||||
#include "server_types.h"
|
||||
#include "handle_request.h"
|
||||
|
||||
|
|
16
sched/main.C
16
sched/main.C
|
@ -17,18 +17,20 @@
|
|||
// Contributor(s):
|
||||
//
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "/usr/local/include/fcgi_stdio.h"
|
||||
#define _USING_FCGI_ //used to tell lib to inlcude fcgi_stdio.h
|
||||
|
||||
#include "db.h"
|
||||
#include "parse.h"
|
||||
#include "shmem.h"
|
||||
#include "server_types.h"
|
||||
#include "handle_request.h"
|
||||
|
||||
#ifdef _USING_FCGI_
|
||||
#include "/usr/local/include/fcgi_stdio.h"
|
||||
#endif
|
||||
|
||||
#define REQ_FILE_PREFIX "/tmp/boinc_req_"
|
||||
#define REPLY_FILE_PREFIX "/tmp/boinc_reply_"
|
||||
|
||||
|
@ -50,8 +52,10 @@ int main() {
|
|||
char req_path[256], reply_path[256];
|
||||
SCHED_SHMEM* ssp;
|
||||
void* p;
|
||||
|
||||
while(FCGI_Accept() >= 0) {
|
||||
|
||||
#ifdef _USING_FCGI_
|
||||
while(FCGI_Accept >= 0) {
|
||||
#endif
|
||||
retval = attach_shmem(BOINC_KEY, &p);
|
||||
if (retval) {
|
||||
printf("can't attach shmem\n");
|
||||
|
@ -114,5 +118,7 @@ int main() {
|
|||
|
||||
unlink(req_path);
|
||||
unlink(reply_path);
|
||||
#ifdef _USING_FCGI_
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifdef _USING_FCGI_
|
||||
#include "/usr/local/include/fcgi_stdio.h"
|
||||
#endif
|
||||
|
||||
#include "db.h"
|
||||
|
||||
|
|
|
@ -19,7 +19,9 @@
|
|||
|
||||
#include <strings.h>
|
||||
|
||||
#ifdef _USING_FCGI_
|
||||
#include "/usr/local/include/fcgi_stdio.h"
|
||||
#endif
|
||||
|
||||
#include "parse.h"
|
||||
#include "server_types.h"
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#include <stdio.h>
|
||||
|
||||
#ifdef _USING_FCGI_
|
||||
#include "/usr/local/include/fcgi_stdio.h"
|
||||
#endif
|
||||
|
||||
#include "shmem.h"
|
||||
#include "sched_shmem.h"
|
||||
|
|
Loading…
Reference in New Issue