Author: rmeggins
Update of /cvs/dirsec/dsgw
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv21875/dsgw
Modified Files:
Makefile.am cgiutil.c config.h.in configure.ac entrydisplay.c
aclocal.m4 configure missing install-sh Makefile.in depcomp
config.sub config.guess compile
Log Message:
fix build issues and compiler warnings on HP-UX
Index: Makefile.am
===================================================================
RCS file: /cvs/dirsec/dsgw/Makefile.am,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- Makefile.am 30 Jan 2008 02:22:46 -0000 1.9
+++ Makefile.am 30 Jan 2008 17:16:45 -0000 1.10
@@ -205,7 +205,7 @@
if WINNT
ICU_GENRB = @icu_bin@/genrb.exe
else
-ICU_GENRB = sh $(srcdir)/genrb_wrapper.sh @icu_bin@ @icu_lib@
+ICU_GENRB = sh $(srcdir)/genrb_wrapper.sh @icu_bin@ @icu_libdir@
endif
# The root resource bundle is based on English (en) locale;
Index: cgiutil.c
===================================================================
RCS file: /cvs/dirsec/dsgw/cgiutil.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- cgiutil.c 15 Jan 2008 18:23:43 -0000 1.3
+++ cgiutil.c 30 Jan 2008 17:16:45 -0000 1.4
@@ -138,7 +138,7 @@
int
dsgw_post_begin(FILE *in)
{
- char *ct, *tmp = NULL;
+ char *ct = NULL, *tmp = NULL;
char **vars = NULL;
if (( ct = getenv( "CONTENT_TYPE" )) == NULL ||
@@ -354,7 +354,7 @@
*pErrorCode = U_ZERO_ERROR;
- if(sourceSize<0 || source==NULL || nDest==NULL || nSource==NULL)
+ if(source==NULL || nDest==NULL || nSource==NULL)
{
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
return -1;
Index: config.h.in
===================================================================
RCS file: /cvs/dirsec/dsgw/config.h.in,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- config.h.in 10 Jan 2008 01:19:36 -0000 1.2
+++ config.h.in 30 Jan 2008 17:16:45 -0000 1.3
@@ -214,6 +214,9 @@
/* Define to 1 if your <sys/time.h> declares `struct tm'. */
#undef TM_IN_SYS_TIME
+/* use lockf instead of flock */
+#undef USE_LOCKF
+
/* Version number of package */
#undef VERSION
Index: configure.ac
===================================================================
RCS file: /cvs/dirsec/dsgw/configure.ac,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- configure.ac 28 Jan 2008 21:22:47 -0000 1.7
+++ configure.ac 30 Jan 2008 17:16:45 -0000 1.8
@@ -59,6 +59,9 @@
AC_FUNC_VPRINTF
AC_CHECK_FUNCS([ftruncate getcwd isascii localtime_r memmove memset select strcasecmp strchr strdup strerror strncasecmp strpbrk strrchr strstr strtoul])
+# check for lockf
+AC_CHECK_FUNC([lockf], [AC_DEFINE([USE_LOCKF], [1], [use lockf instead of flock])])
+
PACKAGE_BASE_NAME=`echo $PACKAGE_NAME | sed -e s/-gw//`
AC_SUBST(PACKAGE_BASE_NAME)
Index: entrydisplay.c
===================================================================
RCS file: /cvs/dirsec/dsgw/entrydisplay.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- entrydisplay.c 28 Jan 2008 21:22:47 -0000 1.3
+++ entrydisplay.c 30 Jan 2008 17:16:45 -0000 1.4
@@ -2215,7 +2215,7 @@
static void
bool_display( struct dsgw_attrdispinfo *adip )
{
- int boolval, free_onclick, pre_idx;
+ int boolval, pre_idx;
char *usestr, *truestr, *falsestr, *checked;
char *nameprefix, *onclick;
@@ -2227,7 +2227,6 @@
if (( adip->adi_opts & DSGW_ATTROPT_EDITABLE ) == 0 ) {
nameprefix = onclick = "";
- free_onclick = 0;
} else {
char *onclickfmt = " onClick=\"aChg('%s')\"";
@@ -2241,7 +2240,6 @@
onclick = dsgw_ch_malloc( strlen( onclickfmt ) +
strlen( adip->adi_attr ) + 1 );
sprintf( onclick, onclickfmt, adip->adi_attr );
- free_onclick = 1;
}
if (( truestr = get_arg_by_name( DSGW_ATTRARG_TRUESTR, adip->adi_argc,
Index: configure
===================================================================
RCS file: /cvs/dirsec/dsgw/configure,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- configure 30 Jan 2008 02:22:46 -0000 1.9
+++ configure 30 Jan 2008 17:16:45 -0000 1.10
@@ -21059,6 +21059,106 @@
done
+# check for lockf
+echo "$as_me:$LINENO: checking for lockf" >&5
+echo $ECHO_N "checking for lockf... $ECHO_C" >&6
+if test "${ac_cv_func_lockf+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define lockf to an innocuous variant, in case <limits.h> declares lockf.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define lockf innocuous_lockf
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char lockf (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef lockf
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char lockf ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_lockf) || defined (__stub___lockf)
+choke me
+#else
+char (*f) () = lockf;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != lockf;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_lockf=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_lockf=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_lockf" >&5
+echo "${ECHO_T}$ac_cv_func_lockf" >&6
+if test $ac_cv_func_lockf = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define USE_LOCKF 1
+_ACEOF
+
+fi
+
+
PACKAGE_BASE_NAME=`echo $PACKAGE_NAME | sed -e s/-gw//`
Index: Makefile.in
===================================================================
RCS file: /cvs/dirsec/dsgw/Makefile.in,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- Makefile.in 30 Jan 2008 02:22:46 -0000 1.9
+++ Makefile.in 30 Jan 2008 17:16:45 -0000 1.10
@@ -504,7 +504,7 @@
# add more here for localized bundles
nodist_property_DATA = root.res en.res en_US.res
MOSTLYCLEANFILES = dsgw.conf root.res dsgw.properties setup dsgw-httpd.conf en.res en_US.res
-@WINNT_FALSE@ICU_GENRB = sh $(srcdir)/genrb_wrapper.sh @icu_bin@ @icu_lib@
+@WINNT_FALSE@ICU_GENRB = sh $(srcdir)/genrb_wrapper.sh @icu_bin@ @icu_libdir@
# Resource Bundle Compiler
@WINNT_TRUE@ICU_GENRB = @icu_bin@/genrb.exe