|
|
@@ -1,181 +1,3 @@
|
|
|
-Index: configure
|
|
|
-diff -Nau configure.orig configure
|
|
|
---- configure.orig 2004-05-23 08:18:27 +0200
|
|
|
---- configure 2004-06-14 17:43:11 +0200
|
|
|
-@@ -2316,6 +2316,9 @@
|
|
|
-
|
|
|
- echo "$as_me:$LINENO: checking whether the C compiler ($CC) understands C++" >&5
|
|
|
- echo $ECHO_N "checking whether the C compiler ($CC) understands C++... $ECHO_C" >&6
|
|
|
-+if test "${ice_prog_gxx+set}" = set; then
|
|
|
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
|
|
|
-+else
|
|
|
- cat > conftest.C <<EOF
|
|
|
- #ifdef __cplusplus
|
|
|
- int main() {return 0;}
|
|
|
-@@ -2336,6 +2339,7 @@
|
|
|
- fi
|
|
|
- echo "$as_me:$LINENO: result: $ice_prog_gxx" >&5
|
|
|
- echo "${ECHO_T}$ice_prog_gxx" >&6
|
|
|
-+fi
|
|
|
-
|
|
|
- ac_ext=cc
|
|
|
- ac_cpp='$CXXCPP $CPPFLAGS'
|
|
|
-Index: configure.in
|
|
|
-diff -Nau configure.in.orig configure.in
|
|
|
---- configure.in.orig 2004-05-23 08:18:18 +0200
|
|
|
---- configure.in 2004-06-14 17:43:11 +0200
|
|
|
-@@ -21,54 +21,9 @@
|
|
|
-
|
|
|
- dnl ---------- Checking for a C compiler in hope that it understands C++ too ---
|
|
|
- dnl
|
|
|
--ICE_PROG_CXX_LIGHT
|
|
|
- AC_LANG_CPLUSPLUS
|
|
|
- AC_PROG_CXX
|
|
|
-
|
|
|
--dnl ----------- If both CC and CXX are GNU compilers, it is better to use CC ---
|
|
|
--dnl ---- for linking.
|
|
|
--if test x"$ac_cv_prog_gxx" = x; then
|
|
|
-- AC_PROG_CC
|
|
|
-- if test x"$ac_cv_prog_gcc" = x; then
|
|
|
-- CXX_LINK=${CC}
|
|
|
-- fi
|
|
|
--fi
|
|
|
--
|
|
|
--dnl ---------- Also check how to turn off RTTI and exception handling ---
|
|
|
--
|
|
|
--dnl --- SunONE C++ supports no-rtti flag only in compat=4 mode
|
|
|
--if test -z "`${CXX} -V 2>&1 | grep Sun`"; then
|
|
|
-- ICE_CXX_FLAG_ACCEPT(no_rtti, -fno-rtti)
|
|
|
--fi
|
|
|
--dnl --- Intel C++ supports -fno-rtti, but doens't support -fno-*-exceptions
|
|
|
--if test $(basename $CXX) != "icc"; then
|
|
|
-- if test -n "`${CXX} -V 2>&1 | grep Sun`"; then
|
|
|
-- dnl --- Sun ONE C++ syntax for "no exceptions"
|
|
|
-- ICE_CXX_FLAG_ACCEPT(no_exceptions, -features=no%except)
|
|
|
-- else
|
|
|
-- if test $(basename $CXX) = "g++" ||
|
|
|
-- test $(basename $CXX) = "gcc"; then
|
|
|
-- ICE_CXX_FLAG_ACCEPT(no_exceptions, -fno-exceptions)
|
|
|
-- if test x"$no_exceptions_ok" = xno; then
|
|
|
-- ICE_CXX_FLAG_ACCEPT(no_exceptions, -fno-handle-exceptions)
|
|
|
-- fi
|
|
|
-- fi
|
|
|
-- fi
|
|
|
--fi
|
|
|
--
|
|
|
--if test $(basename $CXX) = "g++" ||
|
|
|
-- test $(basename $CXX) = "gcc" ; then
|
|
|
-- ICE_CXX_FLAG_ACCEPT(warn_xxx, -Wall -Wpointer-arith -Wconversion -Wwrite-strings -Winline -Woverloaded-virtual -W)
|
|
|
-- ICE_CXX_FLAG_ACCEPT(permissive, -fpermissive)
|
|
|
--else
|
|
|
-- dnl --- Sun ONE doesn't support GCC -W* and -fpermissive
|
|
|
-- dnl --- Intel C++ doesn't supports lots of GCC -W* and -fpermissive
|
|
|
-- if test $(basename $CXX) = "icc"; then
|
|
|
-- dnl --- Using -w0 to avoid noisy "remark" messages
|
|
|
-- ICE_CXX_FLAG_ACCEPT(warn_xxx, -w0)
|
|
|
-- fi
|
|
|
--fi
|
|
|
--
|
|
|
- if test x"$CXX_LINK" = x; then
|
|
|
- CXX_LINK=$CXX
|
|
|
- fi
|
|
|
-Index: src/aapm.cc
|
|
|
-diff -Nau src/aapm.cc.orig src/aapm.cc
|
|
|
---- src/aapm.cc.orig 2004-05-23 08:18:19 +0200
|
|
|
---- src/aapm.cc 2004-06-14 17:43:11 +0200
|
|
|
-@@ -27,6 +27,13 @@
|
|
|
- #include <stdio.h>
|
|
|
- #include <dirent.h>
|
|
|
-
|
|
|
-+#ifdef __FreeBSD__
|
|
|
-+#include <sys/file.h>
|
|
|
-+#include <sys/ioctl.h>
|
|
|
-+#include <sys/types.h>
|
|
|
-+#include <machine/apm_bios.h>
|
|
|
-+#endif
|
|
|
-+
|
|
|
- YColor *YApm::apmBg = 0;
|
|
|
- YColor *YApm::apmFg = 0;
|
|
|
- ref<YFont> YApm::apmFont;
|
|
|
-@@ -48,8 +55,12 @@
|
|
|
-
|
|
|
-
|
|
|
- void ApmStr(char *s, bool Tool) {
|
|
|
-+#ifdef __FreeBSD__
|
|
|
-+ struct apm_info ai;
|
|
|
-+#else
|
|
|
- char buf[80];
|
|
|
-- int len, i, fd = open("/proc/apm", O_RDONLY);
|
|
|
-+#endif
|
|
|
-+ int len, i, fd = open(APMDEV, O_RDONLY);
|
|
|
- char driver[16];
|
|
|
- char apmver[16];
|
|
|
- int apmflags;
|
|
|
-@@ -61,9 +72,31 @@
|
|
|
- char units[16];
|
|
|
-
|
|
|
- if (fd == -1) {
|
|
|
-+ static int error = 0;
|
|
|
-+ if (!error)
|
|
|
-+ perror("Can't open the apm device");
|
|
|
-+ error = 1;
|
|
|
- return ;
|
|
|
- }
|
|
|
-+#ifdef __FreeBSD__
|
|
|
-+ if (ioctl(fd,APMIO_GETINFO, &ai) == -1)
|
|
|
-+ {
|
|
|
-+ static int error = 0;
|
|
|
-+ if (!error)
|
|
|
-+ perror("Can't ioctl the apm device");
|
|
|
-+ error = 1;
|
|
|
-+ close(fd);
|
|
|
-+ return;
|
|
|
-+ }
|
|
|
-+ close(fd);
|
|
|
-
|
|
|
-+ sprintf(apmver, "%u.%u", ai.ai_major, ai.ai_minor);
|
|
|
-+ ACstatus = ai.ai_acline;
|
|
|
-+ BATflag = ai.ai_batt_stat == 3 ? 8 : 0;
|
|
|
-+ BATlife = ai.ai_batt_life;
|
|
|
-+ BATtime = ai.ai_batt_time == 0 ? -1 : ai.ai_batt_time;
|
|
|
-+ strcpy(units, "sec");
|
|
|
-+#else
|
|
|
- len = read(fd, buf, sizeof(buf) - 1);
|
|
|
- close(fd);
|
|
|
-
|
|
|
-@@ -77,10 +110,11 @@
|
|
|
- static int error = 1;
|
|
|
- if (error) {
|
|
|
- error = 0;
|
|
|
-- warn(_("/proc/apm - unknown format (%d)"), i);
|
|
|
-+ warn(_("%s - unknown format (%d)"), APMDEV, i);
|
|
|
- }
|
|
|
- return ;
|
|
|
- }
|
|
|
-+#endif
|
|
|
- if (BATlife == -1)
|
|
|
- BATlife = 0;
|
|
|
-
|
|
|
-Index: src/aapm.h
|
|
|
-diff -Nau src/aapm.h.orig src/aapm.h
|
|
|
---- src/aapm.h.orig 2004-05-23 08:18:19 +0200
|
|
|
---- src/aapm.h 2004-06-14 17:43:11 +0200
|
|
|
-@@ -1,7 +1,5 @@
|
|
|
-
|
|
|
--#ifndef linux
|
|
|
--#undef CONFIG_APPLET_APM
|
|
|
--#elif CONFIG_APPLET_APM
|
|
|
-+#if (defined(linux) || defined (__FreeBSD__)) && defined(i386)
|
|
|
-
|
|
|
- #include "ywindow.h"
|
|
|
- #include "ytimer.h"
|
|
|
-@@ -62,4 +60,6 @@
|
|
|
- char *acpiACName;
|
|
|
-
|
|
|
- };
|
|
|
-+#else
|
|
|
-+#undef CONFIG_APPLET_APM
|
|
|
- #endif
|
|
|
Index: src/acpustatus.h
|
|
|
diff -Nau src/acpustatus.h.orig src/acpustatus.h
|
|
|
--- src/acpustatus.h.orig 2004-05-23 08:18:19 +0200
|
|
|
@@ -211,67 +33,6 @@ diff -Nau src/acpustatus.h.orig src/acpustatus.h
|
|
|
};
|
|
|
#else
|
|
|
#undef CONFIG_APPLET_CPU_STATUS
|
|
|
-Index: src/acpustatus.cc
|
|
|
-diff -Nau src/apppstatus.cc.orig src/apppstatus.cc
|
|
|
---- src/apppstatus.cc.orig 2004-05-23 08:18:19 +0200
|
|
|
---- src/apppstatus.cc 2004-06-14 17:43:03 +0200
|
|
|
-@@ -358,6 +358,7 @@
|
|
|
- return isUpIsdn();
|
|
|
- #endif
|
|
|
-
|
|
|
-+#ifndef __FreeBSD__
|
|
|
- char buffer[32 * sizeof(struct ifreq)];
|
|
|
- struct ifconf ifc;
|
|
|
- struct ifreq *ifr;
|
|
|
-@@ -389,6 +390,38 @@
|
|
|
- }
|
|
|
-
|
|
|
- close(s);
|
|
|
-+
|
|
|
-+#else // __FreeBSD__
|
|
|
-+ // FreeBSD code by Ronald Klop <ronald@cs.vu.nl>
|
|
|
-+ struct ifmibdata ifmd;
|
|
|
-+ size_t ifmd_size=sizeof(ifmibdata);
|
|
|
-+ int nr_network_devs;
|
|
|
-+ size_t int_size=sizeof(int);
|
|
|
-+ int name[6];
|
|
|
-+ name[0] = CTL_NET;
|
|
|
-+ name[1] = PF_LINK;
|
|
|
-+ name[2] = NETLINK_GENERIC;
|
|
|
-+ name[3] = IFMIB_IFDATA;
|
|
|
-+ name[5] = IFDATA_GENERAL;
|
|
|
-+
|
|
|
-+ if(sysctlbyname("net.link.generic.system.ifcount",&nr_network_devs,
|
|
|
-+ &int_size,(void*)0,0) == -1) {
|
|
|
-+ printf("%s@%d: %s\n",__FILE__,__LINE__,strerror(errno));
|
|
|
-+ } else {
|
|
|
-+ for(int i=1;i<=nr_network_devs;i++) {
|
|
|
-+ name[4] = i; /* row of the ifmib table */
|
|
|
-+
|
|
|
-+ if(sysctl(name, 6, &ifmd, &ifmd_size, (void *)0, 0) == -1) {
|
|
|
-+ printf(_("%s@%d: %s\n"),__FILE__,__LINE__,strerror(errno));
|
|
|
-+ continue;
|
|
|
-+ }
|
|
|
-+
|
|
|
-+ if (strcmp(ifmd.ifmd_name, netDevice) == 0 && (ifmd.ifmd_flags & IFF_RUNNING)) {
|
|
|
-+ return true;
|
|
|
-+ }
|
|
|
-+ }
|
|
|
-+ }
|
|
|
-+#endif // __FreeBSD__
|
|
|
- return false;
|
|
|
- }
|
|
|
-
|
|
|
-@@ -437,8 +470,7 @@
|
|
|
- }
|
|
|
-
|
|
|
- #endif
|
|
|
--
|
|
|
-- cur_ibytes = 0;
|
|
|
-+cur_ibytes = 0;
|
|
|
- cur_obytes = 0;
|
|
|
-
|
|
|
-
|
|
|
Index: src/wmapp.cc
|
|
|
diff -Nau src/wmapp.cc.orig src/wmapp.cc
|
|
|
--- src/wmapp.cc.orig 2004-05-23 08:18:19 +0200
|
|
|
@@ -313,3 +74,33 @@ diff -Nau src/ylocale.cc.orig src/ylocale.cc
|
|
|
size_t inlen(lLen), outlen(4 * lLen);
|
|
|
|
|
|
if (0 > (int) iconv(instance->toUnicode, &inbuf, &inlen, &outbuf, &outlen))
|
|
|
+Index: src/base.h
|
|
|
+--- src/base.h.orig 2004-08-11 10:45:05.000000000 +0200
|
|
|
++++ src/base.h 2004-08-11 11:32:42.867990000 +0200
|
|
|
+@@ -172,7 +172,7 @@
|
|
|
+ unsigned strtoken(const char *str, const char *delim = " \t");
|
|
|
+ char const * strnxt(const char *str, const char *delim = " \t");
|
|
|
+
|
|
|
+-char *my_basename(const char *filename);
|
|
|
++char *my_basename(char *filename);
|
|
|
+
|
|
|
+ bool strequal(const char *a, const char *b);
|
|
|
+ int strnullcmp(const char *a, const char *b);
|
|
|
+Index: src/misc.cc
|
|
|
+--- src/misc.cc.orig 2004-08-11 10:44:48.000000000 +0200
|
|
|
++++ src/misc.cc 2004-08-11 11:33:55.638071000 +0200
|
|
|
+@@ -453,12 +453,12 @@
|
|
|
+ }
|
|
|
+
|
|
|
+ #ifndef HAVE_BASENAME
|
|
|
+-char *my_basename(const char *path) {
|
|
|
++char *my_basename(char *path) {
|
|
|
+ char *base = ::strrchr(path, DIR_DELIMINATOR);
|
|
|
+ return (base ? base + 1 : path);
|
|
|
+ }
|
|
|
+ #else
|
|
|
+-char *my_basename(const char *path) {
|
|
|
++char *my_basename(char *path) {
|
|
|
+ return basename(path);
|
|
|
+ }
|
|
|
+ #endif
|