diff options
author | Lev Walkin <vlm@lionet.info> | 2005-02-25 14:20:30 +0000 |
---|---|---|
committer | Lev Walkin <vlm@lionet.info> | 2005-02-25 14:20:30 +0000 |
commit | 4efbfb7e5553b41f4d725479823705aa6ef073cc (patch) | |
tree | da88699c9d0001e9f7415a7b38e1fc2887bf3503 /libasn1parser/asn1parser.c | |
parent | 8d35c46db72ad6cf53e47c10253d9754af535f22 (diff) |
portability fixes
Diffstat (limited to 'libasn1parser/asn1parser.c')
-rw-r--r-- | libasn1parser/asn1parser.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libasn1parser/asn1parser.c b/libasn1parser/asn1parser.c index 6a3477d1..c820cc4a 100644 --- a/libasn1parser/asn1parser.c +++ b/libasn1parser/asn1parser.c @@ -35,7 +35,7 @@ asn1p_parse_buffer(const char *buffer, int size /* = -1 */, enum asn1p_flags fla } if(size < 0) - size = strlen(buffer); + size = (int)strlen(buffer); ybuf = asn1p__scan_bytes(buffer, size); if(!ybuf) { @@ -67,7 +67,9 @@ asn1p_parse_buffer(const char *buffer, int size /* = -1 */, enum asn1p_flags fla */ asn1p_t * asn1p_parse_file(const char *filename, enum asn1p_flags flags) { +#ifndef WIN32 struct stat sb; +#endif asn1p_t *a = 0; void *ap; FILE *fp; @@ -84,6 +86,7 @@ asn1p_parse_file(const char *filename, enum asn1p_flags flags) { return NULL; } +#ifndef WIN32 if(fstat(fileno(fp), &sb) || !S_ISREG(sb.st_mode)) { fclose(fp); @@ -92,6 +95,7 @@ asn1p_parse_file(const char *filename, enum asn1p_flags flags) { errno = EINVAL; return NULL; } +#endif /* WIN32 */ asn1p_lineno = 1; |