diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2013-07-01 14:23:04 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2013-07-01 14:23:04 (GMT) |
commit | 53afd20aeb09fb2565811cc3dbf22890f0fcf900 (patch) | |
tree | f4d7a807515ed9c4f39fc7302824c55155cc9c0a /hl | |
parent | a157eb2f689d873a53e96cfc486db423658c7902 (diff) | |
download | hdf5-53afd20aeb09fb2565811cc3dbf22890f0fcf900.zip hdf5-53afd20aeb09fb2565811cc3dbf22890f0fcf900.tar.gz hdf5-53afd20aeb09fb2565811cc3dbf22890f0fcf900.tar.bz2 |
[svn-r23854] HDFFV-8302: Add macros/code function to use coorect Windows (v)snprintf statement. Also fix use other uses of macros for windows.
Tested
Diffstat (limited to 'hl')
-rw-r--r-- | hl/src/H5LTanalyze.c | 30 | ||||
-rw-r--r-- | hl/src/H5LTanalyze.l | 4 | ||||
-rw-r--r-- | hl/src/H5LTparse.y | 4 |
3 files changed, 27 insertions, 11 deletions
diff --git a/hl/src/H5LTanalyze.c b/hl/src/H5LTanalyze.c index 5ec795b..f02bed6 100644 --- a/hl/src/H5LTanalyze.c +++ b/hl/src/H5LTanalyze.c @@ -1400,54 +1400,58 @@ case 57: YY_RULE_SETUP #line 159 "H5LTanalyze.l" { +#ifdef H5_HAVE_WIN32_API + H5LTyylval.sval = _strdup(yytext); +#else /* H5_HAVE_WIN32_API */ H5LTyylval.sval = strdup(yytext); +#endif /* H5_HAVE_WIN32_API */ BEGIN INITIAL; return STRING; } YY_BREAK case 58: YY_RULE_SETUP -#line 165 "H5LTanalyze.l" +#line 169 "H5LTanalyze.l" {return token('{');} YY_BREAK case 59: YY_RULE_SETUP -#line 166 "H5LTanalyze.l" +#line 170 "H5LTanalyze.l" {return token('}');} YY_BREAK case 60: YY_RULE_SETUP -#line 167 "H5LTanalyze.l" +#line 171 "H5LTanalyze.l" {return token('[');} YY_BREAK case 61: YY_RULE_SETUP -#line 168 "H5LTanalyze.l" +#line 172 "H5LTanalyze.l" {return token(']');} YY_BREAK case 62: YY_RULE_SETUP -#line 169 "H5LTanalyze.l" +#line 173 "H5LTanalyze.l" {return token(':');} YY_BREAK case 63: YY_RULE_SETUP -#line 170 "H5LTanalyze.l" +#line 174 "H5LTanalyze.l" {return token(';');} YY_BREAK case 64: YY_RULE_SETUP -#line 171 "H5LTanalyze.l" +#line 175 "H5LTanalyze.l" ; YY_BREAK case 65: YY_RULE_SETUP -#line 172 "H5LTanalyze.l" +#line 176 "H5LTanalyze.l" { return 0; } YY_BREAK case 66: YY_RULE_SETUP -#line 174 "H5LTanalyze.l" +#line 178 "H5LTanalyze.l" ECHO; YY_BREAK #line 1432 "H5LTanalyze.c" @@ -2032,7 +2036,11 @@ FILE *file; #if YY_NEVER_INTERACTIVE b->yy_is_interactive = 0; #else - b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; +#ifdef H5_HAVE_WIN32_API + b->yy_is_interactive = file ? (isatty( _fileno(file) ) > 0) : 0; +#else /* H5_HAVE_WIN32_API */ + b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; +#endif /* H5_HAVE_WIN32_API */ #endif #endif } @@ -2327,7 +2335,7 @@ int main() return 0; } #endif -#line 174 "H5LTanalyze.l" +#line 178 "H5LTanalyze.l" int my_yyinput(char *buf, int max_size) { diff --git a/hl/src/H5LTanalyze.l b/hl/src/H5LTanalyze.l index 3f63f50..581672b 100644 --- a/hl/src/H5LTanalyze.l +++ b/hl/src/H5LTanalyze.l @@ -157,7 +157,11 @@ OPQ_TAG {return token(OPQ_TAG_TOKEN);} return token('"'); } <TAG_STRING>[^\"]+ { +#ifdef H5_HAVE_WIN32_API + H5LTyylval.sval = _strdup(yytext); +#else /* H5_HAVE_WIN32_API */ H5LTyylval.sval = strdup(yytext); +#endif /* H5_HAVE_WIN32_API */ BEGIN INITIAL; return STRING; } diff --git a/hl/src/H5LTparse.y b/hl/src/H5LTparse.y index a021efc..b91e97e 100644 --- a/hl/src/H5LTparse.y +++ b/hl/src/H5LTparse.y @@ -329,7 +329,11 @@ enum_list : ; enum_def : '"' enum_symbol '"' { is_enum_memb = 1; /*indicate member of enum*/ +#ifdef H5_HAVE_WIN32_API + enum_memb_symbol = _strdup(yylval.sval); +#else /* H5_HAVE_WIN32_API */ enum_memb_symbol = strdup(yylval.sval); +#endif /* H5_HAVE_WIN32_API */ } enum_val ';' { |