summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: aeadb80)
raw | patch | inline | side by side (parent: aeadb80)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sat, 14 May 2005 21:57:46 +0000 (21:57 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sat, 14 May 2005 21:57:46 +0000 (21:57 +0000) |
diff --git a/program/src/getopt.c b/program/src/getopt.c
index 81a8e89b1b4e4d38fd64815e10b2266c829d153b..c1fd726b2d568d69c9178669b1af8375a56c558b 100644 (file)
--- a/program/src/getopt.c
+++ b/program/src/getopt.c
#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()
diff --git a/program/src/rrd_afm.c b/program/src/rrd_afm.c
index 0e3109c4804b7b0ed56e164382177d8591a58ef1..01c0dcefeaea5b1bd8325f4655194fcaea6b503c 100644 (file)
--- a/program/src/rrd_afm.c
+++ b/program/src/rrd_afm.c
* 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"
diff --git a/program/src/rrd_cgi.c b/program/src/rrd_cgi.c
index eab341440871e42b15459f565adc0e2fe08ab4d1..ed0f8373398024cbefbbbebcb307cf7c479975a5 100644 (file)
--- a/program/src/rrd_cgi.c
+++ b/program/src/rrd_cgi.c
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]);
index f508cf5393cf6009c1b6eea3ea2f128c0cdc8b59..dbf418df772db677d142ebee1df2c20dc6738aaa 100644 (file)
--- a/program/src/rrd_graph.c
+++ b/program/src/rrd_graph.c
#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];
index f40555d29cc38aa88a5d644839e2549d921cb096..22886c4b9085d5fe5a0b3fa9d3392f87a7e40e97 100644 (file)
#include "rrd_nan_inf.h"
-#if defined(WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__)
+#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__)
#include <math.h>
index ad53adf425a66dbc7c57d04978da9bbaa4928b9a..31df89f821286e9cb87fa92f62098c0806e64b53 100644 (file)
#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;
index 73d5dde72f7c68566003c4e96ce937643561b5d9..43deb6daed6d4ba667a592d5c5a3a26797572162 100644 (file)
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);
diff --git a/program/src/rrd_tool.c b/program/src/rrd_tool.c
index f3b73415fd82c6e50efe9905c7c4b7c285df1837..6724982a28ca9d4d782365a59e451a14593735f7 100644 (file)
--- a/program/src/rrd_tool.c
+++ b/program/src/rrd_tool.c
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"
diff --git a/program/src/rrd_tool.h b/program/src/rrd_tool.h
index 53bf50a53aa4216a3d76d10e5c75d63167bf0a71..ed08c79c681f60adfa34cbf9ce5099a469e7dd4b 100644 (file)
--- a/program/src/rrd_tool.h
+++ b/program/src/rrd_tool.h
#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 */
index 8fd951da6063bd1f57d8870bb084a5593643e3d6..a6b5983270ea18e18e65f294af36fb9a4069f439 100644 (file)
--- a/program/src/rrd_update.c
+++ b/program/src/rrd_update.c
#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 ) {
index ef63196b48b3ebd2b4c5aa0af9d54f4976e7dce8..5c6ae142cae3e6fa41ab6918e561511390c5d438 100644 (file)
--- a/program/src/rrd_xport.c
+++ b/program/src/rrd_xport.c
#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