parent
10d945901b
commit
47cc1adca1
|
@ -1,20 +0,0 @@
|
|||
--- src/misc.cc
|
||||
+++ src/misc.cc
|
||||
@@ -15,7 +15,7 @@
|
||||
#include <libgen.h>
|
||||
#endif
|
||||
|
||||
-#ifdef linux
|
||||
+#ifdef __GLIBC__
|
||||
#include <execinfo.h>
|
||||
#endif
|
||||
|
||||
@@ -539,7 +539,7 @@ bool isreg(char const *path) {
|
||||
}
|
||||
|
||||
void show_backtrace() {
|
||||
-#ifdef linux
|
||||
+#ifdef __GLIBC__
|
||||
const char head[] = "\nbacktrace:\n";
|
||||
const char tail[] = "end\n";
|
||||
void *array[20];
|
|
@ -0,0 +1,236 @@
|
|||
--- src/apppstatus.cc 2017-07-30 10:59:06.000000000 +0200
|
||||
+++ src/apppstatus.cc 2017-08-09 09:12:54.332052762 +0200
|
||||
@@ -366,7 +366,7 @@
|
||||
sscanf(p, "%s %s %s %s %s", val[0], val[1], val[2], val[3], val[4]);
|
||||
for (i = 0; i < 4; i++) {
|
||||
if (strncmp(val[i+1], "?", 1) != 0)
|
||||
- strlcpy(phoneNumber, val[i+1], sizeof phoneNumber);
|
||||
+ my_strlcpy(phoneNumber, val[i+1], sizeof phoneNumber);
|
||||
}
|
||||
}
|
||||
|
||||
--- src/base.h 2017-07-30 10:59:06.000000000 +0200
|
||||
+++ src/base.h 2017-08-09 09:11:13.082025484 +0200
|
||||
@@ -44,9 +44,9 @@
|
||||
/*** String Functions *********************************************************/
|
||||
|
||||
/* Prefer this as a safer alternative over strcpy. Return strlen(from). */
|
||||
-size_t strlcpy(char *dest, const char *from, size_t dest_size);
|
||||
+size_t my_strlcpy(char *dest, const char *from, size_t dest_size);
|
||||
/* Prefer this over strcat. Return strlen(dest) + strlen(from). */
|
||||
-size_t strlcat(char *dest, const char *from, size_t dest_size);
|
||||
+size_t my_strlcat(char *dest, const char *from, size_t dest_size);
|
||||
|
||||
char *newstr(char const *str);
|
||||
char *newstr(char const *str, int len);
|
||||
--- src/gnome2.cc 2017-07-30 10:59:06.000000000 +0200
|
||||
+++ src/gnome2.cc 2017-08-09 09:11:21.819027846 +0200
|
||||
@@ -158,8 +158,8 @@
|
||||
const int plen = strlen(fPath);
|
||||
|
||||
char tmp[256];
|
||||
- strlcpy(tmp, fPath, sizeof tmp);
|
||||
- strlcat(tmp, "/.directory", sizeof tmp);
|
||||
+ my_strlcpy(tmp, fPath, sizeof tmp);
|
||||
+ my_strlcat(tmp, "/.directory", sizeof tmp);
|
||||
|
||||
if (isDir && !stat(tmp, &sb)) { // looks like kde/gnome1 style
|
||||
|
||||
@@ -279,8 +279,8 @@
|
||||
|
||||
while ((file = readdir(dir)) != NULL) {
|
||||
char fullpath[256];
|
||||
- strlcpy(fullpath, dirname, sizeof fullpath);
|
||||
- strlcat(fullpath, file->d_name, sizeof fullpath);
|
||||
+ my_strlcpy(fullpath, dirname, sizeof fullpath);
|
||||
+ my_strlcat(fullpath, file->d_name, sizeof fullpath);
|
||||
GnomeDesktopItem *ditem =
|
||||
gnome_desktop_item_new_from_file(fullpath,
|
||||
(GnomeDesktopItemLoadFlags)0,
|
||||
--- src/icehelp.cc 2017-07-30 10:59:06.000000000 +0200
|
||||
+++ src/icehelp.cc 2017-08-09 09:11:31.490030459 +0200
|
||||
@@ -1790,8 +1790,8 @@
|
||||
const size_t size = 9 + strlen(cfmt) + strlen(cstr) + strlen(crea);
|
||||
char *cbuf = (char *)malloc(size);
|
||||
snprintf(cbuf, size, cfmt, cstr);
|
||||
- strlcat(cbuf, ":\n ", size);
|
||||
- strlcat(cbuf, crea, size);
|
||||
+ my_strlcat(cbuf, ":\n ", size);
|
||||
+ my_strlcat(cbuf, crea, size);
|
||||
|
||||
node *root = new node(node::div);
|
||||
flist<node> nodes(root);
|
||||
--- src/icesm.cc 2017-07-30 10:59:06.000000000 +0200
|
||||
+++ src/icesm.cc 2017-08-09 09:13:12.946057758 +0200
|
||||
@@ -28,10 +28,10 @@
|
||||
wordexp_t w;
|
||||
if (wordexp(trim(buf), &w, 0) != 0 || w.we_wordc == 0)
|
||||
return false;
|
||||
- size_t len = strlcpy(buf, trim(w.we_wordv[0]), bufsiz);
|
||||
+ size_t len = my_strlcpy(buf, trim(w.we_wordv[0]), bufsiz);
|
||||
for (size_t k = 1; k < w.we_wordc && len < bufsiz; ++k) {
|
||||
- strlcat(buf, " ", bufsiz);
|
||||
- len = strlcat(buf, trim(w.we_wordv[k]), bufsiz);
|
||||
+ my_strlcat(buf, " ", bufsiz);
|
||||
+ len = my_strlcat(buf, trim(w.we_wordv[k]), bufsiz);
|
||||
}
|
||||
wordfree(&w);
|
||||
if (len >= bufsiz)
|
||||
@@ -39,7 +39,7 @@
|
||||
#else
|
||||
char *str = trim(buf);
|
||||
if (str > buf)
|
||||
- strlcpy(buf, str, bufsiz);
|
||||
+ my_strlcpy(buf, str, bufsiz);
|
||||
#endif
|
||||
if (buf[0] == '#' || buf[0] == '=')
|
||||
buf[0] = 0;
|
||||
--- src/icesound.cc 2017-07-30 10:59:06.000000000 +0200
|
||||
+++ src/icesound.cc 2017-08-09 09:11:26.686029161 +0200
|
||||
@@ -145,8 +145,8 @@
|
||||
char * findSample(int sid) {
|
||||
char basefname[1024];
|
||||
|
||||
- strlcpy(basefname, gui_events[sid].name, sizeof basefname);
|
||||
- strlcat(basefname, ".wav", sizeof basefname);
|
||||
+ my_strlcpy(basefname, gui_events[sid].name, sizeof basefname);
|
||||
+ my_strlcat(basefname, ".wav", sizeof basefname);
|
||||
|
||||
return findSample(basefname);
|
||||
}
|
||||
--- src/misc.cc 2017-07-30 10:59:06.000000000 +0200
|
||||
+++ src/misc.cc 2017-08-09 09:13:39.372064834 +0200
|
||||
@@ -448,7 +448,7 @@
|
||||
#endif
|
||||
|
||||
/* Prefer this as a safer alternative over strcpy. Return strlen(from). */
|
||||
-size_t strlcpy(char *dest, const char *from, size_t dest_size)
|
||||
+size_t my_strlcpy(char *dest, const char *from, size_t dest_size)
|
||||
{
|
||||
const char *in = from;
|
||||
if (dest_size > 0) {
|
||||
@@ -463,12 +463,12 @@
|
||||
}
|
||||
|
||||
/* Prefer this over strcat. Return strlen(dest) + strlen(from). */
|
||||
-size_t strlcat(char *dest, const char *from, size_t dest_size)
|
||||
+size_t my_strlcat(char *dest, const char *from, size_t dest_size)
|
||||
{
|
||||
char *to = dest;
|
||||
char *const stop = to + dest_size - 1;
|
||||
while (to < stop && *to) ++to;
|
||||
- return to - dest + strlcpy(to, from, dest_size - (to - dest));
|
||||
+ return to - dest + my_strlcpy(to, from, dest_size - (to - dest));
|
||||
}
|
||||
|
||||
char *newstr(char const *str) {
|
||||
--- src/strtest.cc 2017-07-30 10:59:06.000000000 +0200
|
||||
+++ src/strtest.cc 2017-08-09 09:13:24.395060823 +0200
|
||||
@@ -286,63 +286,63 @@
|
||||
strtest tester("strlc");
|
||||
char d[10] = "@";
|
||||
size_t n;
|
||||
- n = strlcpy(d, "", 0);
|
||||
+ n = my_strlcpy(d, "", 0);
|
||||
sequal(d, "@");
|
||||
assert(d, n == 0);
|
||||
|
||||
- n = strlcpy(d, "a", 0);
|
||||
+ n = my_strlcpy(d, "a", 0);
|
||||
sequal(d, "@");
|
||||
assert(d, n == 1);
|
||||
|
||||
- n = strlcpy(d, "", 1);
|
||||
+ n = my_strlcpy(d, "", 1);
|
||||
sequal(d, "");
|
||||
assert(d, n == 0);
|
||||
|
||||
- n = strlcpy(d, "a", 1);
|
||||
+ n = my_strlcpy(d, "a", 1);
|
||||
sequal(d, "");
|
||||
assert(d, n == 1);
|
||||
|
||||
- n = strlcpy(d, "a", 2);
|
||||
+ n = my_strlcpy(d, "a", 2);
|
||||
sequal(d, "a");
|
||||
assert(d, n == 1);
|
||||
|
||||
- n = strlcpy(d, "ab", 2);
|
||||
+ n = my_strlcpy(d, "ab", 2);
|
||||
sequal(d, "a");
|
||||
assert(d, n == 2);
|
||||
|
||||
- n = strlcpy(d, "ab", 3);
|
||||
+ n = my_strlcpy(d, "ab", 3);
|
||||
sequal(d, "ab");
|
||||
assert(d, n == 2);
|
||||
|
||||
- n = strlcpy(d, "abc", sizeof d);
|
||||
+ n = my_strlcpy(d, "abc", sizeof d);
|
||||
sequal(d, "abc");
|
||||
assert(d, n == 3);
|
||||
|
||||
- n = strlcat(d, "def", 4);
|
||||
+ n = my_strlcat(d, "def", 4);
|
||||
sequal(d, "abc");
|
||||
assert(d, n == 6);
|
||||
|
||||
- n = strlcat(d, "def", sizeof d);
|
||||
+ n = my_strlcat(d, "def", sizeof d);
|
||||
sequal(d, "abcdef");
|
||||
assert(d, n == 6);
|
||||
|
||||
- n = strlcat(d, "ghijkl", sizeof d);
|
||||
+ n = my_strlcat(d, "ghijkl", sizeof d);
|
||||
sequal(d, "abcdefghi");
|
||||
assert(d, n == 12);
|
||||
|
||||
- n = strlcpy(d, "123", sizeof d);
|
||||
+ n = my_strlcpy(d, "123", sizeof d);
|
||||
sequal(d, "123");
|
||||
assert(d, n == 3);
|
||||
|
||||
- n = strlcpy(d, d + 1, sizeof d);
|
||||
+ n = my_strlcpy(d, d + 1, sizeof d);
|
||||
sequal(d, "23");
|
||||
assert(d, n == 2);
|
||||
|
||||
- n = strlcpy(d, d + 1, sizeof d);
|
||||
+ n = my_strlcpy(d, d + 1, sizeof d);
|
||||
sequal(d, "3");
|
||||
assert(d, n == 1);
|
||||
|
||||
- n = strlcpy(d, d + 1, sizeof d);
|
||||
+ n = my_strlcpy(d, d + 1, sizeof d);
|
||||
sequal(d, "");
|
||||
assert(d, n == 0);
|
||||
}
|
||||
@@ -418,7 +418,7 @@
|
||||
while (a.next()) {
|
||||
const char *e = a.entry();
|
||||
assert(e, strcoll(buf, e) < 0);
|
||||
- strlcpy(buf, e, sizeof buf);
|
||||
+ my_strlcpy(buf, e, sizeof buf);
|
||||
}
|
||||
assert(buf, strcoll(buf, "~~~~~~~~~") < 0);
|
||||
}
|
||||
@@ -437,7 +437,7 @@
|
||||
cstring c(s.entry());
|
||||
const char *e = c.c_str();
|
||||
assert(e, strcoll(buf, e) < 0);
|
||||
- strlcpy(buf, e, sizeof buf);
|
||||
+ my_strlcpy(buf, e, sizeof buf);
|
||||
}
|
||||
assert(buf, strcoll(buf, "~~~~~~~~~") < 0);
|
||||
}
|
||||
--- src/udir.cc 2017-07-30 10:59:06.000000000 +0200
|
||||
+++ src/udir.cc 2017-08-09 09:13:28.346061883 +0200
|
||||
@@ -66,7 +66,7 @@
|
||||
if (impl) {
|
||||
DirPtr dirp(impl);
|
||||
if (dirp.next()) {
|
||||
- strlcpy(fEntry, dirp.name(), sizeof fEntry);
|
||||
+ my_strlcpy(fEntry, dirp.name(), sizeof fEntry);
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
--- src/ylocale.cc 2017-07-30 10:59:06.000000000 +0200
|
||||
+++ src/ylocale.cc 2017-08-09 08:15:50.938841549 +0200
|
||||
@@ -55,6 +55,8 @@
|
||||
int const codesetItems[] = {
|
||||
#ifdef CONFIG_NL_CODESETS
|
||||
CONFIG_NL_CODESETS
|
||||
+#elif !defined(__GLIBC__)
|
||||
+ CODESET, 0
|
||||
#else
|
||||
CODESET, _NL_CTYPE_CODESET_NAME, 0
|
||||
#endif
|
||||
--- src/globit.c 2017-07-30 10:59:06.000000000 +0200
|
||||
+++ src/globit.c 2017-08-09 08:17:18.691824584 +0200
|
||||
@@ -143,7 +143,9 @@
|
||||
} else if (*pattern == '~') {
|
||||
/* yes, tilde */
|
||||
is_absolute = 2;
|
||||
+#if defined(__GLIBC__)
|
||||
glob_flags |= GLOB_TILDE;
|
||||
+#endif
|
||||
/* any slash in the pattern? */
|
||||
while (*cp && *cp != '/')
|
||||
++cp;
|
|
@ -1,36 +1,17 @@
|
|||
# Template file for 'icewm'
|
||||
pkgname=icewm
|
||||
version=1.3.8
|
||||
revision=6
|
||||
build_style=gnu-configure
|
||||
configure_args="--enable-shaped-decorations --enable-gradients"
|
||||
make_build_args="V=1"
|
||||
make_install_target="install install-docs install-desktop"
|
||||
hostmakedepends="automake libtool pkg-config"
|
||||
version=1.4.2
|
||||
revision=1
|
||||
build_style=cmake
|
||||
configure_args="--enable-shaped-decorations --enable-gradients
|
||||
--enable-guievents --with-icesound=ALSA,OSS --disable-menus-gnome2"
|
||||
hostmakedepends="asciidoc gettext-devel libtool mkfontdir pkg-config"
|
||||
makedepends="libXrandr-devel libXft-devel libSM-devel libXinerama-devel gdk-pixbuf-devel"
|
||||
short_desc="A Window Manager designed for speed, usability, and consistency"
|
||||
short_desc="Window Manager designed for speed, usability, and consistency"
|
||||
maintainer="Juan RP <xtraeme@voidlinux.eu>"
|
||||
license="LGPL-2"
|
||||
homepage="http://www.icewm.org/"
|
||||
distfiles="${SOURCEFORGE_SITE}/${pkgname}/${pkgname}-${version}.tar.gz"
|
||||
checksum=17588d9e0bbbb23587bc04c83da9dd94fd4da6894ecfee6d7f3ed50d780dcd18
|
||||
distfiles="https://github.com/bbidulock/icewm/archive/${version}.tar.gz"
|
||||
checksum=7c05a742a175c31fd3e3362649163e08b1033284f589460b90c49265a5fc9015
|
||||
|
||||
CXXFLAGS="-Wno-error=narrowing -fno-delete-null-pointer-checks"
|
||||
if [ -n "$CROSS_BUILD" ]; then
|
||||
# The iconv detection does not work when cross compiling
|
||||
configure_args+=" --disable-i18n"
|
||||
# Required to compile genpref for the host
|
||||
hostmakedepends+=" libX11-devel"
|
||||
# Set host tools for compiling genprefs
|
||||
export HOSTCXX="${CXX_FOR_BUILD}"
|
||||
export HOSTCXX_LINK="${CXX_FOR_BUILD}"
|
||||
export HOSTCXXFLAGS="${CXXFLAGS_FOR_BUILD}"
|
||||
export HOSTLDFLAGS="${LDFLAGS_FOR_BUILD}"
|
||||
fi
|
||||
|
||||
pre_configure() {
|
||||
if [ -n "$CROSS_BUILD" ]; then
|
||||
patch -p0 < ${FILESDIR}/fix-configure_in_flags.patch
|
||||
fi
|
||||
./autogen.sh
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue