newer version (5.26, the current production version). The pkg builds and the result starts up and can do simple operations, but there are strange errors if I try scripts which used to work two years ago (mostly array size check related). The biggest problem is that the pkg needs a fortran compiler which supports the LOC() function. f2c doesn't, the cheapest way I found is to depend on pkgsrc/lang/gcc3-f77. This needs to be done cleaner.
81 lines
2.5 KiB
Text
81 lines
2.5 KiB
Text
$NetBSD: patch-aa,v 1.3 2010/02/26 10:56:38 drochner Exp $
|
|
|
|
--- core/unix/src/TUnixSystem.cxx.orig 2010-02-11 13:20:16.000000000 +0000
|
|
+++ core/unix/src/TUnixSystem.cxx
|
|
@@ -60,7 +60,7 @@
|
|
#if defined(R__AIX) || defined(R__LINUX) || defined(R__ALPHA) || \
|
|
defined(R__SGI) || defined(R__HIUX) || defined(R__FBSD) || \
|
|
defined(R__OBSD) || defined(R__LYNXOS) || defined(R__MACOSX) || \
|
|
- defined(R__HURD)
|
|
+ defined(R__HURD) || defined(__NetBSD__)
|
|
# include <sys/ioctl.h>
|
|
#endif
|
|
#if defined(R__AIX) || defined(R__SOLARIS)
|
|
@@ -86,8 +86,12 @@
|
|
# include <sys/param.h>
|
|
# include <sys/mount.h>
|
|
#else
|
|
+#ifdef __NetBSD__
|
|
+#include <sys/statvfs.h>
|
|
+#else
|
|
# include <sys/statfs.h>
|
|
#endif
|
|
+#endif
|
|
|
|
#include <utime.h>
|
|
#include <syslog.h>
|
|
@@ -182,7 +186,7 @@
|
|
#elif defined(R__GLIBC) || defined(R__FBSD) || \
|
|
(defined(R__SUNGCC3) && defined(__arch64__)) || \
|
|
defined(R__OBSD) || defined(MAC_OS_X_VERSION_10_4) || \
|
|
- (defined(R__AIX) && defined(_AIX43))
|
|
+ (defined(R__AIX) && defined(_AIX43)) || defined(__NetBSD__)
|
|
# define USE_SOCKLEN_T
|
|
#endif
|
|
|
|
@@ -543,6 +547,7 @@ void TUnixSystem::SetProgname(const char
|
|
//______________________________________________________________________________
|
|
void TUnixSystem::SetDisplay()
|
|
{
|
|
+#if 0
|
|
// Set DISPLAY environment variable based on utmp entry. Only for UNIX.
|
|
|
|
if (!Getenv("DISPLAY")) {
|
|
@@ -583,6 +588,7 @@ void TUnixSystem::SetDisplay()
|
|
free(gUtmpContents);
|
|
}
|
|
}
|
|
+#endif
|
|
}
|
|
|
|
//______________________________________________________________________________
|
|
@@ -3822,7 +3828,11 @@ int TUnixSystem::UnixFSstat(const char *
|
|
// The function returns 0 in case of success and 1 if the file system could
|
|
// not be stat'ed.
|
|
|
|
+#ifdef __NetBSD__
|
|
+ struct statvfs statfsbuf;
|
|
+#else
|
|
struct statfs statfsbuf;
|
|
+#endif
|
|
#if defined(R__SGI) || (defined(R__SOLARIS) && !defined(R__LINUX))
|
|
if (statfs(path, &statfsbuf, sizeof(struct statfs), 0) == 0) {
|
|
*id = statfsbuf.f_fstyp;
|
|
@@ -3830,6 +3840,9 @@ int TUnixSystem::UnixFSstat(const char *
|
|
*blocks = statfsbuf.f_blocks;
|
|
*bfree = statfsbuf.f_bfree;
|
|
#else
|
|
+#ifdef __NetBSD__
|
|
+ if (statvfs((char*)path, &statfsbuf) == 0) {
|
|
+#else
|
|
if (statfs((char*)path, &statfsbuf) == 0) {
|
|
#ifdef R__OBSD
|
|
// Convert BSD filesystem names to Linux filesystem type numbers
|
|
@@ -3856,6 +3869,7 @@ int TUnixSystem::UnixFSstat(const char *
|
|
#else
|
|
*id = statfsbuf.f_type;
|
|
#endif
|
|
+#endif
|
|
*bsize = statfsbuf.f_bsize;
|
|
*blocks = statfsbuf.f_blocks;
|
|
*bfree = statfsbuf.f_bavail;
|