]> git.webhop.me Git - lcd4linux.git/commitdiff
[lcd4linux @ 2000-08-10 18:42:20 by reinelt]
authorreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>
Thu, 10 Aug 2000 18:42:20 +0000 (18:42 +0000)
committerreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>
Thu, 10 Aug 2000 18:42:20 +0000 (18:42 +0000)
fixed some bugs with the new syslog code

git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@65 3ae390bd-cb1e-0410-b409-cd5a39f66f1f

XWindow.c
configure
configure.in
isdn.c
lcd4linux.c

index ad8c2075c06a767b529630e265a89c5232251357..7bbc3511716a1f9756fa7f39f1ca598f064fb777 100644 (file)
--- a/XWindow.c
+++ b/XWindow.c
@@ -1,4 +1,4 @@
-/* $Id: XWindow.c,v 1.20 2000/08/10 09:44:09 reinelt Exp $
+/* $Id: XWindow.c,v 1.21 2000/08/10 18:42:20 reinelt Exp $
  *
  * X11 Driver for LCD4Linux 
  *
  *
  *
  * $Log: XWindow.c,v $
+ * Revision 1.21  2000/08/10 18:42:20  reinelt
+ *
+ * fixed some bugs with the new syslog code
+ *
  * Revision 1.20  2000/08/10 09:44:09  reinelt
  *
  * new debugging scheme: error(), info(), debug()
 #include       <stdio.h>
 #include       <stdlib.h>
 #include       <string.h>
+#include       <errno.h>
 #include       <sys/types.h>
 #include       <sys/ipc.h>
 #include       <sys/sem.h>
index 0c21ab8ec1b83c36a24a167af8a0876050ac92d8..29ed31e2be4342c598986296840a11f157575d4d 100755 (executable)
--- a/configure
+++ b/configure
@@ -2194,7 +2194,7 @@ EOF
 
 fi
 
-for ac_hdr in fcntl.h sys/ioctl.h sys/time.h unistd.h
+for ac_hdr in fcntl.h sys/ioctl.h sys/time.h syslog.h unistd.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
@@ -2275,13 +2275,88 @@ fi
 done
 
 
+echo $ac_n "checking for working const""... $ac_c" 1>&6
+echo "configure:2280: checking for working const" >&5
+if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 2285 "configure"
+#include "confdefs.h"
+
+int main() {
+
+/* Ultrix mips cc rejects this.  */
+typedef int charset[2]; const charset x;
+/* SunOS 4.1.1 cc rejects this.  */
+char const *const *ccp;
+char **p;
+/* NEC SVR4.0.2 mips cc rejects this.  */
+struct point {int x, y;};
+static struct point const zero = {0,0};
+/* AIX XL C 1.02.0.0 rejects this.
+   It does not let you subtract one const X* pointer from another in an arm
+   of an if-expression whose if-part is not a constant expression */
+const char *g = "string";
+ccp = &g + (g ? g-g : 0);
+/* HPUX 7.0 cc rejects these. */
+++ccp;
+p = (char**) ccp;
+ccp = (char const *const *) p;
+{ /* SCO 3.2v4 cc rejects this.  */
+  char *t;
+  char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+  *t++ = 0;
+}
+{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
+  int x[] = {25, 17};
+  const int *foo = &x[0];
+  ++foo;
+}
+{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
+  typedef const int *iptr;
+  iptr p = 0;
+  ++p;
+}
+{ /* AIX XL C 1.02.0.0 rejects this saying
+     "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
+  struct s { int j; const int *ap[3]; };
+  struct s *b; b->j = 5;
+}
+{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+  const int foo = 10;
+}
+
+; return 0; }
+EOF
+if { (eval echo configure:2334: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_c_const=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_c_const=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_c_const" 1>&6
+if test $ac_cv_c_const = no; then
+  cat >> confdefs.h <<\EOF
+#define const 
+EOF
+
+fi
+
 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:2280: checking for pid_t" >&5
+echo "configure:2355: checking for pid_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2285 "configure"
+#line 2360 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -2309,12 +2384,12 @@ EOF
 fi
 
 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:2313: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:2388: checking whether time.h and sys/time.h may both be included" >&5
 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2318 "configure"
+#line 2393 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/time.h>
@@ -2323,7 +2398,7 @@ int main() {
 struct tm *tp;
 ; return 0; }
 EOF
-if { (eval echo configure:2327: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2402: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_header_time=yes
 else
@@ -2346,13 +2421,13 @@ fi
 
 if test $ac_cv_prog_gcc = yes; then
     echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
-echo "configure:2350: checking whether ${CC-cc} needs -traditional" >&5
+echo "configure:2425: checking whether ${CC-cc} needs -traditional" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
     ac_pattern="Autoconf.*'x'"
   cat > conftest.$ac_ext <<EOF
-#line 2356 "configure"
+#line 2431 "configure"
 #include "confdefs.h"
 #include <sgtty.h>
 Autoconf TIOCGETP
@@ -2370,7 +2445,7 @@ rm -f conftest*
 
   if test $ac_cv_prog_gcc_traditional = no; then
     cat > conftest.$ac_ext <<EOF
-#line 2374 "configure"
+#line 2449 "configure"
 #include "confdefs.h"
 #include <termio.h>
 Autoconf TCGETA
@@ -2392,7 +2467,7 @@ echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
 fi
 
 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
-echo "configure:2396: checking for 8-bit clean memcmp" >&5
+echo "configure:2471: checking for 8-bit clean memcmp" >&5
 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2400,7 +2475,7 @@ else
   ac_cv_func_memcmp_clean=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 2404 "configure"
+#line 2479 "configure"
 #include "confdefs.h"
 
 main()
@@ -2410,7 +2485,7 @@ main()
 }
 
 EOF
-if { (eval echo configure:2414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_func_memcmp_clean=yes
 else
@@ -2428,12 +2503,12 @@ echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
 
 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:2432: checking return type of signal handlers" >&5
+echo "configure:2507: checking return type of signal handlers" >&5
 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2437 "configure"
+#line 2512 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <signal.h>
@@ -2450,7 +2525,7 @@ int main() {
 int i;
 ; return 0; }
 EOF
-if { (eval echo configure:2454: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2529: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_type_signal=void
 else
@@ -2471,12 +2546,12 @@ EOF
 for ac_func in gettimeofday socket strdup strerror strstr strtol uname
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2475: checking for $ac_func" >&5
+echo "configure:2550: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2480 "configure"
+#line 2555 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2499,7 +2574,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
index fc6955a076d481295bb50f912923cf913904fdcf..5a853ba32f740416897688af5d77ee2f4ca8ee80 100644 (file)
@@ -17,10 +17,11 @@ AM_CONDITIONAL(WITH_X, test x$no_x = x)
 
 dnl Checks for header files.
 AC_HEADER_STDC
-AC_CHECK_HEADERS(fcntl.h sys/ioctl.h sys/time.h unistd.h)
+AC_CHECK_HEADERS(fcntl.h sys/ioctl.h sys/time.h syslog.h unistd.h)
 AC_CHECK_HEADERS(sys/io.h asm/io.h)
 
 dnl Checks for typedefs, structures, and compiler characteristics.
+AC_C_CONST
 AC_TYPE_PID_T
 AC_HEADER_TIME
 
diff --git a/isdn.c b/isdn.c
index 4879b55d9f04480ebaf000c5798822d3a549425a..324727080da4c5dc0e1bb728b2e9eb43ce25c8f6 100644 (file)
--- a/isdn.c
+++ b/isdn.c
@@ -1,4 +1,4 @@
-/* $Id: isdn.c,v 1.7 2000/08/10 09:44:09 reinelt Exp $
+/* $Id: isdn.c,v 1.8 2000/08/10 18:42:20 reinelt Exp $
  *
  * ISDN specific functions
  *
  *
  *
  * $Log: isdn.c,v $
+ * Revision 1.8  2000/08/10 18:42:20  reinelt
+ *
+ * fixed some bugs with the new syslog code
+ *
  * Revision 1.7  2000/08/10 09:44:09  reinelt
  *
  * new debugging scheme: error(), info(), debug()
@@ -63,6 +67,7 @@
 #include <stdio.h>
 #include <string.h>
 #include <unistd.h>
+#include <errno.h>
 #include <fcntl.h>
 #include <sys/ioctl.h>
 #include <sys/types.h>
index 2bb62eb3654f0682f9a5855a26e38d5136013fa3..d50c09d1357426cd629c6a869eb0db84d5b4ab73 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: lcd4linux.c,v 1.26 2000/08/10 09:44:09 reinelt Exp $
+/* $Id: lcd4linux.c,v 1.27 2000/08/10 18:42:20 reinelt Exp $
  *
  * LCD4Linux
  *
  *
  *
  * $Log: lcd4linux.c,v $
+ * Revision 1.27  2000/08/10 18:42:20  reinelt
+ *
+ * fixed some bugs with the new syslog code
+ *
  * Revision 1.26  2000/08/10 09:44:09  reinelt
  *
  * new debugging scheme: error(), info(), debug()
 
 #include <stdlib.h>
 #include <stdio.h>
+#include <string.h>
 #include <unistd.h>
+#include <errno.h>
 #include <signal.h>
 
 #include "cfg.h"