mirror of https://github.com/BOINC/boinc.git
Add a header for definitions common to the master and client
git-svn-id: svn+ssh://cvs.lpds.sztaki.hu/var/lib/svn/szdg/dcapi/trunk@806 a7169a2c-3604-0410-bc95-c702d8d87f7a
This commit is contained in:
parent
83f4bb6297
commit
d7f3b4e309
|
@ -0,0 +1,12 @@
|
|||
/*
|
||||
* Common definitions used by both the master and the client
|
||||
*/
|
||||
|
||||
#ifndef COMMON_H
|
||||
#define COMMON_H
|
||||
|
||||
/* Logical names of the input/output files */
|
||||
#define INPUT_LABEL "in.txt"
|
||||
#define OUTPUT_LABEL "out.txt"
|
||||
|
||||
#endif /* COMMON_H */
|
|
@ -19,6 +19,10 @@
|
|||
*
|
||||
*****************************************************/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <dc.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
|
@ -29,11 +33,11 @@
|
|||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#define CHECKPOINT_LABEL "ckpt.txt"
|
||||
#define INPUT_LABEL "in.txt"
|
||||
#define OUTPUT_LABEL "out.txt"
|
||||
#include "common.h"
|
||||
|
||||
static int finished_wus = 0;
|
||||
#define CHECKPOINT_LABEL "ckpt.txt"
|
||||
|
||||
static int finished_wus;
|
||||
|
||||
static DC_Workunit *workunit;
|
||||
|
||||
|
@ -51,7 +55,7 @@ static void create_ckpt(void)
|
|||
char *ckpt;
|
||||
|
||||
f = fopen(CHECKPOINT_LABEL, "w");
|
||||
if(!f)
|
||||
if (!f)
|
||||
{
|
||||
DC_log(LOG_ERR, "Failed to open ckpt file (%s) for writing.", CHECKPOINT_LABEL);
|
||||
exit(1);
|
||||
|
|
Loading…
Reference in New Issue