void-packages/srcpkgs/icewm/patches/use-NULL.patch

46 lines
1.5 KiB
Diff

For unknown reasons g++ complains about these usages
of 'nullptr' being unknown and suggests to use 'fileptr'
instead, which of course is wrong.
Use the C way of describing a null pointer as NULL for now.
--- src/wmconfig.cc 2019-05-07 12:15:34.814033408 +0200
+++ src/wmconfig.cc 2019-05-07 12:17:38.655028470 +0200
@@ -50,7 +50,7 @@
if (!append) {
for (long i = 0; i < workspaceCount; i++) {
delete[] workspaceNames[i];
- workspaceNames[i] = nullptr;
+ workspaceNames[i] = NULL;
}
workspaceCount = 0;
}
--- src/icewmhint.cc 2019-04-23 22:12:00.000000000 +0200
+++ src/icewmhint.cc 2019-05-07 12:19:35.440023813 +0200
@@ -32,7 +32,7 @@
Hinter() :
display(XOpenDisplay(NULL))
{
- if (display == nullptr)
+ if (display == NULL)
die(1, _("Can't open display: %s. "
"X must be running and $DISPLAY set."),
XDisplayName(NULL));
@@ -52,7 +52,7 @@
size += 1 + strlen(args[i]);
unsigned char *hint = new unsigned char [size];
- if (hint == nullptr)
+ if (hint == NULL)
die(1, _("Out of memory (len=%d)."), int(size));
size_t copy = 0;
@@ -79,7 +79,7 @@
char** arg = &argv[1];
for (; arg < &argv[argc] && **arg == '-'; ++arg) {
- char* value = nullptr;
+ char* value = NULL;
if (GetArgument(value, "d", "display", arg, argv + argc)) {
setenv("DISPLAY", value, True);
}