mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-11-27 07:30:33 +08:00
Merge branch 'master' into cleanup.wif
This commit is contained in:
commit
752a040bb0
@ -1418,6 +1418,7 @@ CHECK_FUNCTION_EXISTS(getrlimit HAVE_GETRLIMIT)
|
||||
CHECK_FUNCTION_EXISTS(_filelengthi64 HAVE_FILE_LENGTH_I64)
|
||||
CHECK_FUNCTION_EXISTS(mmap HAVE_MMAP)
|
||||
CHECK_FUNCTION_EXISTS(mremap HAVE_MREMAP)
|
||||
CHECK_FUNCTION_EXISTS(fileno HAVE_FILENO)
|
||||
|
||||
# Check to see if MAP_ANONYMOUS is defined.
|
||||
CHECK_C_SOURCE_COMPILES("
|
||||
|
@ -199,6 +199,8 @@ are set when opening a binary file on Windows. */
|
||||
/* Define if we have filelengthi64. */
|
||||
#cmakedefine HAVE_FILE_LENGTH_I64 @HAVE_FILE_LENGTH_I64@
|
||||
|
||||
/* Define to 1 if you have the `fileno' function. */
|
||||
#cmakedefine HAVE_FILENO 1
|
||||
|
||||
/* Define to 1 if you have the `fsync' function. */
|
||||
#cmakedefine HAVE_FSYNC 1
|
||||
|
@ -13,6 +13,9 @@
|
||||
#ifdef HAVE_STDLIB_H
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
#ifdef HAVE_STDIO_H
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
This is included in bottom
|
||||
@ -63,8 +66,13 @@ extern int snprintf(char*, size_t, const char*, ...);
|
||||
extern int strcasecmp(const char*, const char*);
|
||||
extern long long int strtoll(const char*, char**, int);
|
||||
extern unsigned long long int strtoull(const char*, char**, int);
|
||||
|
||||
#ifndef fileno
|
||||
extern int fileno(FILE*);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /*STDC*/
|
||||
#endif /*!WIN32*/
|
||||
|
||||
#ifdef _WIN32
|
||||
#ifndef strlcat
|
||||
|
@ -32,7 +32,6 @@
|
||||
#ifdef HAVE_STDIO_H
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
extern int fileno(FILE*);
|
||||
|
||||
#include "ncdispatch.h"
|
||||
#include "netcdf_mem.h"
|
||||
|
@ -13,6 +13,9 @@
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#include "ncdispatch.h"
|
||||
#include "ncwinpath.h"
|
||||
@ -775,10 +778,11 @@ openmagic(struct MagicFile* file)
|
||||
{
|
||||
if(file->path == NULL || strlen(file->path)==0)
|
||||
{status = NC_EINVAL; goto done;}
|
||||
|
||||
#ifdef _WIN32
|
||||
file->fp = fopen(file->path, "rb");
|
||||
file->fp = NCfopen(file->path, "rb");
|
||||
#else
|
||||
file->fp = fopen(file->path, "r");
|
||||
file->fp = NCfopen(file->path, "r");
|
||||
#endif
|
||||
if(file->fp == NULL)
|
||||
{status = errno; goto done;}
|
||||
|
@ -10,7 +10,6 @@
|
||||
#ifdef HAVE_STDIO_H
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
extern int fileno(FILE*);
|
||||
|
||||
/**
|
||||
Create a netCDF file for parallel I/O.
|
||||
|
@ -30,6 +30,7 @@
|
||||
|
||||
#include "bzlib_private.h"
|
||||
|
||||
extern FILE* fdopen(int,const char*);
|
||||
|
||||
/*---------------------------------------------------*/
|
||||
/*--- Compression stuff ---*/
|
||||
|
Loading…
Reference in New Issue
Block a user