projects
/
rrdtool.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed indentation ... gnu indent results are not realy beautifl. I might switch...
[rrdtool.git]
/
src
/
rrd_open.c
diff --git
a/src/rrd_open.c
b/src/rrd_open.c
index
88b50df
..
aa9350e
100644
(file)
--- a/
src/rrd_open.c
+++ b/
src/rrd_open.c
@@
-1,5
+1,5
@@
/*****************************************************************************
/*****************************************************************************
- * RRDtool 1.3
rc8
Copyright by Tobi Oetiker, 1997-2008
+ * RRDtool 1.3
.1
Copyright by Tobi Oetiker, 1997-2008
*****************************************************************************
* rrd_open.c Open an RRD File
*****************************************************************************
*****************************************************************************
* rrd_open.c Open an RRD File
*****************************************************************************
@@
-34,7
+34,7
@@
#endif
/* get the address of the start of this page */
#endif
/* get the address of the start of this page */
-#if defined USE_MADVISE || defined HAVE_POSIX_FADVISE
+#if defined USE_MADVISE || defined HAVE_POSIX_FADVISE
#ifndef PAGE_START
#define PAGE_START(addr) ((addr)&(~(_page_size-1)))
#endif
#ifndef PAGE_START
#define PAGE_START(addr) ((addr)&(~(_page_size-1)))
#endif
@@
-116,6
+116,9
@@
rrd_file_t *rrd_open(
mm_flags |= MAP_NONBLOCK; /* just populate ptes */
#endif
}
mm_flags |= MAP_NONBLOCK; /* just populate ptes */
#endif
}
+#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__)
+ flags |= O_BINARY;
+#endif
if ((rrd_file->fd = open(file_name, flags, mode)) < 0) {
rrd_set_error("opening '%s': %s", file_name, rrd_strerror(errno));
if ((rrd_file->fd = open(file_name, flags, mode)) < 0) {
rrd_set_error("opening '%s': %s", file_name, rrd_strerror(errno));
@@
-371,7
+374,7
@@
void rrd_dontneed(
#if defined DEBUG && DEBUG > 1
mincore_print(rrd_file, "after");
#endif
#if defined DEBUG && DEBUG > 1
mincore_print(rrd_file, "after");
#endif
-#endif /* without madvise and posix_fadvise ist does not make much sense todo anything */
+#endif
/* without madvise and posix_fadvise ist does not make much sense todo anything */
}
}
@@
-563,4
+566,3
@@
void rrd_freemem(
{
free(mem);
}
{
free(mem);
}
-