Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org 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" {
#endif
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 */
#else
#define FREE_AR(x) if(x!=NULL && x!=nular) { FREE(x); } /* allocated with arstr() */
#endif
/* 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 {
*error;
} read_cfg_text_t;
#ifdef __cplusplus
extern "C" {
#endif
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