mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-11-27 07:30:33 +08:00
Fixed nulldup issues: Jira # NCF-94
This commit is contained in:
parent
4f30d3694c
commit
a7fdbb176d
2
cf
2
cf
@ -14,7 +14,7 @@ DAP=1
|
||||
#cmds="all"
|
||||
#cmds="all check"
|
||||
#cmds="all dist"
|
||||
#cmds="all distcheck"
|
||||
cmds="all distcheck"
|
||||
|
||||
PREFIX="/tmp/install/${HOST}"
|
||||
stddir="/share/ed/local/${HOST}"
|
||||
|
@ -29,6 +29,9 @@ extern char* strdup(const char*);
|
||||
#ifndef nulllen
|
||||
#define nulllen(s) ((s)==NULL?0:strlen(s))
|
||||
#endif
|
||||
#ifndef nullfree
|
||||
#define nullfree(s) {if((s)!=NULL) {free(s);} else {}}
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_UCHAR
|
||||
typedef unsigned char uchar;
|
||||
|
@ -9,13 +9,6 @@
|
||||
|
||||
#undef DEBUG
|
||||
|
||||
#ifndef nulldup
|
||||
#define nulldup(s) ((s)==NULL?NULL:strdup(s))
|
||||
#endif
|
||||
#ifndef nullfree
|
||||
#define nullfree(s) if((s)!=NULL) {free(s);} else {}
|
||||
#endif
|
||||
|
||||
static void ceallnodesr(CCEnode* node, NClist* allnodes, CEsort which);
|
||||
|
||||
|
||||
|
@ -24,13 +24,6 @@
|
||||
|
||||
#define DEBUG
|
||||
|
||||
#ifndef nulldup
|
||||
#define nulldup(s) ((s)==NULL?NULL:strdup(s))
|
||||
#endif
|
||||
#ifndef nullfree
|
||||
#define nullfree(s) {if((s)!=NULL) {free(s);} else {}}
|
||||
#endif
|
||||
|
||||
static char* opstrings[] = OPSTRINGS ;
|
||||
|
||||
static int mergeprojection(DCEprojection* dst, DCEprojection* src);
|
||||
|
@ -20,13 +20,6 @@
|
||||
#include "dceconstraints.h"
|
||||
#include "dceparselex.h"
|
||||
|
||||
#ifndef nulldup
|
||||
#define nulldup(s) ((s)==NULL?NULL:strdup(s))
|
||||
#endif
|
||||
#ifndef nullfree
|
||||
#define nullfree(s) if((s)!=NULL) {free(s);} else {}
|
||||
#endif
|
||||
|
||||
static Object collectlist(Object list0, Object decl);
|
||||
|
||||
void
|
||||
|
@ -27,22 +27,6 @@
|
||||
#define NILLEN(s) ((s)==NULL?0:strlen(s))
|
||||
#endif
|
||||
|
||||
#ifndef nulldup
|
||||
#define nulldup(s) ((s)==NULL?NULL:strdup(s))
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRDUP
|
||||
static char* nulldup(char* s)
|
||||
{
|
||||
char* dup = NULL;
|
||||
if(s != NULL) {
|
||||
dup = (char*)malloc(strlen(s)+1);
|
||||
if(dup != NULL)
|
||||
strcpy(dup,s);
|
||||
}
|
||||
return dup;
|
||||
}
|
||||
#endif
|
||||
|
||||
static char* legalprotocols[] = {
|
||||
"file:",
|
||||
|
@ -10,7 +10,9 @@
|
||||
#ifndef NCGEN_INCLUDES_H
|
||||
#define NCGEN_INCLUDES_H
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@ -46,12 +48,6 @@
|
||||
#include "util.h"
|
||||
#include "debug.h"
|
||||
|
||||
#ifdef HAVE_STRDUP
|
||||
#define nulldup(s) ((s)==NULL?NULL:strdup(s))
|
||||
#else
|
||||
extern char* nulldup(const char*);
|
||||
#endif
|
||||
|
||||
extern int specialconstants;
|
||||
|
||||
#endif /* NCGEN_INCLUDES_H */
|
||||
|
Loading…
Reference in New Issue
Block a user