summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8926620)
raw | patch | inline | side by side (parent: 8926620)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Tue, 27 Oct 2009 17:49:29 +0000 (17:49 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Tue, 27 Oct 2009 17:49:29 +0000 (17:49 +0000) |
* make the code work on solaris 10 (tested on opencsw server farm. thanks!)
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1955 a5681a0c-68f1-0310-ab6d-d61299d08faa
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1955 a5681a0c-68f1-0310-ab6d-d61299d08faa
Makefile.am | patch | blob | history | |
configure.ac | patch | blob | history | |
src/rrd_client.c | patch | blob | history | |
src/rrd_graph.h | patch | blob | history | |
src/rrd_restore.c | patch | blob | history |
diff --git a/Makefile.am b/Makefile.am
index 9e1a22b9dfbd703c48464ef1383b8e0605af04a9..358a666ca0ba4d4d75e8139df54af35eb161d69b 100644 (file)
--- a/Makefile.am
+++ b/Makefile.am
# build the following subdirectories
-SUBDIRS = po src examples doc bindings intl
+SUBDIRS = po src examples doc bindings
# the following files are not mentioned in any other Makefile
EXTRA_DIST = COPYRIGHT CHANGES WIN32-BUILD-TIPS.txt TODO CONTRIBUTORS THREADS \
diff --git a/configure.ac b/configure.ac
index f21892fb6022050f722a2e606630ff2023d4ee77..f438a87e6b0d36c137f810c440671883d135999b 100644 (file)
--- a/configure.ac
+++ b/configure.ac
# include <malloc/malloc.h>
#endif
-#include <rrd_config_bottom.h>
+#include "src/rrd_config_bottom.h"
#endif
])
@@ -224,6 +224,12 @@ AC_CHECK_FUNCS(fdatasync, [], AC_CHECK_LIB(rt, fdatasync, [LIBS="${LIBS} -lrt";
dnl if there is no fdatasync we may get lucky with fsync
AC_CHECK_FUNCS(fsync)
+dnl check for socket and nsl solaris again ... we need this for the new rrd_daemon stuff
+
+AC_CHECK_FUNCS(socket, [], AC_CHECK_LIB(socket, socket, [LIBS="${LIBS} -lsocket"; AC_DEFINE(HAVE_SOCKET)],[]))
+AC_CHECK_FUNCS(getaddrinfo, [], AC_CHECK_LIB(nsl, getaddrinfo, [LIBS="${LIBS} -lnsl"; AC_DEFINE(HAVE_GETADDRINFO)],[]))
+
+
dnl XXX: dunno about windows.. add AC_CHECK_FUNCS(munmap) there too?
if test "x$enable_mmap" = "xyes"; then
diff --git a/src/rrd_client.c b/src/rrd_client.c
index 034beca9471a6a9ed7899e6c6f65d8b3322d386b..0b69000f26b1e01e0469289f31ef0f8c510fe776 100644 (file)
--- a/src/rrd_client.c
+++ b/src/rrd_client.c
#include "rrd_tool.h"
#include "rrd_client.h"
+#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
diff --git a/src/rrd_graph.h b/src/rrd_graph.h
index c11ac2fea851dc921420c1f6a07d9d21578483f0..7a85f340689ccd9173b9c30be2ab784a9d43fe79 100644 (file)
--- a/src/rrd_graph.h
+++ b/src/rrd_graph.h
#define y1 cairo_y1
#define index cairo_index
+/* this may configure __EXTENSIONS__ without which pango will fail to compile
+ so load this early */
+#include "../rrd_config.h"
+
#include <cairo.h>
#include <cairo-pdf.h>
#include <cairo-svg.h>
#include <cairo-ps.h>
-/* without this will not compile on solaris */
-#ifndef __EXTENSIONS__
-#define __EXTENSIONS__
-#endif
#include <pango/pangocairo.h>
diff --git a/src/rrd_restore.c b/src/rrd_restore.c
index d351cba169c6f8152bac6b7e9b3544107c20a9e6..6880be2f7c5d83444225d809dc0f3715ee5faceb 100644 (file)
--- a/src/rrd_restore.c
+++ b/src/rrd_restore.c
* $Id$
*************************************************************************** */
+#include "rrd_tool.h"
+#include "rrd_rpncalc.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
# define close _close
#endif
-#include "rrd_tool.h"
-#include "rrd_rpncalc.h"
#define ARRAY_LENGTH(a) (sizeof (a) / sizeof ((a)[0]))
xmlChar *text;
double temp;
- if ((text = (char *)get_xml_text(reader))!= NULL){
- char *c = text;
- while (c){
- *c=tolower((unsigned char)(*c));
- c++;
- }
+ if ((text = get_xml_text(reader))!= NULL){
if (xmlStrcasestr(text,(xmlChar *)"nan")){
*value = DNAN;
xmlFree(text);