[prev in list] [next in list] [prev in thread] [next in thread] 

List:       netsaint-devel
Subject:    [netsaint-devel] Fix (O_TRUNC on read-only file descriptior not legal)
From:       Thorsten Lockert <tholo () sigmasoft ! com>
Date:       2001-02-13 23:33:51
[Download RAW message or body]

? config.log
? hosts.cfg
? config.cache
? config.status
? netsaint.cfg
? Makefile
? subst
? daemon-init
? commands.cfg
? nscgi.cfg
? test.cfg
? resource.cfg
? base/Makefile
? base/netsaint.h
? base/netsaint
? cgi/Makefile
? cgi/cgiutils.h
? cgi/avail.cgi
? cgi/cmd.cgi
? cgi/config.cgi
? cgi/extinfo.cgi
? cgi/history.cgi
? cgi/notifications.cgi
? cgi/outages.cgi
? cgi/showlog.cgi
? cgi/status.cgi
? cgi/statuswml.cgi
? cgi/tac.cgi
? cgi/statuswrl.cgi
? cgi/statusmap.cgi
? cgi/trends.cgi
? common/config.h
? common/locations.h
? html/Makefile
? html/index.html
? html/side.html
? xdata/Makefile
Index: configure
===================================================================
RCS file: /cvsroot/netsaint/netsaint-alpha/configure,v
retrieving revision 1.7
diff -u -r1.7 configure
--- configure	2001/01/31 02:59:46	1.7
+++ configure	2001/02/13 23:33:49
@@ -1233,7 +1233,7 @@
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_save_LIBS="$LIBS"
-	LIBS="-lgd -lz -lm -lpng $LIBS"
+	LIBS="-lgd -lz -lm -lpng -ljpeg $LIBS"
 	cat > conftest.$ac_ext <<EOF
 #line 1239 "configure"
 #include "confdefs.h"
@@ -1263,8 +1263,8 @@
 	  echo "$ac_t""yes" 1>&6
 	  
 		GDLIBFOUND=yep
-		GDLIBS="-lgd -lz -lm -lpng"
-	        
+		GDLIBS="-lgd -lz -lm -lpng -ljpeg"
+        	
 	else
 	  echo "$ac_t""no" 1>&6
 	:
@@ -1279,7 +1279,7 @@
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_save_LIBS="$LIBS"
-	LIBS="-lgd -lpng -lz -lm $LIBS"
+	LIBS="-lgd -lz -lm -lpng $LIBS"
 	cat > conftest.$ac_ext <<EOF
 #line 1285 "configure"
 #include "confdefs.h"
@@ -1309,7 +1309,7 @@
 	  echo "$ac_t""yes" 1>&6
 	  
 			GDLIBFOUND=yep
-			GDLIBS="-lgd -lpng -lz -lm"
+			GDLIBS="-lgd -lz -lm -lpng"
 	        	
 	else
 	  echo "$ac_t""no" 1>&6
@@ -1326,7 +1326,7 @@
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_save_LIBS="$LIBS"
-	LIBS="-lgd -lz -lm -lpng -ljpeg $LIBS"
+	LIBS="-lgd -lpng -lz -lm $LIBS"
 	cat > conftest.$ac_ext <<EOF
 #line 1332 "configure"
 #include "confdefs.h"
@@ -1356,7 +1356,7 @@
 	  echo "$ac_t""yes" 1>&6
 	  
 			GDLIBFOUND=yep
-			GDLIBS="-lgd -lz -lm -lpng -ljpeg"
+			GDLIBS="-lgd -lpng -lz -lm"
 	        	
 	else
 	  echo "$ac_t""no" 1>&6
@@ -1488,7 +1488,7 @@
 EOF
 
 	PERLLIBS="`perl -MExtUtils::Embed -e ldopts`" 
-	PERLDIR="`perl -MConfig -e 'print $Config{archlib}'`" 
+	PERLDIR="`perl -MConfig -e 'print $Config{installsitearch}'`" 
 	CFLAGS="${CFLAGS} `perl -MExtUtils::Embed -e ccopts`" 
 	USEPERL=yes
 	INSTALLPERLSTUFF=yes;
Index: configure.in
===================================================================
RCS file: /cvsroot/netsaint/netsaint-alpha/configure.in,v
retrieving revision 1.7
diff -u -r1.7 configure.in
--- configure.in	2001/01/31 02:59:46	1.7
+++ configure.in	2001/02/13 23:33:50
@@ -340,29 +340,29 @@
 dnl Should we try and detect the GD libs?
 if test x$TRYGD = xyep; then
 
-	dnl See if the GD lib is available and supports PNG images...
+	dnl GD 1.8.1 requires the jpeg library to be present as well, so test for that \
first...  dnl	AC_CHECK_LIB(gd,gdImagePng,[
 	JMD_CHECK_LIB_ORDER(gd,gdImagePng,1,[
 		GDLIBFOUND=yep
-		GDLIBS="-lgd -lz -lm -lpng"
-	        ],:,[-lz -lm -lpng])
+		GDLIBS="-lgd -lz -lm -lpng -ljpeg"
+        	],:,[-lz -lm -lpng -ljpeg])
 
-	dnl If we failed the first time, try again with different library ordering...
+	dnl See if the GD lib is available and supports PNG images...
 	if test x$GDLIBFOUND = x; then
 dnl		AC_CHECK_LIB(gd,gdImagePng,[
 		JMD_CHECK_LIB_ORDER(gd,gdImagePng,2,[
 			GDLIBFOUND=yep
-			GDLIBS="-lgd -lpng -lz -lm"
-	        	],:,[-lpng -lz -lm])
+			GDLIBS="-lgd -lz -lm -lpng"
+	        	],:,[-lz -lm -lpng])
 	fi
 
-	dnl GD 1.8.1 requires the jpeg library to be present as well, so test for that if \
we failed the second time... +	dnl If we failed the first time, try again with \
different library ordering...  if test x$GDLIBFOUND = x; then
 dnl		AC_CHECK_LIB(gd,gdImagePng,[
 		JMD_CHECK_LIB_ORDER(gd,gdImagePng,3,[
 			GDLIBFOUND=yep
-			GDLIBS="-lgd -lz -lm -lpng -ljpeg"
-	        	],:,[-lz -lm -lpng -ljpeg])
+			GDLIBS="-lgd -lpng -lz -lm"
+	        	],:,[-lpng -lz -lm])
 	fi
 
 	dnl Did we find the necessary GD libraries?
@@ -416,7 +416,7 @@
 AC_ARG_ENABLE(embedded-perl,--enable-embedded-perl will enable embedded Perl \
interpreter,[  AC_DEFINE_UNQUOTED(EMBEDDEDPERL)
 	PERLLIBS="`perl -MExtUtils::Embed -e ldopts`" 
-	PERLDIR="`perl -MConfig -e 'print $Config{archlib}'`" 
+	PERLDIR="`perl -MConfig -e 'print $Config{installsitearch}'`" 
 	CFLAGS="${CFLAGS} `perl -MExtUtils::Embed -e ccopts`" 
 	USEPERL=yes
 	INSTALLPERLSTUFF=yes;
Index: base/commands.c
===================================================================
RCS file: /cvsroot/netsaint/netsaint-alpha/base/commands.c,v
retrieving revision 1.3
diff -u -r1.3 commands.c
--- base/commands.c	2001/02/09 03:10:34	1.3
+++ base/commands.c	2001/02/13 23:33:50
@@ -94,6 +94,9 @@
 	/* reset passive check result list pointer */
 	passive_check_result_list=NULL;
 
+	/* clear EOF condition from prior run */
+	clearerr(command_file_fp);
+
 	/* process all commands in the file (now implemented as a named pipe) */
 	while(fgets(buffer,(int)(sizeof(buffer)-1),command_file_fp)!=NULL){
 
Index: base/utils.c
===================================================================
RCS file: /cvsroot/netsaint/netsaint-alpha/base/utils.c,v
retrieving revision 1.7
diff -u -r1.7 utils.c
--- base/utils.c	2001/02/08 06:00:52	1.7
+++ base/utils.c	2001/02/13 23:33:51
@@ -2106,7 +2106,7 @@
 	        }
 
 	/* open the command file for reading (non-blocked) */
-	if((command_file_fd=open(command_file,O_RDONLY | O_NONBLOCK | O_TRUNC))<0){
+	if((command_file_fd=open(command_file,O_RDONLY | O_NONBLOCK))<0){
 
 		snprintf(buffer,sizeof(buffer)-1,"Error: Could not open external command file for \
reading via open(): (%d) -> %s\n",errno,strerror(errno));  \
                buffer[sizeof(buffer)-1]='\x0';
Index: common/Makefile
===================================================================
RCS file: /cvsroot/netsaint/netsaint-alpha/common/Makefile,v
retrieving revision 1.12
diff -u -r1.12 Makefile
--- common/Makefile	2001/02/08 06:13:26	1.12
+++ common/Makefile	2001/02/13 23:33:51
@@ -11,8 +11,8 @@
 SRC_CGI=../cgi
 
 CC=gcc
-CFLAGS=-g -O2 -DHAVE_CONFIG_H
-LDFLAGS= -lmysqlclient 
+CFLAGS= -I/usr/local/include  -fno-strict-aliasing -I/usr/local/include  \
-I/usr/libdata/perl5/i386-openbsd/5.6.0/CORE  -DHAVE_CONFIG_H +LDFLAGS= \
-L/usr/local/lib   
 prefix=/usr/local/netsaint
 exec_prefix=${prefix}

_______________________________________________
Netsaint-devel mailing list
Netsaint-devel@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/netsaint-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic