#endif
#endif
-#if defined (WIN32) && !defined (__CYGWIN32__)
+#if defined (_WIN32) && !defined (__CYGWIN32__)
/* It's not Unix, really. See? Capital letters. */
#include <windows.h>
#define getpid() GetCurrentProcessId()
* rrd_afm.h Parsing afm tables to find width of strings.
****************************************************************************/
-#if defined(WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__)
+#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__)
#include "../confignt/config.h"
#else
#include "config.h"
if (envvar) {
return stralloc(envvar);
} else {
-#if defined(WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__)
+#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__)
_snprintf(buf, sizeof(buf), "[ERROR:_getenv_'%s'_failed", args[0]);
#else
snprintf(buf, sizeof(buf), "[ERROR:_getenv_'%s'_failed", args[0]);
if (value) {
return stralloc(value);
} else {
-#if defined(WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__)
+#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__)
_snprintf(buf, sizeof(buf), "[ERROR:_getvar_'%s'_failed", args[0]);
#else
snprintf(buf, sizeof(buf), "[ERROR:_getvar_'%s'_failed", args[0]);
#include "rrd_tool.h"
-#if defined(WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__)
+#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__)
#include <io.h>
#include <fcntl.h>
#endif
if (strcmp(im->graphfile,"-")==0) {
fo = im->graphhandle ? im->graphhandle : stdout;
-#if defined(WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__)
+#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__)
/* Change translation mode for stdout to BINARY */
_setmode( _fileno( fo ), O_BINARY );
#endif
for(i=0;i<DIM(graph_col);i++)
im->graph_col[i]=graph_col[i];
-#if defined(WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__)
+#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__)
{
char *windir;
char rrd_win_default_font[1000];
#include "rrd_nan_inf.h"
-#if defined(WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__)
+#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__)
#include <math.h>
#include "rrd_rpncalc.h"
#include <fcntl.h>
-#if defined(WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__)
+#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__)
#include <io.h>
#define open _open
#define close _close
if (strcmp("-",file_name)==0){
rrd_file= stdout;
} else {
-#if defined(WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__)
+#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__)
fdflags = O_RDWR|O_BINARY|O_CREAT;
#else
fdflags = O_WRONLY|O_CREAT;
if (rpnc[i].op == OP_NUMBER) {
/* convert a short into a string */
-#if defined(WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__)
+#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__)
_itoa(rpnc[i].val,buffer,10);
#else
sprintf(buffer,"%d",rpnc[i].val);
char help_main[] =
"RRDtool 1.2.6 Copyright 1997-2005 by Tobias Oetiker <tobi@oetiker.ch>\n"
-#if defined(WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__)
+#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__)
" Compiled " __DATE__ " " __TIME__ "\n\n"
#else
" Compiled " MAKE_TIMESTAMP "\n\n"
#ifndef _RRD_TOOL_H
#define _RRD_TOOL_H
-#if defined(WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__)
+#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__)
#include "../confignt/config.h"
#else
#ifdef HAVE_CONFIG_H
#include "rrd.h"
-#if defined(WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__)
+#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__)
/* Win32 only includes */
#include <sys/mman.h>
#endif
-#if defined(WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__)
+#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__)
#include <sys/locking.h>
#include <sys/stat.h>
#include <io.h>
#include "rrd_is_thread_safe.h"
#include "unused.h"
-#if defined(WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__)
+#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__)
/*
* WIN32 does not have gettimeofday and struct timeval. This is a quick and dirty
* replacement.
rrd_fd = fileno(rrdfile);
{
-#if defined(WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__)
+#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__)
struct _stat st;
if ( _fstat( rrd_fd, &st ) == 0 ) {
#include "rrd_xport.h"
#include "unused.h"
-#if defined(WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__)
+#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__)
#include <io.h>
#include <fcntl.h>
#endif