Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, for more info) to build successfully.

Commit 6ae7fadb authored by rswindell's avatar rswindell

Updated FREE_AR macro: now nulls variable and works with .cpp files.

parent db57ad61
......@@ -47,16 +47,17 @@
memset(var,0,sizeof(var)); \
offset+=sizeof(var); }
#ifdef __cplusplus
extern "C" {
extern const char* scfgnulstr;
extern const uchar* nular;
#define FREE_AND_NULL(x) if(x!=NULL) { FREE(x); x=NULL; }
#ifdef SCFG
#define FREE_AR(x) /* static */
#define FREE_AR(x) if(x!=NULL && x!=nular) { FREE(x); } /* allocated with arstr() */
/* allocated with arstr() */
#define FREE_AR(x) if(x!=NULL && x!=nular) { FREE(x); x=NULL; }
typedef struct {
char *openerr,
......@@ -66,10 +67,6 @@ typedef struct {
} read_cfg_text_t;
#ifdef __cplusplus
extern "C" {
char* get_alloc(long *offset, char *outstr, int maxlen, FILE *instream);
BOOL allocerr(read_cfg_text_t* txt, long offset, char *fname, uint size);
char* readline(long *offset, char *str, int maxlen, FILE *stream);
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