Parcourir la source

IPV6 patch fixes on BSD
Makefile fixes for BSD
Fixed bug in setrlimit in main.c for BSD


svn: 119

Bryan Drewery il y a 23 ans
Parent
commit
db2484e807

+ 2 - 2
Makefile.in

@@ -216,7 +216,7 @@ dleaf:  utils salt config
 	@echo ""
 	@cd src/mod && $(MAKE_DLEAF) static
 	@echo ""
-	@cd src; $(MAKE_DLEAF) $(LEAFEXEC)
+	@cd src && $(MAKE_DLEAF) $(LEAFEXEC)
 	@echo ""
 
 hub:	utils salt config
@@ -241,7 +241,7 @@ dhub:   utils salt config
 	@echo ""
 	@cd src/mod && $(MAKE_DHUB) static
 	@echo ""
-	@cd src; $(MAKE_DHUB) $(HUBEXEC)
+	@cd src && $(MAKE_DHUB) $(HUBEXEC)
 	@echo ""
 
 #safety hash

+ 1 - 0
doc/README

@@ -6,6 +6,7 @@ then ask bryan: AIM: Bryan M Drewery
 
 First, get tcl 8.4..
 	http://www.tcl.tk/software/tcltk/download84.html
+	http://aleron.dl.sourceforge.net/sourceforge/tcl/tcl8.4.4-src.tar.gz
 Then, untar it, cd to the dir, cd unix, ./configure --prefix=/home/YOU --exec-prefix=/home/YOU --disable-shared
 
 Now, go back to the pack dir..

+ 1 - 1
pack/conf.h

@@ -5,7 +5,7 @@
 
 /* The next line defines where the custom TCL build's prefix is.. */
 /* It MUST stay in the default syntax. */
-//TCLDIR "/home/wheel/bryan"
+//TCLDIR "/home/ares"
 
 
 /* Change "define" to "undef" to disable a feature

+ 28 - 28
src/Makefile.in

@@ -103,130 +103,130 @@ eggdrop.h:
 
 #safety hash
 ../stringfix: stringfix.c
-bg.o: ./bg.c main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h proto.h \
+bg.o: bg.c main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h proto.h \
  ../lush.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
  compat/compat.h compat/inet_aton.h compat/inet_ntop.h ../src/main.h compat/snprintf.h \
  compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strftime.h \
  bg.h
-botcmd.o: ./botcmd.c main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h \
+botcmd.o: botcmd.c main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h \
  proto.h ../lush.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h \
  users.h compat/compat.h compat/inet_aton.h compat/inet_ntop.h ../src/main.h \
  compat/snprintf.h compat/memset.h compat/memcpy.h compat/strcasecmp.h \
  compat/strftime.h tandem.h modules.h mod/modvals.h
-botmsg.o: ./botmsg.c main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h \
+botmsg.o: botmsg.c main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h \
  proto.h ../lush.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h \
  users.h compat/compat.h compat/inet_aton.h compat/inet_ntop.h ../src/main.h \
  compat/snprintf.h compat/memset.h compat/memcpy.h compat/strcasecmp.h \
  compat/strftime.h tandem.h
-botnet.o: ./botnet.c main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h \
+botnet.o: botnet.c main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h \
  proto.h ../lush.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h \
  users.h compat/compat.h compat/inet_aton.h compat/inet_ntop.h ../src/main.h \
  compat/snprintf.h compat/memset.h compat/memcpy.h compat/strcasecmp.h \
  compat/strftime.h tandem.h
-chanprog.o: ./chanprog.c main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h \
+chanprog.o: chanprog.c main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h \
  proto.h ../lush.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h \
  users.h compat/compat.h compat/inet_aton.h compat/inet_ntop.h ../src/main.h \
  compat/snprintf.h compat/memset.h compat/memcpy.h compat/strcasecmp.h \
  compat/strftime.h modules.h mod/modvals.h
-cmds.o: ./cmds.c main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h proto.h \
+cmds.o: cmds.c main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h proto.h \
  ../lush.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
  compat/compat.h compat/inet_aton.h compat/inet_ntop.h ../src/main.h compat/snprintf.h \
  compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strftime.h \
  tandem.h modules.h mod/modvals.h
-dcc.o: ./dcc.c main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h proto.h \
+dcc.o: dcc.c main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h proto.h \
  ../lush.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
  compat/compat.h compat/inet_aton.h compat/inet_ntop.h ../src/main.h compat/snprintf.h \
  compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strftime.h \
  modules.h mod/modvals.h tandem.h md5/md5.h
-dccutil.o: ./dccutil.c main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h \
+dccutil.o: dccutil.c main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h \
  proto.h ../lush.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h \
  users.h compat/compat.h compat/inet_aton.h compat/inet_ntop.h ../src/main.h \
  compat/snprintf.h compat/memset.h compat/memcpy.h compat/strcasecmp.h \
  compat/strftime.h modules.h mod/modvals.h tandem.h
-dns.o: ./dns.c main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h proto.h \
+dns.o: dns.c main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h proto.h \
  ../lush.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
  compat/compat.h compat/inet_aton.h compat/inet_ntop.h ../src/main.h compat/snprintf.h \
  compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strftime.h \
  dns.h
-flags.o: ./flags.c main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h proto.h \
+flags.o: flags.c main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h proto.h \
  ../lush.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
  compat/compat.h compat/inet_aton.h compat/inet_ntop.h ../src/main.h compat/snprintf.h \
  compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strftime.h
-main.o: ./main.c main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h proto.h \
+main.o: main.c main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h proto.h \
  ../lush.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
  compat/compat.h compat/inet_aton.h compat/inet_ntop.h ../src/main.h compat/snprintf.h \
  compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strftime.h \
  modules.h mod/modvals.h tandem.h bg.h md5/md5.h
-match.o: ./match.c ./main.h
-mem.o: ./mem.c main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h proto.h \
+match.o: match.c ./main.h
+mem.o: mem.c main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h proto.h \
  ../lush.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
  compat/compat.h compat/inet_aton.h compat/inet_ntop.h ../src/main.h compat/snprintf.h \
  compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strftime.h \
  mod/modvals.h
-misc.o: ./misc.c main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h proto.h \
+misc.o: misc.c main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h proto.h \
  ../lush.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
  compat/compat.h compat/inet_aton.h compat/inet_ntop.h ../src/main.h compat/snprintf.h \
  compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strftime.h \
  stat.h
-misc_file.o: ./misc_file.c main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h \
+misc_file.o: misc_file.c main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h \
  proto.h ../lush.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h \
  users.h compat/compat.h compat/inet_aton.h compat/inet_ntop.h ../src/main.h \
  compat/snprintf.h compat/memset.h compat/memcpy.h compat/strcasecmp.h \
  compat/strftime.h stat.h
-modules.o: ./modules.c main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h \
+modules.o: modules.c main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h \
  proto.h ../lush.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h \
  users.h compat/compat.h compat/inet_aton.h compat/inet_ntop.h ../src/main.h \
  compat/snprintf.h compat/memset.h compat/memcpy.h compat/strcasecmp.h \
  compat/strftime.h modules.h mod/modvals.h tandem.h
-net.o: ./net.c main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h proto.h \
+net.o: net.c main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h proto.h \
  ../lush.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
  compat/compat.h compat/inet_aton.h compat/inet_ntop.h ../src/main.h compat/snprintf.h \
  compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strftime.h
-rfc1459.o: ./rfc1459.c main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h \
+rfc1459.o: rfc1459.c main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h \
  proto.h ../lush.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h \
  users.h compat/compat.h compat/inet_aton.h compat/inet_ntop.h ../src/main.h \
  compat/snprintf.h compat/memset.h compat/memcpy.h compat/strcasecmp.h \
  compat/strftime.h
 stringfix.o: stringfix.c
-tcl.o: ./tcl.c main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h proto.h \
+tcl.o: tcl.c main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h proto.h \
  ../lush.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
  compat/compat.h compat/inet_aton.h compat/inet_ntop.h ../src/main.h compat/snprintf.h \
  compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strftime.h
-tcldcc.o: ./tcldcc.c main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h \
+tcldcc.o: tcldcc.c main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h \
  proto.h ../lush.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h \
  users.h compat/compat.h compat/inet_aton.h compat/inet_ntop.h ../src/main.h \
  compat/snprintf.h compat/memset.h compat/memcpy.h compat/strcasecmp.h \
  compat/strftime.h tandem.h modules.h mod/modvals.h
-tclhash.o: ./tclhash.c main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h \
+tclhash.o: tclhash.c main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h \
  proto.h ../lush.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h \
  users.h compat/compat.h compat/inet_aton.h compat/inet_ntop.h ../src/main.h \
  compat/snprintf.h compat/memset.h compat/memcpy.h compat/strcasecmp.h \
  compat/strftime.h match.c
-tclmisc.o: ./tclmisc.c main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h \
+tclmisc.o: tclmisc.c main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h \
  proto.h ../lush.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h \
  users.h compat/compat.h compat/inet_aton.h compat/inet_ntop.h ../src/main.h \
  compat/snprintf.h compat/memset.h compat/memcpy.h compat/strcasecmp.h \
  compat/strftime.h modules.h mod/modvals.h tandem.h md5/md5.h
-tcluser.o: ./tcluser.c main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h \
+tcluser.o: tcluser.c main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h \
  proto.h ../lush.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h \
  users.h compat/compat.h compat/inet_aton.h compat/inet_ntop.h ../src/main.h \
  compat/snprintf.h compat/memset.h compat/memcpy.h compat/strcasecmp.h \
  compat/strftime.h tandem.h
-userent.o: ./userent.c main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h \
+userent.o: userent.c main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h \
  proto.h ../lush.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h \
  users.h compat/compat.h compat/inet_aton.h compat/inet_ntop.h ../src/main.h \
  compat/snprintf.h compat/memset.h compat/memcpy.h compat/strcasecmp.h \
  compat/strftime.h
-userrec.o: ./userrec.c main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h \
+userrec.o: userrec.c main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h \
  proto.h ../lush.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h \
  users.h compat/compat.h compat/inet_aton.h compat/inet_ntop.h ../src/main.h \
  compat/snprintf.h compat/memset.h compat/memcpy.h compat/strcasecmp.h \
  compat/strftime.h modules.h mod/modvals.h tandem.h
-users.o: ./users.c main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h proto.h \
+users.o: users.c main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h proto.h \
  ../lush.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
  compat/compat.h compat/inet_aton.h compat/inet_ntop.h ../src/main.h compat/snprintf.h \
  compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strftime.h \
  modules.h mod/modvals.h tandem.h
-settings.o: ./settings.c eggdrop.h ../src/main.h
-pcrypt.o: ./pcrypt.c ../pack/salt.h
+settings.o: settings.c eggdrop.h ../src/main.h
+pcrypt.o: pcrypt.c ../pack/salt.h
 

+ 3 - 5
src/eggdrop.h

@@ -422,6 +422,9 @@ struct script_info {
   char command[121];
 };
 
+#include <netinet/in.h>
+#include <sys/socket.h>
+
 #ifdef USE_IPV6
 #define SIZEOF_SOCKADDR(so) ((so).sa.sa_family == AF_INET6 ? sizeof(so.sin6) : sizeof(so.sin))
 #else
@@ -434,11 +437,6 @@ struct script_info {
          (((u_int32_t *) (a))[2] == htonl (0xffff)))
 #endif /* !defined(IN6_IS_ADDR_V4MAPPED) */
 
-#include <netinet/in.h>
-#include <netinet/socket.h>
-#ifdef __FreeBSD__
-# include <netinet6/in6.h>
-#endif
 union sockaddr_union {
   struct sockaddr sa;
   struct sockaddr_in sin;

+ 4 - 4
src/main.c

@@ -1214,11 +1214,11 @@ int main(int argc, char **argv)
     setrlimit(RLIMIT_NPROC, &plim);
     fdlim.rlim_cur = 200;
     fdlim.rlim_max = 200;
-#ifdef __FreeBSD__
-    setrlimit(RLIMIT_OFILE, &fdlim);
-#else
+//#ifdef __FreeBSD__
+//    setrlimit(RLIMIT_OFILE, &fdlim);
+//#else
     setrlimit(RLIMIT_NOFILE, &fdlim);
-#endif
+//#endif
     cdlim.rlim_cur = RLIM_INFINITY;
     cdlim.rlim_max = RLIM_INFINITY;
     setrlimit(RLIMIT_CORE, &cdlim);

+ 1 - 1
src/mod/channels.mod/Makefile

@@ -12,7 +12,7 @@ doofus:
 static: ../channels.o
 
 ../channels.o:
-	@echo -e "Compiling: \033[1m`basename $< .c`\033[0m"
+	@echo -e "Compiling: \033[1mchannels\033[0m"
 	@$(CC) $(CFLAGS) $(CPPFLAGS) -DMAKING_MODS -c $(srcdir)/channels.c
 	@rm -f ../channels.o
 	@mv channels.o ../

+ 1 - 1
src/mod/compress.mod/Makefile.in

@@ -14,7 +14,7 @@ static: ../compress.o
 	@echo "$(ZLIB)" >> ../mod.xlibs
 
 ../compress.o:
-	@echo -e "Compiling: \033[1m`basename $< .c`\033[0m"
+	@echo -e "Compiling: \033[1mcompress\033[0m"
 	@$(CC) $(CFLAGS) $(CPPFLAGS) -DMAKING_MODS -c $(srcdir)/compress.c
 	@rm -f ../compress.o
 	@mv compress.o ../

+ 1 - 1
src/mod/console.mod/Makefile

@@ -12,7 +12,7 @@ doofus:
 static: ../console.o
 
 ../console.o:
-	@echo -e "Compiling: \033[1m`basename $< .c`\033[0m"
+	@echo -e "Compiling: \033[1mconsole\033[0m"
 	@$(CC) $(CFLAGS) $(CPPFLAGS) -DMAKING_MODS -c $(srcdir)/console.c
 	@rm -f ../console.o
 	@mv console.o ../

+ 1 - 1
src/mod/ctcp.mod/Makefile

@@ -12,7 +12,7 @@ doofus:
 static: ../ctcp.o
 
 ../ctcp.o:
-	@echo -e "Compiling: \033[1m`basename $< .c`\033[0m"
+	@echo -e "Compiling: \033[1mctcp\033[0m"
 	@$(CC) $(CFLAGS) $(CPPFLAGS) -DMAKING_MODS -c $(srcdir)/ctcp.c
 	@rm -f ../ctcp.o
 	@mv ctcp.o ../

+ 1 - 1
src/mod/dns.mod/Makefile.in

@@ -15,7 +15,7 @@ static: ../dns.o
 	@echo "$(RESLIB)" >> ../mod.xlibs
 
 ../dns.o:
-	@echo -e "Compiling: \033[1m`basename $< .c`\033[0m"
+	@echo -e "Compiling: \033[1mdns\033[0m"
 	@$(CC) $(CFLAGS) $(CPPFLAGS) $(RESINCLUDE) -DMAKING_MODS -c $(srcdir)/dns.c
 	@rm -f ../dns.o
 	@mv dns.o ../

+ 1 - 1
src/mod/irc.mod/Makefile

@@ -12,7 +12,7 @@ doofus:
 static: ../irc.o
 
 ../irc.o:
-	@echo -e "Compiling: \033[1m`basename $< .c`\033[0m"
+	@echo -e "Compiling: \033[1mirc\033[0m"
 	@$(CC) $(CFLAGS) $(CPPFLAGS) -DMAKING_MODS -c $(srcdir)/irc.c
 	@rm -f ../irc.o
 	@mv irc.o ../

+ 1 - 1
src/mod/notes.mod/Makefile

@@ -12,7 +12,7 @@ doofus:
 static: ../notes.o
 
 ../notes.o:
-	@echo -e "Compiling: \033[1m`basename $< .c`\033[0m"
+	@echo -e "Compiling: \033[1mnotes\033[0m"
 	@$(CC) $(CFLAGS) $(CPPFLAGS) -DMAKING_MODS -c $(srcdir)/notes.c
 	@rm -f ../notes.o
 	@mv notes.o ../

+ 1 - 1
src/mod/server.mod/Makefile

@@ -12,7 +12,7 @@ doofus:
 static: ../server.o
 
 ../server.o:
-	@echo -e "Compiling: \033[1m`basename $< .c`\033[0m"
+	@echo -e "Compiling: \033[1mserver\033[0m"
 	@$(CC) $(CFLAGS) $(CPPFLAGS) -DMAKING_MODS -c $(srcdir)/server.c
 	@rm -f ../server.o
 	@mv server.o ../

+ 1 - 1
src/mod/share.mod/Makefile

@@ -12,7 +12,7 @@ doofus:
 static: ../share.o
 
 ../share.o:
-	@echo -e "Compiling: \033[1m`basename $< .c`\033[0m"
+	@echo -e "Compiling: \033[1mshare\033[0m"
 	@$(CC) $(CFLAGS) $(CPPFLAGS) -DMAKING_MODS -c $(srcdir)/share.c
 	@rm -f ../share.o
 	@mv share.o ../

+ 1 - 1
src/mod/transfer.mod/Makefile

@@ -12,7 +12,7 @@ doofus:
 static: ../transfer.o
 
 ../transfer.o:
-	@echo -e "Compiling: \033[1m`basename $< .c`\033[0m"
+	@echo -e "Compiling: \033[1mtransfer\033[0m"
 	@$(CC) $(CFLAGS) $(CPPFLAGS) -DMAKING_MODS -c $(srcdir)/transfer.c
 	@rm -f ../transfer.o
 	@mv transfer.o ../

+ 1 - 1
src/mod/update.mod/Makefile

@@ -12,7 +12,7 @@ doofus:
 static: ../update.o
 
 ../update.o:
-	@echo -e "Compiling: \033[1m`basename $< .c`\033[0m"
+	@echo -e "Compiling: \033[1mupdate\033[0m"
 	@$(CC) $(CFLAGS) $(CPPFLAGS) -DMAKING_MODS -c $(srcdir)/update.c
 	@rm -f ../update.o
 	@mv update.o ../

+ 0 - 3
src/net.c

@@ -17,9 +17,6 @@
 #  include <sys/select.h>
 #endif
 #include <netinet/in.h>
-#ifdef ___FreeBSD___
-# include <netinet6/in6.h>
-#endif
 #include <arpa/inet.h>		/* is this really necessary? */
 #include <errno.h>