icewm.patch 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. Index: src/acpustatus.h
  2. diff -Nau src/acpustatus.h.orig src/acpustatus.h
  3. --- src/acpustatus.h.orig 2004-05-23 08:18:19 +0200
  4. --- src/acpustatus.h 2004-06-14 17:43:03 +0200
  5. @@ -1,7 +1,7 @@
  6. #ifndef __CPUSTATUS_H
  7. #define __CPUSTATUS_H
  8. -#if defined(linux) || defined(HAVE_KSTAT_H) || defined(HAVE_SYSCTL_CP_TIME)
  9. +#if (defined(linux) || defined(HAVE_KSTAT_H) || defined(HAVE_SYSCTL_CP_TIME)) || defined (__FreeBSD__)
  10. #define IWM_USER (0)
  11. #define IWM_NICE (1)
  12. @@ -14,6 +14,10 @@
  13. #include "ywindow.h"
  14. #include "ytimer.h"
  15. +#ifdef __FreeBSD__
  16. +#include <kvm.h>
  17. +#include <nlist.h>
  18. +#endif
  19. class CPUStatus: public YWindow, public YTimerListener {
  20. public:
  21. @@ -35,6 +39,10 @@
  22. unsigned long last_cpu[IWM_STATES];
  23. YColor *color[IWM_STATES];
  24. YTimer *fUpdateTimer;
  25. +#ifdef __FreeBSD__
  26. + struct nlist namelist[2];
  27. + kvm_t *kd;
  28. +#endif
  29. };
  30. #else
  31. #undef CONFIG_APPLET_CPU_STATUS
  32. Index: src/wmapp.cc
  33. diff -Nau src/wmapp.cc.orig src/wmapp.cc
  34. --- src/wmapp.cc.orig 2004-05-23 08:18:19 +0200
  35. --- src/wmapp.cc 2004-06-14 17:43:11 +0200
  36. @@ -1450,6 +1450,9 @@
  37. #endif
  38. int main(int argc, char **argv) {
  39. +#ifdef __FreeBSD__
  40. + setegid( getgid() );
  41. +#endif
  42. YLocale locale;
  43. for (char ** arg = argv + 1; arg < argv + argc; ++arg) {
  44. Index: src/wmclient.h
  45. diff -Nau src/wmclient.h.orig src/wmclient.h
  46. --- src/wmclient.h.orig 2004-05-23 08:18:19 +0200
  47. --- src/wmclient.h 2004-06-14 17:43:11 +0200
  48. @@ -6,6 +6,8 @@
  49. #include "ymenu.h"
  50. #include "MwmUtil.h"
  51. +#include <X11/Xutil.h>
  52. +
  53. class YFrameWindow;
  54. class WindowListItem;
  55. class YIcon;
  56. Index: src/ylocale.cc
  57. diff -Nau src/ylocale.cc.orig src/ylocale.cc
  58. --- src/ylocale.cc.orig 2004-05-23 08:18:19 +0200
  59. --- src/ylocale.cc 2004-06-14 17:43:11 +0200
  60. @@ -149,7 +149,8 @@
  61. return NULL;
  62. YUChar * uStr(new YUChar[lLen + 1]);
  63. - char * inbuf((char *) lStr), * outbuf((char *) uStr);
  64. + const char * inbuf((char *) lStr);
  65. + char * outbuf((char *) uStr);
  66. size_t inlen(lLen), outlen(4 * lLen);
  67. if (0 > (int) iconv(instance->toUnicode, &inbuf, &inlen, &outbuf, &outlen))
  68. Index: src/base.h
  69. --- src/base.h.orig 2004-08-11 10:45:05.000000000 +0200
  70. +++ src/base.h 2004-08-11 11:32:42.867990000 +0200
  71. @@ -172,7 +172,7 @@
  72. unsigned strtoken(const char *str, const char *delim = " \t");
  73. char const * strnxt(const char *str, const char *delim = " \t");
  74. -char *my_basename(const char *filename);
  75. +char *my_basename(char *filename);
  76. bool strequal(const char *a, const char *b);
  77. int strnullcmp(const char *a, const char *b);
  78. Index: src/misc.cc
  79. --- src/misc.cc.orig 2004-08-11 10:44:48.000000000 +0200
  80. +++ src/misc.cc 2004-08-11 11:33:55.638071000 +0200
  81. @@ -453,12 +453,12 @@
  82. }
  83. #ifndef HAVE_BASENAME
  84. -char *my_basename(const char *path) {
  85. +char *my_basename(char *path) {
  86. char *base = ::strrchr(path, DIR_DELIMINATOR);
  87. return (base ? base + 1 : path);
  88. }
  89. #else
  90. -char *my_basename(const char *path) {
  91. +char *my_basename(char *path) {
  92. return basename(path);
  93. }
  94. #endif