diff options
author | Erwin Lansing <erwin@FreeBSD.org> | 2006-02-04 22:28:16 +0000 |
---|---|---|
committer | Erwin Lansing <erwin@FreeBSD.org> | 2006-02-04 22:28:16 +0000 |
commit | 657c8cf3ca2d25980b265ee615c688bfb0188996 (patch) | |
tree | 422328571262f1709ae92907fb5e1b1e2c542a71 | |
parent | - Update to 3.03.1 [1] (diff) |
- Update to 3.03.1 [1]
- Hand maintainership to bz [1][2]
- Convert to OPTIONS [1]
- Clean Makefile a bit [3]
- Mark IGNORE on 4.x [3]
This also fixes the crash reported in:
PR: 88535
Submitted by: trasz <trasz@pin.if.uz.zgora.pl>, bz [1], erwin [3]
Approved by: phk (previous maintainer) [2]
Notes
Notes:
svn path=/head/; revision=155223
-rw-r--r-- | emulators/hercules/files/patch-configure | 257 | ||||
-rw-r--r-- | emulators/hercules/files/patch-fbdcompile | 36 | ||||
-rw-r--r-- | emulators/hercules/files/patch-herconf | 36 | ||||
-rw-r--r-- | emulators/hercules/files/patch-tuntap | 62 |
4 files changed, 391 insertions, 0 deletions
diff --git a/emulators/hercules/files/patch-configure b/emulators/hercules/files/patch-configure new file mode 100644 index 000000000000..4a7ecc3c9411 --- /dev/null +++ b/emulators/hercules/files/patch-configure @@ -0,0 +1,257 @@ +--- config.h.in.orig Thu Dec 29 03:37:47 2005 ++++ config.h.in Wed Jan 25 20:05:14 2006 +@@ -433,6 +433,9 @@ + */ + #undef HAVE_SYS_NDIR_H + ++/* Define to 1 if you have the <sys/param.h> header file. */ ++#undef HAVE_SYS_PARAM_H ++ + /* Define to 1 if you have the <sys/resource.h> header file. */ + #undef HAVE_SYS_RESOURCE_H + +--- configure.orig Wed Jan 25 20:04:35 2006 ++++ configure Wed Jan 25 20:05:14 2006 +@@ -24562,6 +24562,14 @@ case "$host_os" in + hc_cv_is_apple=no + ;; + ++ freebsd*) ++ ++ hc_cv_is_nix=yes ++ hc_cv_is_windows=no ++ hc_cv_is_mingw32=no ++ hc_cv_is_apple=no ++ ;; ++ + mingw*) + + hc_cv_is_nix=no +@@ -27941,6 +27949,158 @@ fi + done + + ++for ac_header in sys/param.h ++do ++as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` ++if eval "test \"\${$as_ac_Header+set}\" = set"; then ++ echo "$as_me:$LINENO: checking for $ac_header" >&5 ++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 ++if eval "test \"\${$as_ac_Header+set}\" = set"; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++fi ++echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 ++echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 ++else ++ # Is the header compilable? ++echo "$as_me:$LINENO: checking $ac_header usability" >&5 ++echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 ++cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++$ac_includes_default ++#include <$ac_header> ++_ACEOF ++rm -f conftest.$ac_objext ++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ++ (eval $ac_compile) 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_objext' ++ { (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_header_compiler=yes ++else ++ echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++ac_header_compiler=no ++fi ++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ++echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 ++echo "${ECHO_T}$ac_header_compiler" >&6 ++ ++# Is the header present? ++echo "$as_me:$LINENO: checking $ac_header presence" >&5 ++echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 ++cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++#include <$ac_header> ++_ACEOF ++if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 ++ (eval $ac_cpp conftest.$ac_ext) 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); } >/dev/null; then ++ if test -s conftest.err; then ++ ac_cpp_err=$ac_c_preproc_warn_flag ++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag ++ else ++ ac_cpp_err= ++ fi ++else ++ ac_cpp_err=yes ++fi ++if test -z "$ac_cpp_err"; then ++ ac_header_preproc=yes ++else ++ echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++ ac_header_preproc=no ++fi ++rm -f conftest.err conftest.$ac_ext ++echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 ++echo "${ECHO_T}$ac_header_preproc" >&6 ++ ++# So? What about this header? ++case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in ++ yes:no: ) ++ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 ++echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} ++ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 ++echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ++ ac_header_preproc=yes ++ ;; ++ no:yes:* ) ++ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 ++echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} ++ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 ++echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} ++ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 ++echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} ++ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 ++echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} ++ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 ++echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} ++ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 ++echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ++ ( ++ cat <<\_ASBOX ++## ------------------------------------------ ## ++## Report this to the AC_PACKAGE_NAME lists. ## ++## ------------------------------------------ ## ++_ASBOX ++ ) | ++ sed "s/^/$as_me: WARNING: /" >&2 ++ ;; ++esac ++echo "$as_me:$LINENO: checking for $ac_header" >&5 ++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 ++if eval "test \"\${$as_ac_Header+set}\" = set"; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ eval "$as_ac_Header=\$ac_header_preproc" ++fi ++echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 ++echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 ++ ++fi ++if test `eval echo '${'$as_ac_Header'}'` = yes; then ++ cat >>confdefs.h <<_ACEOF ++#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 ++_ACEOF ++ hc_cv_have_sys_param_h=yes ++else ++ hc_cv_have_sys_param_h=no ++fi ++ ++done ++ ++ + for ac_header in sys/mount.h + do + as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +@@ -27963,6 +28123,11 @@ cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + $ac_includes_default ++ ++ #if HAVE_SYS_PARAM_H ++ #include <sys/param.h> ++ #endif ++ + #include <$ac_header> + _ACEOF + rm -f conftest.$ac_objext +--- configure.ac.orig Thu Dec 29 19:47:06 2005 ++++ configure.ac Wed Jan 25 20:05:14 2006 +@@ -280,6 +280,14 @@ case "$host_os" in + hc_cv_is_apple=no + ;; + ++ freebsd*) ++ ++ hc_cv_is_nix=yes ++ hc_cv_is_windows=no ++ hc_cv_is_mingw32=no ++ hc_cv_is_apple=no ++ ;; ++ + mingw*) + + hc_cv_is_nix=no +@@ -450,13 +458,24 @@ AC_CHECK_HEADERS( net/route.h, [hc_cv + #include <sys/socket.h> + #endif + ] ) ++ ++#------------------------------------------------------------------------------ ++# PROGRAMMING NOTE: on FreeBSD sys/param.h must be included before ++# sys/mount.h. ++AC_CHECK_HEADERS( sys/param.h, [hc_cv_have_sys_param_h=yes], [hc_cv_have_sys_param_h=no] ) ++AC_CHECK_HEADERS( sys/mount.h, [hc_cv_have_sys_mount_h=yes], [hc_cv_have_sys_mount_h=no], ++[ ++ #if HAVE_SYS_PARAM_H ++ #include <sys/param.h> ++ #endif ++] ) ++ + #------------------------------------------------------------------------------ + + AC_CHECK_HEADERS( arpa/inet.h, [hc_cv_have_arpa_inet_h=yes], [hc_cv_have_arpa_inet_h=no] ) + AC_CHECK_HEADERS( linux/if_tun.h, [hc_cv_have_linux_if_tun_h=yes], [hc_cv_have_linux_if_tun_h=no] ) + AC_CHECK_HEADERS( sys/ioctl.h, [hc_cv_have_sys_ioctl_h=yes], [hc_cv_have_sys_ioctl_h=no] ) + AC_CHECK_HEADERS( sys/mman.h, [hc_cv_have_sys_mman_h=yes], [hc_cv_have_sys_mman_h=no] ) +-AC_CHECK_HEADERS( sys/mount.h, [hc_cv_have_sys_mount_h=yes], [hc_cv_have_sys_mount_h=no] ) + AC_CHECK_HEADERS( sys/mtio.h, [hc_cv_have_sys_mtio_h=yes], [hc_cv_have_sys_mtio_h=no] ) + AC_CHECK_HEADERS( sys/resource.h, [hc_cv_have_sys_resource_h=yes], [hc_cv_have_sys_resource_h=no] ) + AC_CHECK_HEADERS( sys/uio.h, [hc_cv_have_sys_uio_h=yes], [hc_cv_have_sys_uio_h=no] ) +--- hstdinc.h.orig Wed Dec 7 13:42:19 2005 ++++ hstdinc.h Wed Jan 25 20:05:14 2006 +@@ -102,6 +102,11 @@ + #ifdef HAVE_SYS_MMAN_H + #include <sys/mman.h> + #endif ++/* PROGRAMMING NOTE: On FreeBSD, <sys/param.h> must be included before ++ <sys/mount.h> */ ++#ifdef HAVE_SYS_PARAM_H ++ #include <sys/param.h> ++#endif + #ifdef HAVE_SYS_MOUNT_H + #include <sys/mount.h> + #endif diff --git a/emulators/hercules/files/patch-fbdcompile b/emulators/hercules/files/patch-fbdcompile new file mode 100644 index 000000000000..bd9ea9f09c2f --- /dev/null +++ b/emulators/hercules/files/patch-fbdcompile @@ -0,0 +1,36 @@ +! Found by: jemalloc +--- fillfnam.c.orig Sat Dec 3 13:49:43 2005 ++++ fillfnam.c Wed Jan 25 20:05:14 2006 +@@ -4,7 +4,7 @@ + + char *filterarray; + +-int filter(const struct dirent *ent) { ++int filter(struct dirent *ent) { + if (filterarray == NULL) + return(1); + if (strncmp(ent->d_name, filterarray, strlen(filterarray)) == 0) +@@ -50,7 +50,11 @@ int tab_pressed(char *cmdlinefull, int * + strncpy(part2, cmdlinefull + i + 1, cmdoff - i - 1); + part2[cmdoff - i - 1] = '\0'; + +- path = (char*)malloc(strlen(part2) + 1); ++ len = strlen(part2); ++ /* We need at least 2+1 characters for ./\0 in else path. */ ++ if (len < 2) ++ len = 2; ++ path = (char*)malloc(len + 1); + filename = part2; + /* is it pure filename or is there whole path ? */ + tmp = strrchr(part2, '/'); +--- hercifc.h.orig Thu Dec 1 17:37:25 2005 ++++ hercifc.h Wed Jan 25 20:05:14 2006 +@@ -88,7 +88,7 @@ typedef struct _CTLREQ + union + { + struct ifreq ifreq; +-#if !defined(__APPLE__) ++#if !defined(__APPLE__) && !defined(__FreeBSD__) + struct rtentry rtentry; + #endif + } diff --git a/emulators/hercules/files/patch-herconf b/emulators/hercules/files/patch-herconf new file mode 100644 index 000000000000..2dc561d4b871 --- /dev/null +++ b/emulators/hercules/files/patch-herconf @@ -0,0 +1,36 @@ +--- hostopts.h.orig Wed Nov 30 23:46:13 2005 ++++ hostopts.h Wed Jan 25 20:05:14 2006 +@@ -199,6 +199,33 @@ + #define HOW_TO_IMPLEMENT_SH_COMMAND USE_ANSI_SYSTEM_API_FOR_SH_COMMAND + #define SET_CONSOLE_CURSOR_SHAPE_METHOD CURSOR_SHAPE_NOT_SUPPORTED + ++ ++/*-------------------------------------------------------------------*/ ++/* Hard-coded FreeBSD-specific features and options... */ ++/*-------------------------------------------------------------------*/ ++#elif defined(__FreeBSD__) /* "FreeBSD" options */ ++ ++#define DLL_IMPORT extern ++#define DLL_EXPORT ++ ++#undef OPTION_SCSI_ERASE_TAPE /* (NOT supported) */ ++#undef OPTION_SCSI_ERASE_GAP /* (NOT supported) */ ++ ++#undef OPTION_TUNTAP_SETMACADDR /* TUNTAP_SetMACAddr broken */ ++#undef OPTION_TUNTAP_DELADD_ROUTES /* Del/Add Routes broken */ ++ ++#define MAX_DEVICE_THREADS 0 /* (0 == unlimited) */ ++#define MIXEDCASE_FILENAMES_ARE_UNIQUE /* ("Foo" and "fOo" unique) */ ++ ++#define DEFAULT_HERCPRIO 0 ++#define DEFAULT_TOD_PRIO -20 ++#define DEFAULT_CPU_PRIO 15 ++#define DEFAULT_DEV_PRIO 8 ++ ++#define HOW_TO_IMPLEMENT_SH_COMMAND USE_ANSI_SYSTEM_API_FOR_SH_COMMAND ++#define SET_CONSOLE_CURSOR_SHAPE_METHOD CURSOR_SHAPE_NOT_SUPPORTED ++ ++ + /*-------------------------------------------------------------------*/ + /* Hard-coded OTHER host-specific features and options... */ + /*-------------------------------------------------------------------*/ diff --git a/emulators/hercules/files/patch-tuntap b/emulators/hercules/files/patch-tuntap new file mode 100644 index 000000000000..7bee1c3e1f54 --- /dev/null +++ b/emulators/hercules/files/patch-tuntap @@ -0,0 +1,62 @@ +--- ctc_ctci.c.orig Wed Dec 14 17:17:22 2005 ++++ ctc_ctci.c Wed Jan 25 20:05:14 2006 +@@ -1114,7 +1114,7 @@ static int ParseArgs( DEVBLK* pDEVBLK, + #if defined( WIN32 ) + strcpy( pCTCBLK->szTUNCharName, tt32_get_default_iface() ); + #else +- strcpy( pCTCBLK->szTUNCharName, "/dev/net/tun" ); ++ strcpy( pCTCBLK->szTUNCharName, HERCTUN_DEV ); + #endif + + #if defined( WIN32 ) +--- ctc_lcs.c.orig Thu Dec 29 19:47:06 2005 ++++ ctc_lcs.c Wed Jan 25 20:05:14 2006 +@@ -1024,7 +1024,9 @@ static void LCS_Shutdown( PLCSDEV pLCSD + static void LCS_StartLan( PLCSDEV pLCSDEV, PLCSHDR pHeader ) + { + PLCSPORT pPort; ++#ifdef OPTION_TUNTAP_DELADD_ROUTES + PLCSRTE pRoute; ++#endif + PLCSSTDFRM pReply; + + pPort = &pLCSDEV->pLCSBLK->Port[pLCSDEV->bPort]; +--- hercifc.h.orig Thu Dec 1 17:37:25 2005 ++++ hercifc.h Wed Jan 25 20:05:14 2006 +@@ -77,7 +77,7 @@ + // -------------------------------------------------------------------- + + #define HERCIFC_CMD "hercifc" // Interface config command +-#define HERCTUN_DEV "/dev/net/tun" // Default TUN/TAP char dev ++#define HERCTUN_DEV "/dev/tun" // Default TUN/TAP char dev + + typedef struct _CTLREQ + { +--- tuntap.c.orig Sun Dec 11 16:44:16 2005 ++++ tuntap.c Wed Jan 25 20:05:14 2006 +@@ -159,6 +159,25 @@ int TUNTAP_CreateInterface( + strcpy( pszNetDevName, ifr.ifr_name ); + } + #if !defined( OPTION_W32_CTCI ) ++ else if ( strncasecmp( utsbuf.sysname, "FreeBSD", 7 ) == 0 ) ++ { ++ struct stat sb; ++ ++ if ( ( iFlags & IFF_TAP ) == IFF_TAP ) ++ { ++ logmsg( _("HHCTU011E TAP device not yet supported\n") ); ++ return -1; ++ } ++ ++ if ( fstat(fd, &sb) == 0 ) ++ devname_r(sb.st_rdev, S_IFCHR, pszNetDevName, IFNAMSIZ); ++ else ++ { ++ logmsg( _("HHCTU010E Error getting TUN/TAP device name: %s\n"), ++ strerror( errno ) ); ++ return -1; ++ } ++ } + else + { + // Other OS: Simply use basename of the device |