| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107 |
- Index: src/acpustatus.h
- diff -Nau src/acpustatus.h.orig src/acpustatus.h
- --- src/acpustatus.h.orig 2004-05-23 08:18:19 +0200
- --- src/acpustatus.h 2004-06-14 17:43:03 +0200
- @@ -1,7 +1,7 @@
- #ifndef __CPUSTATUS_H
- #define __CPUSTATUS_H
-
- -#if defined(linux) || defined(HAVE_KSTAT_H) || defined(HAVE_SYSCTL_CP_TIME)
- +#if (defined(linux) || defined(HAVE_KSTAT_H) || defined(HAVE_SYSCTL_CP_TIME)) || defined (__FreeBSD__)
-
- #define IWM_USER (0)
- #define IWM_NICE (1)
- @@ -14,6 +14,10 @@
-
- #include "ywindow.h"
- #include "ytimer.h"
- +#ifdef __FreeBSD__
- +#include <kvm.h>
- +#include <nlist.h>
- +#endif
-
- class CPUStatus: public YWindow, public YTimerListener {
- public:
- @@ -35,6 +39,10 @@
- unsigned long last_cpu[IWM_STATES];
- YColor *color[IWM_STATES];
- YTimer *fUpdateTimer;
- +#ifdef __FreeBSD__
- + struct nlist namelist[2];
- + kvm_t *kd;
- +#endif
- };
- #else
- #undef CONFIG_APPLET_CPU_STATUS
- Index: src/wmapp.cc
- diff -Nau src/wmapp.cc.orig src/wmapp.cc
- --- src/wmapp.cc.orig 2004-05-23 08:18:19 +0200
- --- src/wmapp.cc 2004-06-14 17:43:11 +0200
- @@ -1450,6 +1450,9 @@
- #endif
-
- int main(int argc, char **argv) {
- +#ifdef __FreeBSD__
- + setegid( getgid() );
- +#endif
- YLocale locale;
-
- for (char ** arg = argv + 1; arg < argv + argc; ++arg) {
- Index: src/wmclient.h
- diff -Nau src/wmclient.h.orig src/wmclient.h
- --- src/wmclient.h.orig 2004-05-23 08:18:19 +0200
- --- src/wmclient.h 2004-06-14 17:43:11 +0200
- @@ -6,6 +6,8 @@
- #include "ymenu.h"
- #include "MwmUtil.h"
-
- +#include <X11/Xutil.h>
- +
- class YFrameWindow;
- class WindowListItem;
- class YIcon;
- Index: src/ylocale.cc
- diff -Nau src/ylocale.cc.orig src/ylocale.cc
- --- src/ylocale.cc.orig 2004-05-23 08:18:19 +0200
- --- src/ylocale.cc 2004-06-14 17:43:11 +0200
- @@ -149,7 +149,8 @@
- return NULL;
-
- YUChar * uStr(new YUChar[lLen + 1]);
- - char * inbuf((char *) lStr), * outbuf((char *) uStr);
- + const char * inbuf((char *) lStr);
- + char * outbuf((char *) uStr);
- 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
|