[eggheads-patches] PATCH: osf-inline.patch

Fabian Knittel fknittel at gmx.de
Thu Oct 7 16:41:42 CST 1999


[ osf-inline.patch ]

This patch removes a few weird constructs in the code which confused
the osf4 compiler and don't seem to be valid anyway. Feel free to
correct me though :)

In addition, the 'inline' operator, only recently added to the code,
is now checked for in the configure script.

Fabian
-------------- next part --------------
diff -urN eggdrop1.3~/config.h.in eggdrop1.3/config.h.in
--- eggdrop1.3~/config.h.in	Tue Oct  5 11:26:18 1999
+++ eggdrop1.3/config.h.in	Thu Oct  7 22:33:49 1999
@@ -10,6 +10,9 @@
 /* Define if you have <sys/wait.h> that is POSIX.1 compatible.  */
 #undef HAVE_SYS_WAIT_H
 
+/* Define as __inline if that's what the C compiler calls it.  */
+#undef inline
+
 /* Define if on MINIX.  */
 #undef _MINIX
 
diff -urN eggdrop1.3~/configure eggdrop1.3/configure
--- eggdrop1.3~/configure	Wed Oct  6 13:48:29 1999
+++ eggdrop1.3/configure	Thu Oct  7 22:35:01 1999
@@ -1078,7 +1078,7 @@
 cat > $ac_file1 <<EOF
 Beldin is a llama.  :P
 EOF
-if { (eval echo configure: \"$ac_cp\") 1>&5; (eval $ac_cp) 2>&5; } && test -s $ac_file2; then
+if { (eval echo "configure: \"$ac_cp\"") 1>&5; (eval $ac_cp) 2>&5; } && test -s $ac_file2; then
   echo "$ac_t""yes" 1>&6
   ac_cv_prog_cp_f=yes
   CP1="cp -f"
@@ -1354,7 +1354,7 @@
 
 if test "${IRIX}" = "yes"
 then
-  echo Skipping library tests because they CONFUSE Irix.
+  echo "Skipping library tests because they CONFUSE Irix."
 else
   echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
 echo "configure:1361: checking for socket in -lsocket" >&5
@@ -2149,16 +2149,56 @@
 
 fi
 
+echo $ac_n "checking for inline""... $ac_c" 1>&6
+echo "configure:2154: checking for inline" >&5
+if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_cv_c_inline=no
+for ac_kw in inline __inline__ __inline; do
+  cat > conftest.$ac_ext <<EOF
+#line 2161 "configure"
+#include "confdefs.h"
+
+int main() {
+} $ac_kw foo() {
+; return 0; }
+EOF
+if { (eval echo configure:2168: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_c_inline=$ac_kw; break
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+done
+
+fi
+
+echo "$ac_t""$ac_cv_c_inline" 1>&6
+case "$ac_cv_c_inline" in
+  inline | yes) ;;
+  no) cat >> confdefs.h <<\EOF
+#define inline 
+EOF
+ ;;
+  *)  cat >> confdefs.h <<EOF
+#define inline $ac_cv_c_inline
+EOF
+ ;;
+esac
+
 
 for ac_func in rename getrusage getdtablesize srandom random sigaction
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2157: checking for $ac_func" >&5
+echo "configure:2197: 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 2162 "configure"
+#line 2202 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2181,7 +2221,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2225: \"$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
@@ -2208,12 +2248,12 @@
 for ac_func in sigemptyset vsprintf strcasecmp setpgid clock dlopen
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2212: checking for $ac_func" >&5
+echo "configure:2252: 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 2217 "configure"
+#line 2257 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2236,7 +2276,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2280: \"$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
@@ -2263,12 +2303,12 @@
 for ac_func in dprintf bzero uname vsnprintf
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2267: checking for $ac_func" >&5
+echo "configure:2307: 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 2272 "configure"
+#line 2312 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2291,7 +2331,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2335: \"$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
@@ -2334,7 +2374,7 @@
 fi
 
 echo $ac_n "checking space left in file database struct""... $ac_c" 1>&6
-echo "configure:2338: checking space left in file database struct" >&5
+echo "configure:2378: checking space left in file database struct" >&5
 cat >abacab.c <<'EOF'
 #include <stdio.h>
 #include <sys/time.h>
@@ -2368,7 +2408,7 @@
 # Extract the first word of "basename", so it can be a program name with args.
 set dummy basename; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2372: checking for $ac_word" >&5
+echo "configure:2412: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_BASENAME'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2397,7 +2437,7 @@
 # Extract the first word of "dirname", so it can be a program name with args.
 set dummy dirname; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2401: checking for $ac_word" >&5
+echo "configure:2441: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_DIRNAME'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2478,7 +2518,7 @@
 
   # check in common places now
   echo $ac_n "checking for libtcl""... $ac_c" 1>&6
-echo "configure:2482: checking for libtcl" >&5
+echo "configure:2522: checking for libtcl" >&5
   if test ! "$TCLLIB" = ""
   then
     echo "$ac_t""found in $TCLLIB/$TCLLIBFN" 1>&6
@@ -2535,7 +2575,7 @@
 
   # check in common places now
   echo $ac_n "checking for $TCLINCFN""... $ac_c" 1>&6
-echo "configure:2539: checking for $TCLINCFN" >&5
+echo "configure:2579: checking for $TCLINCFN" >&5
   if test ! "$TCLINC" = ""
   then
     echo "$ac_t""found in $TCLINC/$TCLINCFN" 1>&6
@@ -2585,7 +2625,7 @@
   exit 1
 else
   echo $ac_n "checking for Tcl version""... $ac_c" 1>&6
-echo "configure:2589: checking for Tcl version" >&5
+echo "configure:2629: checking for Tcl version" >&5
 
   for ver in $tcllibnames
   do
diff -urN eggdrop1.3~/configure.in eggdrop1.3/configure.in
--- eggdrop1.3~/configure.in	Wed Oct  6 13:48:29 1999
+++ eggdrop1.3/configure.in	Thu Oct  7 22:32:26 1999
@@ -54,7 +54,7 @@
 cat > $ac_file1 <<EOF
 Beldin is a llama.  :P
 EOF
-if { (eval echo configure: \"$ac_cp\") 1>&5; (eval $ac_cp) 2>&5; } && test -s $ac_file2; then
+if { (eval echo "configure: \"$ac_cp\"") 1>&5; (eval $ac_cp) 2>&5; } && test -s $ac_file2; then
   AC_MSG_RESULT(yes)
   ac_cv_prog_cp_f=yes
   CP1="cp -f"
@@ -215,7 +215,7 @@
 dnl Check for Sun libraries.
 if test "${IRIX}" = "yes"
 then
-  echo Skipping library tests because they CONFUSE Irix.
+  echo "Skipping library tests because they CONFUSE Irix."
 else
   AC_CHECK_LIB(socket,socket)
   AC_CHECK_LIB(nsl,connect)
@@ -247,6 +247,7 @@
 dnl Checks for typedefs, structures, and compiler characteristics.
 AC_TYPE_PID_T
 AC_HEADER_TIME
+AC_C_INLINE
 
 dnl Checks for library functions.
 AC_CHECK_FUNCS(rename getrusage getdtablesize srandom random sigaction)
diff -urN eggdrop1.3~/doc/UPDATES1.3 eggdrop1.3/doc/UPDATES1.3
--- eggdrop1.3~/doc/UPDATES1.3	Wed Oct  6 22:17:36 1999
+++ eggdrop1.3/doc/UPDATES1.3	Thu Oct  7 22:41:20 1999
@@ -4,6 +4,7 @@
 
 1.3.29
 Foundby   Fixedby   What....
+SuperS	  Fabian    minor fixes for os4 compiling
 	  Fabian    main() wasn't removing unknown sockets correctly
 	  Fabian    probably fixes the "un-allocated socket" problem
  	  Fabian/   Changed RFC_COMPLIANT flag to dynamic variable setting
diff -urN eggdrop1.3~/src/mod/irc.mod/cmdsirc.c eggdrop1.3/src/mod/irc.mod/cmdsirc.c
--- eggdrop1.3~/src/mod/irc.mod/cmdsirc.c	Tue Oct  5 11:26:32 1999
+++ eggdrop1.3/src/mod/irc.mod/cmdsirc.c	Wed Oct  6 23:25:14 1999
@@ -717,7 +717,7 @@
   char s[121], s1[121];
   int atr = u ? u->flags : 0;
   int statichost = 0;
-  char *p1 = (char*) &s1;
+  char *p1 = s1;
 
   context;
   if ((!par[0]) || ((par[0]=='!') && (!par[1]))) {
diff -urN eggdrop1.3~/src/mod/irc.mod/irc.c eggdrop1.3/src/mod/irc.mod/irc.c
--- eggdrop1.3~/src/mod/irc.mod/irc.c	Wed Oct  6 13:48:29 1999
+++ eggdrop1.3/src/mod/irc.mod/irc.c	Wed Oct  6 23:32:40 1999
@@ -188,7 +188,7 @@
         mx->user = u;
       set_user_flagrec(u, &fr, chan->name);
       simple_sprintf(s, "(%s) %s (%s)", ct, reason, whobad);
-      set_user(&USERENTRY_COMMENT, u, (void *) &s);
+      set_user(&USERENTRY_COMMENT, u, (void *) s);
       putlog(LOG_MISC, "*", "Now deopping %s (%s)", whobad, reason);
     }
   }
diff -urN eggdrop1.3~/src/mod/module.h eggdrop1.3/src/mod/module.h
--- eggdrop1.3~/src/mod/module.h	Wed Oct  6 13:48:29 1999
+++ eggdrop1.3/src/mod/module.h	Thu Oct  7 22:38:06 1999
@@ -319,7 +319,7 @@
 #define nrealloc(x,y) ((void *)(global[230]((x),(y),MODULE_NAME,__FILE__,__LINE__)))
 #define xtra_set ((int(*)(struct userrec *,struct user_entry *, void *))global[231])
 /* 232 - 235 */
-#define contextnote(note) (global[235](MODULE_NAME, __FILE__, __LINE__, note))
+#define contextnote(note) (global[232](MODULE_NAME, __FILE__, __LINE__, note))
 
 /* this is for blowfish module, couldnt be bothereed making a whole new .h
  * file for it ;) */


More information about the Patches mailing list