Quellcode durchsuchen

* Port [2413] to 1.2.12
* Added build os/architechture to output for ./binary -v


svn: 3087

Bryan Drewery vor 20 Jahren
Ursprung
Commit
efd8d881e8
8 geänderte Dateien mit 266 neuen und 153 gelöschten Zeilen
  1. 2 2
      Makefile.in
  2. 1 1
      autotools/configure.ac
  3. 7 1
      autotools/includes/acinclude.m4
  4. 0 3
      config.h.in
  5. 249 144
      configure
  6. 1 0
      doc/UPDATES
  7. 3 0
      src/buildinfo.h.in
  8. 3 2
      src/main.c

+ 2 - 2
Makefile.in

@@ -13,7 +13,7 @@ DISTRIB = wraith-@VERSION@
 CCDEPMODE = @CCDEPMODE@
 BINEXEC = wraith@EXEEXT@
 DISTROFILES = config.h.in doc/ misc/ scripts/ ChangeLog Makefile.in build configure pack/ src/
-EXCLUDES = pack/pack.cfg misc/ind doc/DEVEL src/Makefile src/compat/Makefile src/mod/Makefile \
+EXCLUDES = pack/pack.cfg misc/ind doc/DEVEL src/Makefile src/compat/Makefile src/mod/Makefile src/buildinfo.h \
            src/crypto/Makefile src/crypto/.deps src/crypto/.cvsignore \
            src/mod/dns.mod/Makefile src/mod/*.mod/.deps/ src/mod/*.mod/.cvsignore \
            src/.deps src/compat/.deps misc/commit misc/grep autotools/ \
@@ -86,7 +86,7 @@ clean:  cleanutils
 	@rm -f src/help.h src/response.h src/responses.h utctime@EXEEXT@ ts@EXEEXT@
 
 distclean: clean
-	@rm -f Makefile src/Makefile src/compat/Makefile src/mod/Makefile src/crypto/Makefile
+	@rm -f Makefile src/Makefile src/compat/Makefile src/mod/Makefile src/crypto/Makefile src/buildinfo.h
 	@rm -f config.cache config.log config.status config.h 
 	@rm -rf *-$(VERSION)/ autom4te.cache/ autoscan.log configure.scan
 	@rm -rf src/.deps/ src/compat/.deps/ src/mod/*.mod/.deps/ src/crypto/.deps

+ 1 - 1
autotools/configure.ac

@@ -158,7 +158,7 @@ EGG_SUBST_VERSION
 EGG_SUBST_MOD_UPDIR
 DO_DEPS
 
-AC_CONFIG_FILES([Makefile src/Makefile src/compat/Makefile src/crypto/Makefile src/mod/Makefile])
+AC_CONFIG_FILES([Makefile src/Makefile src/compat/Makefile src/crypto/Makefile src/mod/Makefile src/buildinfo.h])
 AC_OUTPUT
 
 AH_TEMPLATE(HAVE_ST_MTIM, [Define to 1 if your struct stat has an st_mtim member])

+ 7 - 1
autotools/includes/acinclude.m4

@@ -268,12 +268,16 @@ AC_CACHE_CHECK(system type, egg_cv_var_system_type, egg_cv_var_system_type=`$UNA
 AC_CACHE_CHECK(system release, egg_cv_var_system_release, egg_cv_var_system_release=`$UNAME -r`)
 AC_CACHE_CHECK(system machine, egg_cv_var_system_machine, egg_cv_var_system_machine=`$UNAME -m`)
 
+BUILDOS="$egg_cv_var_system_type"
+BUILDARCH="$egg_cv_var_system_machine"
+
 case "$egg_cv_var_system_machine" in
   i*)
     CXX="$CXX -march=i486"
+    BUILDARCH="i486"
   ;;
   *)
-    ;;
+  ;;
 esac
 
 case "$egg_cv_var_system_type" in
@@ -351,6 +355,8 @@ case "$egg_cv_var_system_type" in
     fi
   ;;
 esac
+AC_SUBST(BUILDOS)dnl
+AC_SUBST(BUILDARCH)dnl
 ])
 
 dnl EGG_CYGWIN_BINMODE

+ 0 - 3
config.h.in

@@ -51,9 +51,6 @@
 /* Define to 1 if you have the `gettime' function. */
 #undef HAVE_GETTIME
 
-/* Define to 1 if you have the `inet_aton' function. */
-#undef HAVE_INET_ATON
-
 /* Define to 1 if you have the <inttypes.h> header file. */
 #undef HAVE_INTTYPES_H
 

Datei-Diff unterdrückt, da er zu groß ist
+ 249 - 144
configure


+ 1 - 0
doc/UPDATES

@@ -9,6 +9,7 @@ Lines prefixed with '-' were disabled before release and are not finished, or ar
 * cmd_set now sanitizes input with ranges/limits. (fixes #289)
 * cmd_set now accepts 'true', 'on', 'false' and 'off' for boolean variables.
 * Added somewhat advanced password scoring to replace current password restrictions. (#56)
+* Added build os/architechture to output for ./binary -v
 
 1.2.11 - http://wraith.shatow.net/milestone/1.2.11
 * Fixed typo in help for .set/.conf/.channel

+ 3 - 0
src/buildinfo.h.in

@@ -0,0 +1,3 @@
+#define BUILD_OS "@BUILDOS@"
+#define BUILD_ARCH "@BUILDARCH@"
+

+ 3 - 2
src/main.c

@@ -34,6 +34,7 @@
 #include "traffic.h"
 #include "bg.h"	
 #include "botnet.h"
+#include "buildinfo.h"
 #include "src/mod/irc.mod/irc.h"
 #include "src/mod/server.mod/server.h"
 #include "src/mod/channels.mod/channels.h"
@@ -384,9 +385,9 @@ static void dtx_arg(int argc, char *argv[])
 
         egg_strftime(date, sizeof date, "%c %Z", gmtime(&buildts));
 	printf("%s\nBuild Date: %s (%s%lu%s)\n", version, date, BOLD(-1), buildts, BOLD_END(-1));
+        printf("BuildOS: %s%s%s BuildArch: %s%s%s\n", BOLD(-1), BUILD_OS, BOLD_END(-1), BOLD(-1), BUILD_ARCH, BOLD_END(-1));
         printf("Revision: %s\n", revision);
-	sdprintf("pack: %d conf: %d settings_t: %d pad: %d\n", SIZE_PACK, SIZE_CONF, sizeof(settings_t), SIZE_PAD);
-        /* This is simply to display the binary config */
+	printf("pack: %d conf: %d settings_t: %d pad: %d\n", SIZE_PACK, SIZE_CONF, sizeof(settings_t), SIZE_PAD);
         if (settings.uname[0]) {
           sdebug++;
           bin_to_conf();

Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden.