summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2006-05-17 16:34:18 +0000
committerPierre Ossman <ossman@cendio.se>2006-05-17 16:34:18 +0000
commitd9cc2cfcb97c1b0449bcbfb6ab0301a58d77bd55 (patch)
treeb8b0fc3704b923a5ee8f556db05ace212be392a7 /src
parentcdd3588f3a0fc9efeff7ce85215304bf33e2504e (diff)
Move xmalloc to the public side (libpolyp).
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@908 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am14
-rw-r--r--src/daemon/cmdline.c3
-rw-r--r--src/daemon/daemon-conf.c3
-rw-r--r--src/daemon/main.c2
-rw-r--r--src/modules/alsa-util.c3
-rw-r--r--src/modules/howl-wrap.c3
-rw-r--r--src/modules/module-alsa-sink.c3
-rw-r--r--src/modules/module-alsa-source.c3
-rw-r--r--src/modules/module-combine.c3
-rw-r--r--src/modules/module-detect.c3
-rw-r--r--src/modules/module-esound-sink.c3
-rw-r--r--src/modules/module-jack-sink.c3
-rw-r--r--src/modules/module-jack-source.c3
-rw-r--r--src/modules/module-lirc.c3
-rw-r--r--src/modules/module-match.c3
-rw-r--r--src/modules/module-mmkbd-evdev.c3
-rw-r--r--src/modules/module-null-sink.c3
-rw-r--r--src/modules/module-oss-mmap.c3
-rw-r--r--src/modules/module-oss.c3
-rw-r--r--src/modules/module-pipe-sink.c3
-rw-r--r--src/modules/module-pipe-source.c3
-rw-r--r--src/modules/module-protocol-stub.c3
-rw-r--r--src/modules/module-sine.c3
-rw-r--r--src/modules/module-solaris.c2
-rw-r--r--src/modules/module-tunnel.c2
-rw-r--r--src/modules/module-volume-restore.c3
-rw-r--r--src/modules/module-waveout.c3
-rw-r--r--src/modules/module-x11-bell.c3
-rw-r--r--src/modules/module-x11-publish.c3
-rw-r--r--src/modules/module-zeroconf-publish.c3
-rw-r--r--src/modules/rtp/module-rtp-recv.c3
-rw-r--r--src/modules/rtp/module-rtp-send.c3
-rw-r--r--src/modules/rtp/sap.c3
-rw-r--r--src/modules/rtp/sdp.c3
-rw-r--r--src/polyp/browser.c3
-rw-r--r--src/polyp/channelmap.c4
-rw-r--r--src/polyp/client-conf-x11.c3
-rw-r--r--src/polyp/client-conf.c3
-rw-r--r--src/polyp/context.c2
-rw-r--r--src/polyp/glib-mainloop.c3
-rw-r--r--src/polyp/glib12-mainloop.c3
-rw-r--r--src/polyp/mainloop-api.c3
-rw-r--r--src/polyp/mainloop-signal.c3
-rw-r--r--src/polyp/mainloop.c3
-rw-r--r--src/polyp/operation.c2
-rw-r--r--src/polyp/simple.c2
-rw-r--r--src/polyp/stream.c3
-rw-r--r--src/polyp/thread-mainloop.c3
-rw-r--r--src/polyp/xmalloc.c (renamed from src/polypcore/xmalloc.c)0
-rw-r--r--src/polyp/xmalloc.h (renamed from src/polypcore/xmalloc.h)0
-rw-r--r--src/polypcore/authkey-prop.c3
-rw-r--r--src/polypcore/autoload.c3
-rw-r--r--src/polypcore/cli-command.c3
-rw-r--r--src/polypcore/cli-text.c3
-rw-r--r--src/polypcore/cli.c3
-rw-r--r--src/polypcore/client.c3
-rw-r--r--src/polypcore/conf-parser.c3
-rw-r--r--src/polypcore/core-scache.c3
-rw-r--r--src/polypcore/core-subscribe.c3
-rw-r--r--src/polypcore/core.c3
-rw-r--r--src/polypcore/dynarray.c2
-rw-r--r--src/polypcore/hashmap.c3
-rw-r--r--src/polypcore/idxset.c2
-rw-r--r--src/polypcore/iochannel.c3
-rw-r--r--src/polypcore/ioline.c3
-rw-r--r--src/polypcore/log.c3
-rw-r--r--src/polypcore/mcalign.c2
-rw-r--r--src/polypcore/memblock.c2
-rw-r--r--src/polypcore/memblockq.c3
-rw-r--r--src/polypcore/memchunk.c2
-rw-r--r--src/polypcore/modargs.c3
-rw-r--r--src/polypcore/modinfo.c3
-rw-r--r--src/polypcore/module.c3
-rw-r--r--src/polypcore/namereg.c3
-rw-r--r--src/polypcore/packet.c2
-rw-r--r--src/polypcore/parseaddr.c3
-rw-r--r--src/polypcore/pdispatch.c3
-rw-r--r--src/polypcore/pid.c3
-rw-r--r--src/polypcore/play-memchunk.c3
-rw-r--r--src/polypcore/props.c3
-rw-r--r--src/polypcore/protocol-cli.c3
-rw-r--r--src/polypcore/protocol-esound.c3
-rw-r--r--src/polypcore/protocol-http.c3
-rw-r--r--src/polypcore/protocol-native.c2
-rw-r--r--src/polypcore/protocol-simple.c3
-rw-r--r--src/polypcore/pstream.c3
-rw-r--r--src/polypcore/queue.c2
-rw-r--r--src/polypcore/resampler.c3
-rw-r--r--src/polypcore/sink-input.c3
-rw-r--r--src/polypcore/sink.c2
-rw-r--r--src/polypcore/socket-client.c3
-rw-r--r--src/polypcore/socket-server.c3
-rw-r--r--src/polypcore/socket-util.c3
-rw-r--r--src/polypcore/sound-file-stream.c3
-rw-r--r--src/polypcore/source-output.c3
-rw-r--r--src/polypcore/source.c3
-rw-r--r--src/polypcore/strbuf.c2
-rw-r--r--src/polypcore/strlist.c3
-rw-r--r--src/polypcore/tagstruct.c2
-rw-r--r--src/polypcore/tokenizer.c3
-rw-r--r--src/polypcore/utf8.c3
-rw-r--r--src/polypcore/util.c3
-rw-r--r--src/polypcore/x11wrap.c3
-rw-r--r--src/tests/strlist-test.c2
-rw-r--r--src/tests/utf8-test.c2
105 files changed, 193 insertions, 109 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index bd48a0fb..afbdedee 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -273,10 +273,10 @@ mainloop_test_glib12_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
memblockq_test_SOURCES = \
tests/memblockq-test.c \
+ polyp/xmalloc.c \
polypcore/memblockq.c \
polypcore/log.c \
polypcore/memblock.c \
- polypcore/xmalloc.c \
polypcore/util.c \
polypcore/mcalign.c \
polypcore/memchunk.c
@@ -313,7 +313,8 @@ polypinclude_HEADERS = \
polyp/subscribe.h \
polyp/version.h \
polyp/sample.h \
- polyp/volume.h
+ polyp/volume.h \
+ polyp/xmalloc.h
if HAVE_HOWL
polypinclude_HEADERS += \
@@ -360,6 +361,7 @@ libpolyp_la_SOURCES = \
polyp/mainloop.c polyp/mainloop.h \
polyp/mainloop-signal.c polyp/mainloop-signal.h \
polyp/thread-mainloop.c polyp/thread-mainloop.h \
+ polyp/xmalloc.c polyp/xmalloc.h \
polypcore/pipe.c polypcore/pipe.h \
polypcore/poll.c polypcore/poll.h
@@ -392,7 +394,6 @@ libpolyp_la_SOURCES += \
polypcore/tagstruct.c polypcore/tagstruct.h \
polypcore/util.c polypcore/util.h \
polypcore/winsock.h \
- polypcore/xmalloc.c polypcore/xmalloc.h \
polypcore/llist.h
if OS_IS_WIN32
@@ -485,8 +486,7 @@ polypcoreinclude_HEADERS = \
polypcore/strbuf.h \
polypcore/tokenizer.h \
polypcore/util.h \
- polypcore/utf8.h \
- polypcore/xmalloc.h
+ polypcore/utf8.h
lib_LTLIBRARIES += libpolypcore.la
@@ -497,7 +497,8 @@ libpolypcore_la_SOURCES = \
polyp/mainloop-api.c polyp/mainloop-api.h \
polyp/mainloop-signal.c polyp/mainloop-signal.h \
polyp/sample.c polyp/sample.h \
- polyp/volume.c polyp/volume.h
+ polyp/volume.c polyp/volume.h \
+ polyp/xmalloc.c polyp/xmalloc.h
# Pure core stuff (some are shared in libpolyp though).
libpolypcore_la_SOURCES += \
@@ -546,7 +547,6 @@ libpolypcore_la_SOURCES += \
polypcore/tokenizer.c polypcore/tokenizer.h \
polypcore/util.c polypcore/util.h \
polypcore/winsock.h \
- polypcore/xmalloc.c polypcore/xmalloc.h \
polypcore/utf8.c polypcore/utf8.h
if OS_IS_WIN32
diff --git a/src/daemon/cmdline.c b/src/daemon/cmdline.c
index a6b95a81..1ed16a69 100644
--- a/src/daemon/cmdline.c
+++ b/src/daemon/cmdline.c
@@ -30,9 +30,10 @@
#include <getopt.h>
#include <sys/stat.h>
+#include <polyp/xmalloc.h>
+
#include <polypcore/util.h>
#include <polypcore/strbuf.h>
-#include <polypcore/xmalloc.h>
#include "cmdline.h"
diff --git a/src/daemon/daemon-conf.c b/src/daemon/daemon-conf.c
index f41bb4b1..f82d3d24 100644
--- a/src/daemon/daemon-conf.c
+++ b/src/daemon/daemon-conf.c
@@ -29,8 +29,9 @@
#include <assert.h>
#include <unistd.h>
+#include <polyp/xmalloc.h>
+
#include <polypcore/util.h>
-#include <polypcore/xmalloc.h>
#include <polypcore/strbuf.h>
#include <polypcore/conf-parser.h>
#include <polypcore/resampler.h>
diff --git a/src/daemon/main.c b/src/daemon/main.c
index e14837a9..a7144eba 100644
--- a/src/daemon/main.c
+++ b/src/daemon/main.c
@@ -51,6 +51,7 @@
#include <polyp/mainloop.h>
#include <polyp/mainloop-signal.h>
+#include <polyp/xmalloc.h>
#include <polypcore/core.h>
#include <polypcore/memblock.h>
@@ -59,7 +60,6 @@
#include <polypcore/log.h>
#include <polypcore/util.h>
#include <polypcore/sioman.h>
-#include <polypcore/xmalloc.h>
#include <polypcore/cli-text.h>
#include <polypcore/pid.h>
#include <polypcore/namereg.h>
diff --git a/src/modules/alsa-util.c b/src/modules/alsa-util.c
index 503b8efb..122f4419 100644
--- a/src/modules/alsa-util.c
+++ b/src/modules/alsa-util.c
@@ -27,7 +27,8 @@
#include <asoundlib.h>
#include <polyp/sample.h>
-#include <polypcore/xmalloc.h>
+#include <polyp/xmalloc.h>
+
#include <polypcore/log.h>
#include "alsa-util.h"
diff --git a/src/modules/howl-wrap.c b/src/modules/howl-wrap.c
index f4605fb2..467ab9e2 100644
--- a/src/modules/howl-wrap.c
+++ b/src/modules/howl-wrap.c
@@ -21,8 +21,9 @@
#include <assert.h>
+#include <polyp/xmalloc.h>
+
#include <polypcore/log.h>
-#include <polypcore/xmalloc.h>
#include <polypcore/props.h>
#include "howl-wrap.h"
diff --git a/src/modules/module-alsa-sink.c b/src/modules/module-alsa-sink.c
index 47065659..94de771c 100644
--- a/src/modules/module-alsa-sink.c
+++ b/src/modules/module-alsa-sink.c
@@ -34,6 +34,8 @@
#include <asoundlib.h>
+#include <polyp/xmalloc.h>
+
#include <polypcore/core.h>
#include <polypcore/module.h>
#include <polypcore/memchunk.h>
@@ -41,7 +43,6 @@
#include <polypcore/modargs.h>
#include <polypcore/util.h>
#include <polypcore/sample-util.h>
-#include <polypcore/xmalloc.h>
#include <polypcore/log.h>
#include "alsa-util.h"
diff --git a/src/modules/module-alsa-source.c b/src/modules/module-alsa-source.c
index d46f8e42..b9d1ff87 100644
--- a/src/modules/module-alsa-source.c
+++ b/src/modules/module-alsa-source.c
@@ -34,6 +34,8 @@
#include <asoundlib.h>
+#include <polyp/xmalloc.h>
+
#include <polypcore/core.h>
#include <polypcore/module.h>
#include <polypcore/memchunk.h>
@@ -41,7 +43,6 @@
#include <polypcore/modargs.h>
#include <polypcore/util.h>
#include <polypcore/sample-util.h>
-#include <polypcore/xmalloc.h>
#include <polypcore/log.h>
#include "alsa-util.h"
diff --git a/src/modules/module-combine.c b/src/modules/module-combine.c
index 369778a6..b31fe56e 100644
--- a/src/modules/module-combine.c
+++ b/src/modules/module-combine.c
@@ -26,6 +26,8 @@
#include <assert.h>
#include <stdio.h>
+#include <polyp/xmalloc.h>
+
#include <polypcore/module.h>
#include <polypcore/llist.h>
#include <polypcore/sink.h>
@@ -33,7 +35,6 @@
#include <polypcore/memblockq.h>
#include <polypcore/log.h>
#include <polypcore/util.h>
-#include <polypcore/xmalloc.h>
#include <polypcore/modargs.h>
#include <polypcore/namereg.h>
diff --git a/src/modules/module-detect.c b/src/modules/module-detect.c
index 9cc13e81..ea14e68f 100644
--- a/src/modules/module-detect.c
+++ b/src/modules/module-detect.c
@@ -33,9 +33,10 @@
#include <sys/types.h>
#include <sys/stat.h>
+#include <polyp/xmalloc.h>
+
#include <polypcore/module.h>
#include <polypcore/modargs.h>
-#include <polypcore/xmalloc.h>
#include <polypcore/log.h>
#include <polypcore/util.h>
diff --git a/src/modules/module-esound-sink.c b/src/modules/module-esound-sink.c
index 1cc75502..1d61e01b 100644
--- a/src/modules/module-esound-sink.c
+++ b/src/modules/module-esound-sink.c
@@ -33,12 +33,13 @@
#include <unistd.h>
#include <limits.h>
+#include <polyp/xmalloc.h>
+
#include <polypcore/iochannel.h>
#include <polypcore/sink.h>
#include <polypcore/module.h>
#include <polypcore/util.h>
#include <polypcore/modargs.h>
-#include <polypcore/xmalloc.h>
#include <polypcore/log.h>
#include <polypcore/socket-client.h>
#include <polypcore/esound.h>
diff --git a/src/modules/module-jack-sink.c b/src/modules/module-jack-sink.c
index 324a2cb3..1aa73495 100644
--- a/src/modules/module-jack-sink.c
+++ b/src/modules/module-jack-sink.c
@@ -36,12 +36,13 @@
#include <jack/jack.h>
+#include <polyp/xmalloc.h>
+
#include <polypcore/iochannel.h>
#include <polypcore/sink.h>
#include <polypcore/module.h>
#include <polypcore/util.h>
#include <polypcore/modargs.h>
-#include <polypcore/xmalloc.h>
#include <polypcore/log.h>
#include <polyp/mainloop-api.h>
diff --git a/src/modules/module-jack-source.c b/src/modules/module-jack-source.c
index 94cabbea..29c46d85 100644
--- a/src/modules/module-jack-source.c
+++ b/src/modules/module-jack-source.c
@@ -36,12 +36,13 @@
#include <jack/jack.h>
+#include <polyp/xmalloc.h>
+
#include <polypcore/iochannel.h>
#include <polypcore/source.h>
#include <polypcore/module.h>
#include <polypcore/util.h>
#include <polypcore/modargs.h>
-#include <polypcore/xmalloc.h>
#include <polypcore/log.h>
#include <polyp/mainloop-api.h>
diff --git a/src/modules/module-lirc.c b/src/modules/module-lirc.c
index 3bb0dc74..918177a3 100644
--- a/src/modules/module-lirc.c
+++ b/src/modules/module-lirc.c
@@ -30,11 +30,12 @@
#include <lirc/lirc_client.h>
#include <stdlib.h>
+#include <polyp/xmalloc.h>
+
#include <polypcore/module.h>
#include <polypcore/log.h>
#include <polypcore/namereg.h>
#include <polypcore/sink.h>
-#include <polypcore/xmalloc.h>
#include <polypcore/modargs.h>
#include "module-lirc-symdef.h"
diff --git a/src/modules/module-match.c b/src/modules/module-match.c
index 9e3edb70..1692b5d8 100644
--- a/src/modules/module-match.c
+++ b/src/modules/module-match.c
@@ -32,12 +32,13 @@
#include <stdio.h>
#include <stdlib.h>
+#include <polyp/xmalloc.h>
+
#include <polypcore/module.h>
#include <polypcore/util.h>
#include <polypcore/modargs.h>
#include <polypcore/log.h>
#include <polypcore/core-subscribe.h>
-#include <polypcore/xmalloc.h>
#include <polypcore/sink-input.h>
#include <polypcore/util.h>
diff --git a/src/modules/module-mmkbd-evdev.c b/src/modules/module-mmkbd-evdev.c
index 8ea56811..654fbaa4 100644
--- a/src/modules/module-mmkbd-evdev.c
+++ b/src/modules/module-mmkbd-evdev.c
@@ -33,11 +33,12 @@
#include <linux/input.h>
+#include <polyp/xmalloc.h>
+
#include <polypcore/module.h>
#include <polypcore/log.h>
#include <polypcore/namereg.h>
#include <polypcore/sink.h>
-#include <polypcore/xmalloc.h>
#include <polypcore/modargs.h>
#include <polypcore/util.h>
diff --git a/src/modules/module-null-sink.c b/src/modules/module-null-sink.c
index 5cdfeab8..2cc49063 100644
--- a/src/modules/module-null-sink.c
+++ b/src/modules/module-null-sink.c
@@ -33,12 +33,13 @@
#include <unistd.h>
#include <limits.h>
+#include <polyp/xmalloc.h>
+
#include <polypcore/iochannel.h>
#include <polypcore/sink.h>
#include <polypcore/module.h>
#include <polypcore/util.h>
#include <polypcore/modargs.h>
-#include <polypcore/xmalloc.h>
#include <polypcore/log.h>
#include "module-null-sink-symdef.h"
diff --git a/src/modules/module-oss-mmap.c b/src/modules/module-oss-mmap.c
index ddf33532..82e7d66d 100644
--- a/src/modules/module-oss-mmap.c
+++ b/src/modules/module-oss-mmap.c
@@ -36,6 +36,8 @@
#include <limits.h>
#include <sys/mman.h>
+#include <polyp/xmalloc.h>
+
#include <polypcore/iochannel.h>
#include <polypcore/sink.h>
#include <polypcore/source.h>
@@ -43,7 +45,6 @@
#include <polypcore/sample-util.h>
#include <polypcore/util.h>
#include <polypcore/modargs.h>
-#include <polypcore/xmalloc.h>
#include <polypcore/log.h>
#include "oss-util.h"
diff --git a/src/modules/module-oss.c b/src/modules/module-oss.c
index f6d19544..46d100f1 100644
--- a/src/modules/module-oss.c
+++ b/src/modules/module-oss.c
@@ -35,6 +35,8 @@
#include <unistd.h>
#include <limits.h>
+#include <polyp/xmalloc.h>
+
#include <polypcore/iochannel.h>
#include <polypcore/sink.h>
#include <polypcore/source.h>
@@ -42,7 +44,6 @@
#include <polypcore/sample-util.h>
#include <polypcore/util.h>
#include <polypcore/modargs.h>
-#include <polypcore/xmalloc.h>
#include <polypcore/log.h>
#include "oss-util.h"
diff --git a/src/modules/module-pipe-sink.c b/src/modules/module-pipe-sink.c
index 0fb73cd8..b59808fc 100644
--- a/src/modules/module-pipe-sink.c
+++ b/src/modules/module-pipe-sink.c
@@ -33,12 +33,13 @@
#include <unistd.h>
#include <limits.h>
+#include <polyp/xmalloc.h>
+
#include <polypcore/iochannel.h>
#include <polypcore/sink.h>
#include <polypcore/module.h>
#include <polypcore/util.h>
#include <polypcore/modargs.h>
-#include <polypcore/xmalloc.h>
#include <polypcore/log.h>
#include "module-pipe-sink-symdef.h"
diff --git a/src/modules/module-pipe-source.c b/src/modules/module-pipe-source.c
index d999754a..4f3f9a6c 100644
--- a/src/modules/module-pipe-source.c
+++ b/src/modules/module-pipe-source.c
@@ -33,12 +33,13 @@
#include <unistd.h>
#include <limits.h>
+#include <polyp/xmalloc.h>
+
#include <polypcore/iochannel.h>
#include <polypcore/source.h>
#include <polypcore/module.h>
#include <polypcore/util.h>
#include <polypcore/modargs.h>
-#include <polypcore/xmalloc.h>
#include <polypcore/log.h>
#include "module-pipe-source-symdef.h"
diff --git a/src/modules/module-protocol-stub.c b/src/modules/module-protocol-stub.c
index d5b5f63b..79a59cd5 100644
--- a/src/modules/module-protocol-stub.c
+++ b/src/modules/module-protocol-stub.c
@@ -42,6 +42,8 @@
#include "../polypcore/winsock.h"
+#include <polyp/xmalloc.h>
+
#include <polypcore/module.h>
#include <polypcore/socket-server.h>
#include <polypcore/socket-util.h>
@@ -49,7 +51,6 @@
#include <polypcore/modargs.h>
#include <polypcore/log.h>
#include <polypcore/native-common.h>
-#include <polypcore/xmalloc.h>
#ifdef USE_TCP_SOCKETS
#define SOCKET_DESCRIPTION "(TCP sockets)"
diff --git a/src/modules/module-sine.c b/src/modules/module-sine.c
index 3267d49b..15b6c8a9 100644
--- a/src/modules/module-sine.c
+++ b/src/modules/module-sine.c
@@ -27,10 +27,11 @@
#include <assert.h>
#include <math.h>
+#include <polyp/xmalloc.h>
+
#include <polypcore/sink-input.h>
#include <polypcore/module.h>
#include <polypcore/modargs.h>
-#include <polypcore/xmalloc.h>
#include <polypcore/namereg.h>
#include <polypcore/log.h>
diff --git a/src/modules/module-solaris.c b/src/modules/module-solaris.c
index 3e7c2fb4..d82e3362 100644
--- a/src/modules/module-solaris.c
+++ b/src/modules/module-solaris.c
@@ -41,6 +41,7 @@
#include <sys/audio.h>
#include <polyp/mainloop-signal.h>
+#include <polyp/xmalloc.h>
#include <polypcore/iochannel.h>
#include <polypcore/sink.h>
@@ -49,7 +50,6 @@
#include <polypcore/sample-util.h>
#include <polypcore/util.h>
#include <polypcore/modargs.h>
-#include <polypcore/xmalloc.h>
#include <polypcore/log.h>
#include "module-solaris-symdef.h"
diff --git a/src/modules/module-tunnel.c b/src/modules/module-tunnel.c
index 2e04b120..a2a1e33d 100644
--- a/src/modules/module-tunnel.c
+++ b/src/modules/module-tunnel.c
@@ -32,13 +32,13 @@
#include <stdlib.h>
#include <polyp/version.h>
+#include <polyp/xmalloc.h>
#include <polypcore/module.h>
#include <polypcore/util.h>
#include <polypcore/modargs.h>
#include <polypcore/log.h>
#include <polypcore/core-subscribe.h>
-#include <polypcore/xmalloc.h>
#include <polypcore/sink-input.h>
#include <polypcore/pdispatch.h>
#include <polypcore/pstream.h>
diff --git a/src/modules/module-volume-restore.c b/src/modules/module-volume-restore.c
index f9e7d013..ea40d862 100644
--- a/src/modules/module-volume-restore.c
+++ b/src/modules/module-volume-restore.c
@@ -32,12 +32,13 @@
#include <stdlib.h>
#include <ctype.h>
+#include <polyp/xmalloc.h>
+
#include <polypcore/module.h>
#include <polypcore/util.h>
#include <polypcore/modargs.h>
#include <polypcore/log.h>
#include <polypcore/core-subscribe.h>
-#include <polypcore/xmalloc.h>
#include <polypcore/sink-input.h>
#include <polypcore/util.h>
#include <polyp/volume.h>
diff --git a/src/modules/module-waveout.c b/src/modules/module-waveout.c
index 2d9c42eb..3d1f1b01 100644
--- a/src/modules/module-waveout.c
+++ b/src/modules/module-waveout.c
@@ -29,6 +29,8 @@
#include <polyp/mainloop-api.h>
+#include <polyp/xmalloc.h>
+
#include <polypcore/sink.h>
#include <polypcore/source.h>
#include <polypcore/module.h>
@@ -36,7 +38,6 @@
#include <polypcore/sample-util.h>
#include <polypcore/util.h>
#include <polypcore/log.h>
-#include <polypcore/xmalloc.h>
#include "module-waveout-symdef.h"
diff --git a/src/modules/module-x11-bell.c b/src/modules/module-x11-bell.c
index e4d4020e..2b891bc1 100644
--- a/src/modules/module-x11-bell.c
+++ b/src/modules/module-x11-bell.c
@@ -31,11 +31,12 @@
#include <X11/Xlib.h>
#include <X11/XKBlib.h>
+#include <polyp/xmalloc.h>
+
#include <polypcore/iochannel.h>
#include <polypcore/sink.h>
#include <polypcore/core-scache.h>
#include <polypcore/modargs.h>
-#include <polypcore/xmalloc.h>
#include <polypcore/namereg.h>
#include <polypcore/log.h>
#include <polypcore/x11wrap.h>
diff --git a/src/modules/module-x11-publish.c b/src/modules/module-x11-publish.c
index 7408b930..e974487d 100644
--- a/src/modules/module-x11-publish.c
+++ b/src/modules/module-x11-publish.c
@@ -32,11 +32,12 @@
#include <X11/Xlib.h>
#include <X11/Xatom.h>
+#include <polyp/xmalloc.h>
+
#include <polypcore/module.h>
#include <polypcore/sink.h>
#include <polypcore/core-scache.h>
#include <polypcore/modargs.h>
-#include <polypcore/xmalloc.h>
#include <polypcore/namereg.h>
#include <polypcore/log.h>
#include <polypcore/x11wrap.h>
diff --git a/src/modules/module-zeroconf-publish.c b/src/modules/module-zeroconf-publish.c
index f8607bef..e5dce755 100644
--- a/src/modules/module-zeroconf-publish.c
+++ b/src/modules/module-zeroconf-publish.c
@@ -29,7 +29,8 @@
#include <string.h>
#include <unistd.h>
-#include <polypcore/xmalloc.h>
+#include <polyp/xmalloc.h>
+
#include <polypcore/autoload.h>
#include <polypcore/sink.h>
#include <polypcore/source.h>
diff --git a/src/modules/rtp/module-rtp-recv.c b/src/modules/rtp/module-rtp-recv.c
index 925a1210..89aa8983 100644
--- a/src/modules/rtp/module-rtp-recv.c
+++ b/src/modules/rtp/module-rtp-recv.c
@@ -31,6 +31,8 @@
#include <string.h>
#include <unistd.h>
+#include <polyp/xmalloc.h>
+
#include <polypcore/module.h>
#include <polypcore/llist.h>
#include <polypcore/sink.h>
@@ -38,7 +40,6 @@
#include <polypcore/memblockq.h>
#include <polypcore/log.h>
#include <polypcore/util.h>
-#include <polypcore/xmalloc.h>
#include <polypcore/modargs.h>
#include <polypcore/namereg.h>
#include <polypcore/sample-util.h>
diff --git a/src/modules/rtp/module-rtp-send.c b/src/modules/rtp/module-rtp-send.c
index d0def859..8fc1d7fe 100644
--- a/src/modules/rtp/module-rtp-send.c
+++ b/src/modules/rtp/module-rtp-send.c
@@ -32,6 +32,8 @@
#include <string.h>
#include <unistd.h>
+#include <polyp/xmalloc.h>
+
#include <polypcore/module.h>
#include <polypcore/llist.h>
#include <polypcore/source.h>
@@ -39,7 +41,6 @@
#include <polypcore/memblockq.h>
#include <polypcore/log.h>
#include <polypcore/util.h>
-#include <polypcore/xmalloc.h>
#include <polypcore/modargs.h>
#include <polypcore/namereg.h>
diff --git a/src/modules/rtp/sap.c b/src/modules/rtp/sap.c
index d2bca04d..e579b5c5 100644
--- a/src/modules/rtp/sap.c
+++ b/src/modules/rtp/sap.c
@@ -38,9 +38,10 @@
#include <sys/filio.h>
#endif
+#include <polyp/xmalloc.h>
+
#include <polypcore/util.h>
#include <polypcore/log.h>
-#include <polypcore/xmalloc.h>
#include "sap.h"
#include "sdp.h"
diff --git a/src/modules/rtp/sdp.c b/src/modules/rtp/sdp.c
index 84bcd83b..3cece711 100644
--- a/src/modules/rtp/sdp.c
+++ b/src/modules/rtp/sdp.c
@@ -31,9 +31,10 @@
#include <arpa/inet.h>
#include <string.h>
+#include <polyp/xmalloc.h>
+
#include <polypcore/util.h>
#include <polypcore/log.h>
-#include <polypcore/xmalloc.h>
#include "sdp.h"
#include "rtp.h"
diff --git a/src/polyp/browser.c b/src/polyp/browser.c
index cef680e4..5442fd4c 100644
--- a/src/polyp/browser.c
+++ b/src/polyp/browser.c
@@ -22,7 +22,8 @@
#include <assert.h>
#include <howl.h>
-#include <polypcore/xmalloc.h>
+#include <polyp/xmalloc.h>
+
#include <polypcore/log.h>
#include <polypcore/util.h>
diff --git a/src/polyp/channelmap.c b/src/polyp/channelmap.c
index 7266a0a0..ddd7b3ce 100644
--- a/src/polyp/channelmap.c
+++ b/src/polyp/channelmap.c
@@ -28,8 +28,10 @@
#include <stdio.h>
#include <string.h>
+#include <polyp/xmalloc.h>
+
#include <polypcore/util.h>
-#include <polypcore/xmalloc.h>
+
#include "channelmap.h"
const char *const table[] = {
diff --git a/src/polyp/client-conf-x11.c b/src/polyp/client-conf-x11.c
index 7187d86b..17ee2d6a 100644
--- a/src/polyp/client-conf-x11.c
+++ b/src/polyp/client-conf-x11.c
@@ -29,9 +29,10 @@
#include <X11/Xlib.h>
#include <X11/Xatom.h>
+#include <polyp/xmalloc.h>
+
#include <polypcore/x11prop.h>
#include <polypcore/log.h>
-#include <polypcore/xmalloc.h>
#include <polypcore/util.h>
#include "client-conf-x11.h"
diff --git a/src/polyp/client-conf.c b/src/polyp/client-conf.c
index d3ad0767..567d2ae4 100644
--- a/src/polyp/client-conf.c
+++ b/src/polyp/client-conf.c
@@ -29,7 +29,8 @@
#include <errno.h>
#include <string.h>
-#include <polypcore/xmalloc.h>
+#include <polyp/xmalloc.h>
+
#include <polypcore/log.h>
#include <polypcore/conf-parser.h>
#include <polypcore/util.h>
diff --git a/src/polyp/context.c b/src/polyp/context.c
index d5cf90f8..3c46e2e8 100644
--- a/src/polyp/context.c
+++ b/src/polyp/context.c
@@ -48,6 +48,7 @@
#include "../polypcore/winsock.h"
#include <polyp/version.h>
+#include <polyp/xmalloc.h>
#include <polypcore/native-common.h>
#include <polypcore/pdispatch.h>
@@ -56,7 +57,6 @@
#include <polypcore/socket-client.h>
#include <polypcore/pstream-util.h>
#include <polypcore/util.h>
-#include <polypcore/xmalloc.h>
#include <polypcore/log.h>
#include <polypcore/socket-util.h>
diff --git a/src/polyp/glib-mainloop.c b/src/polyp/glib-mainloop.c
index 3937a1a9..bc5df3a9 100644
--- a/src/polyp/glib-mainloop.c
+++ b/src/polyp/glib-mainloop.c
@@ -25,8 +25,9 @@
#include <assert.h>
+#include <polyp/xmalloc.h>
+
#include <polypcore/idxset.h>
-#include <polypcore/xmalloc.h>
#include <polypcore/util.h>
#include "glib.h"
diff --git a/src/polyp/glib12-mainloop.c b/src/polyp/glib12-mainloop.c
index 5ad23adb..7af21210 100644
--- a/src/polyp/glib12-mainloop.c
+++ b/src/polyp/glib12-mainloop.c
@@ -25,8 +25,9 @@
#include <assert.h>
+#include <polyp/xmalloc.h>
+
#include <polypcore/idxset.h>
-#include <polypcore/xmalloc.h>
#include <polypcore/util.h>
#include "glib-mainloop.h"
diff --git a/src/polyp/mainloop-api.c b/src/polyp/mainloop-api.c
index 71f55c05..f29598dc 100644
--- a/src/polyp/mainloop-api.c
+++ b/src/polyp/mainloop-api.c
@@ -26,8 +26,9 @@
#include <assert.h>
#include <stdlib.h>
+#include <polyp/xmalloc.h>
+
#include <polypcore/gccmacro.h>
-#include <polypcore/xmalloc.h>
#include "mainloop-api.h"
diff --git a/src/polyp/mainloop-signal.c b/src/polyp/mainloop-signal.c
index 4ffa00ba..a225f78b 100644
--- a/src/polyp/mainloop-signal.c
+++ b/src/polyp/mainloop-signal.c
@@ -36,8 +36,9 @@
#include <windows.h>
#endif
+#include <polyp/xmalloc.h>
+
#include <polypcore/util.h>
-#include <polypcore/xmalloc.h>
#include <polypcore/log.h>
#include <polypcore/gccmacro.h>
diff --git a/src/polyp/mainloop.c b/src/polyp/mainloop.c
index 589fe77e..82e789c5 100644
--- a/src/polyp/mainloop.c
+++ b/src/polyp/mainloop.c
@@ -44,9 +44,10 @@
#include "../polypcore/pipe.h"
#endif
+#include <polyp/xmalloc.h>
+
#include <polypcore/util.h>
#include <polypcore/idxset.h>
-#include <polypcore/xmalloc.h>
#include <polypcore/log.h>
#include "mainloop.h"
diff --git a/src/polyp/operation.c b/src/polyp/operation.c
index 1c0cb99f..5af9ec0b 100644
--- a/src/polyp/operation.c
+++ b/src/polyp/operation.c
@@ -25,7 +25,7 @@
#include <assert.h>
-#include <polypcore/xmalloc.h>
+#include <polyp/xmalloc.h>
#include "internal.h"
#include "operation.h"
diff --git a/src/polyp/simple.c b/src/polyp/simple.c
index 1f25869b..b56406c9 100644
--- a/src/polyp/simple.c
+++ b/src/polyp/simple.c
@@ -30,9 +30,9 @@
#include <polyp/polypaudio.h>
#include <polyp/thread-mainloop.h>
+#include <polyp/xmalloc.h>
#include <polypcore/native-common.h>
-#include <polypcore/xmalloc.h>
#include <polypcore/log.h>
#include "simple.h"
diff --git a/src/polyp/stream.c b/src/polyp/stream.c
index b2711ce0..f188e788 100644
--- a/src/polyp/stream.c
+++ b/src/polyp/stream.c
@@ -29,7 +29,8 @@
#include <string.h>
#include <polyp/def.h>
-#include <polypcore/xmalloc.h>
+#include <polyp/xmalloc.h>
+
#include <polypcore/pstream-util.h>
#include <polypcore/util.h>
#include <polypcore/log.h>
diff --git a/src/polyp/thread-mainloop.c b/src/polyp/thread-mainloop.c
index 20639e9e..d036a232 100644
--- a/src/polyp/thread-mainloop.c
+++ b/src/polyp/thread-mainloop.c
@@ -41,8 +41,9 @@
#include <windows.h>
#endif
+#include <polyp/xmalloc.h>
+
#include <polypcore/log.h>
-#include <polypcore/xmalloc.h>
#include <polypcore/hashmap.h>
#include "mainloop.h"
diff --git a/src/polypcore/xmalloc.c b/src/polyp/xmalloc.c
index 4c8689a6..4c8689a6 100644
--- a/src/polypcore/xmalloc.c
+++ b/src/polyp/xmalloc.c
diff --git a/src/polypcore/xmalloc.h b/src/polyp/xmalloc.h
index 2946011a..2946011a 100644
--- a/src/polypcore/xmalloc.h
+++ b/src/polyp/xmalloc.h
diff --git a/src/polypcore/authkey-prop.c b/src/polypcore/authkey-prop.c
index 3faf0ef1..6172d432 100644
--- a/src/polypcore/authkey-prop.c
+++ b/src/polypcore/authkey-prop.c
@@ -22,7 +22,8 @@
#include <assert.h>
#include <string.h>
-#include <polypcore/xmalloc.h>
+#include <polyp/xmalloc.h>
+
#include <polypcore/props.h>
#include <polypcore/log.h>
diff --git a/src/polypcore/autoload.c b/src/polypcore/autoload.c
index 8d2dca30..386de219 100644
--- a/src/polypcore/autoload.c
+++ b/src/polypcore/autoload.c
@@ -27,8 +27,9 @@
#include <stdlib.h>
#include <string.h>
+#include <polyp/xmalloc.h>
+
#include <polypcore/module.h>
-#include <polypcore/xmalloc.h>
#include <polypcore/memchunk.h>
#include <polypcore/sound-file.h>
#include <polypcore/log.h>
diff --git a/src/polypcore/cli-command.c b/src/polypcore/cli-command.c
index 180c61e9..5556bcb3 100644
--- a/src/polypcore/cli-command.c
+++ b/src/polypcore/cli-command.c
@@ -29,6 +29,8 @@
#include <stdlib.h>
#include <errno.h>
+#include <polyp/xmalloc.h>
+
#include <polypcore/module.h>
#include <polypcore/sink.h>
#include <polypcore/source.h>
@@ -44,7 +46,6 @@
#include <polypcore/sound-file.h>
#include <polypcore/play-memchunk.h>
#include <polypcore/autoload.h>
-#include <polypcore/xmalloc.h>
#include <polypcore/sound-file-stream.h>
#include <polypcore/props.h>
#include <polypcore/util.h>
diff --git a/src/polypcore/cli-text.c b/src/polypcore/cli-text.c
index 74de5781..09ccaa00 100644
--- a/src/polypcore/cli-text.c
+++ b/src/polypcore/cli-text.c
@@ -27,6 +27,8 @@
#include <string.h>
#include <polyp/volume.h>
+#include <polyp/xmalloc.h>
+
#include <polypcore/module.h>
#include <polypcore/client.h>
#include <polypcore/sink.h>
@@ -37,7 +39,6 @@
#include <polypcore/sample-util.h>
#include <polypcore/core-scache.h>
#include <polypcore/autoload.h>
-#include <polypcore/xmalloc.h>
#include "cli-text.h"
diff --git a/src/polypcore/cli.c b/src/polypcore/cli.c
index 583f6845..683d29ec 100644
--- a/src/polypcore/cli.c
+++ b/src/polypcore/cli.c
@@ -28,6 +28,8 @@
#include <assert.h>
#include <stdlib.h>
+#include <polyp/xmalloc.h>
+
#include <polypcore/ioline.h>
#include <polypcore/module.h>
#include <polypcore/sink.h>
@@ -40,7 +42,6 @@
#include <polypcore/namereg.h>
#include <polypcore/cli-text.h>
#include <polypcore/cli-command.h>
-#include <polypcore/xmalloc.h>
#include <polypcore/log.h>
#include "cli.h"
diff --git a/src/polypcore/client.c b/src/polypcore/client.c
index be970470..b5ed2fd0 100644
--- a/src/polypcore/client.c
+++ b/src/polypcore/client.c
@@ -28,7 +28,8 @@
#include <stdlib.h>
#include <string.h>
-#include <polypcore/xmalloc.h>
+#include <polyp/xmalloc.h>
+
#include <polypcore/core-subscribe.h>
#include <polypcore/log.h>
diff --git a/src/polypcore/conf-parser.c b/src/polypcore/conf-parser.c
index 26fc33b5..64e66c2e 100644
--- a/src/polypcore/conf-parser.c
+++ b/src/polypcore/conf-parser.c
@@ -28,9 +28,10 @@
#include <stdio.h>
#include <errno.h>
+#include <polyp/xmalloc.h>
+
#include <polypcore/log.h>
#include <polypcore/util.h>
-#include <polypcore/xmalloc.h>
#include "conf-parser.h"
diff --git a/src/polypcore/core-scache.c b/src/polypcore/core-scache.c
index 3bba38ed..8080fcd6 100644
--- a/src/polypcore/core-scache.c
+++ b/src/polypcore/core-scache.c
@@ -44,10 +44,11 @@
#include <polyp/mainloop.h>
#include <polyp/channelmap.h>
#include <polyp/volume.h>
+#include <polyp/xmalloc.h>
+
#include <polypcore/sink-input.h>
#include <polypcore/sample-util.h>
#include <polypcore/play-memchunk.h>
-#include <polypcore/xmalloc.h>
#include <polypcore/core-subscribe.h>
#include <polypcore/namereg.h>
#include <polypcore/sound-file.h>
diff --git a/src/polypcore/core-subscribe.c b/src/polypcore/core-subscribe.c
index fa6c0e50..52babb7a 100644
--- a/src/polypcore/core-subscribe.c
+++ b/src/polypcore/core-subscribe.c
@@ -26,8 +26,9 @@
#include <stdio.h>
#include <assert.h>
+#include <polyp/xmalloc.h>
+
#include <polypcore/queue.h>
-#include <polypcore/xmalloc.h>
#include <polypcore/log.h>
#include "core-subscribe.h"
diff --git a/src/polypcore/core.c b/src/polypcore/core.c
index 0093aebd..ff8ec081 100644
--- a/src/polypcore/core.c
+++ b/src/polypcore/core.c
@@ -28,6 +28,8 @@
#include <stdio.h>
#include <signal.h>
+#include <polyp/xmalloc.h>
+
#include <polypcore/module.h>
#include <polypcore/sink.h>
#include <polypcore/source.h>
@@ -35,7 +37,6 @@
#include <polypcore/util.h>
#include <polypcore/core-scache.h>
#include <polypcore/autoload.h>
-#include <polypcore/xmalloc.h>
#include <polypcore/core-subscribe.h>
#include <polypcore/props.h>
#include <polypcore/random.h>
diff --git a/src/polypcore/dynarray.c b/src/polypcore/dynarray.c
index 1aff7f51..234c2c03 100644
--- a/src/polypcore/dynarray.c
+++ b/src/polypcore/dynarray.c
@@ -27,7 +27,7 @@
#include <assert.h>
#include <stdlib.h>
-#include <polypcore/xmalloc.h>
+#include <polyp/xmalloc.h>
#include "dynarray.h"
diff --git a/src/polypcore/hashmap.c b/src/polypcore/hashmap.c
index 8861fd3d..adc322f0 100644
--- a/src/polypcore/hashmap.c
+++ b/src/polypcore/hashmap.c
@@ -27,8 +27,9 @@
#include <assert.h>
#include <string.h>
+#include <polyp/xmalloc.h>
+
#include <polypcore/idxset.h>
-#include <polypcore/xmalloc.h>
#include <polypcore/log.h>
#include "hashmap.h"
diff --git a/src/polypcore/idxset.c b/src/polypcore/idxset.c
index f970ae5e..bde5c279 100644
--- a/src/polypcore/idxset.c
+++ b/src/polypcore/idxset.c
@@ -28,7 +28,7 @@
#include <stdlib.h>
#include <string.h>
-#include <polypcore/xmalloc.h>
+#include <polyp/xmalloc.h>
#include "idxset.h"
diff --git a/src/polypcore/iochannel.c b/src/polypcore/iochannel.c
index aba0399c..a1ad5dea 100644
--- a/src/polypcore/iochannel.c
+++ b/src/polypcore/iochannel.c
@@ -38,9 +38,10 @@
#include "winsock.h"
+#include <polyp/xmalloc.h>
+
#include <polypcore/util.h>
#include <polypcore/socket-util.h>
-#include <polypcore/xmalloc.h>
#include <polypcore/log.h>
#include "iochannel.h"
diff --git a/src/polypcore/ioline.c b/src/polypcore/ioline.c
index eb8fdda5..9bb610fe 100644
--- a/src/polypcore/ioline.c
+++ b/src/polypcore/ioline.c
@@ -29,7 +29,8 @@
#include <stdlib.h>
#include <string.h>
-#include <polypcore/xmalloc.h>
+#include <polyp/xmalloc.h>
+
#include <polypcore/log.h>
#include "ioline.h"
diff --git a/src/polypcore/log.c b/src/polypcore/log.c
index 9c9ed2fd..9908d168 100644
--- a/src/polypcore/log.c
+++ b/src/polypcore/log.c
@@ -33,7 +33,8 @@
#include <syslog.h>
#endif
-#include <polypcore/xmalloc.h>
+#include <polyp/xmalloc.h>
+
#include <polypcore/util.h>
#include "log.h"
diff --git a/src/polypcore/mcalign.c b/src/polypcore/mcalign.c
index f90fd7e8..d9267f99 100644
--- a/src/polypcore/mcalign.c
+++ b/src/polypcore/mcalign.c
@@ -28,7 +28,7 @@
#include <assert.h>
#include <string.h>
-#include <polypcore/xmalloc.h>
+#include <polyp/xmalloc.h>
#include "mcalign.h"
diff --git a/src/polypcore/memblock.c b/src/polypcore/memblock.c
index 04e8436f..a0e5135b 100644
--- a/src/polypcore/memblock.c
+++ b/src/polypcore/memblock.c
@@ -28,7 +28,7 @@
#include <assert.h>
#include <string.h>
-#include <polypcore/xmalloc.h>
+#include <polyp/xmalloc.h>
#include "memblock.h"
diff --git a/src/polypcore/memblockq.c b/src/polypcore/memblockq.c
index 90e1d9eb..caacd96f 100644
--- a/src/polypcore/memblockq.c
+++ b/src/polypcore/memblockq.c
@@ -30,7 +30,8 @@
#include <stdlib.h>
#include <string.h>
-#include <polypcore/xmalloc.h>
+#include <polyp/xmalloc.h>
+
#include <polypcore/log.h>
#include <polypcore/mcalign.h>
diff --git a/src/polypcore/memchunk.c b/src/polypcore/memchunk.c
index d6856ab8..918b3f0f 100644
--- a/src/polypcore/memchunk.c
+++ b/src/polypcore/memchunk.c
@@ -28,7 +28,7 @@
#include <assert.h>
#include <string.h>
-#include <polypcore/xmalloc.h>
+#include <polyp/xmalloc.h>
#include "memchunk.h"
diff --git a/src/polypcore/modargs.c b/src/polypcore/modargs.c
index 713326bf..63cc779d 100644
--- a/src/polypcore/modargs.c
+++ b/src/polypcore/modargs.c
@@ -28,13 +28,14 @@
#include <stdlib.h>
#include <string.h>
+#include <polyp/xmalloc.h>
+
#include <polypcore/hashmap.h>
#include <polypcore/idxset.h>
#include <polypcore/sample-util.h>
#include <polypcore/namereg.h>
#include <polypcore/sink.h>
#include <polypcore/source.h>
-#include <polypcore/xmalloc.h>
#include <polypcore/util.h>
#include "modargs.h"
diff --git a/src/polypcore/modinfo.c b/src/polypcore/modinfo.c
index 39186ceb..241076c6 100644
--- a/src/polypcore/modinfo.c
+++ b/src/polypcore/modinfo.c
@@ -26,7 +26,8 @@
#include <ltdl.h>
#include <assert.h>
-#include <polypcore/xmalloc.h>
+#include <polyp/xmalloc.h>
+
#include <polypcore/util.h>
#include <polypcore/log.h>
diff --git a/src/polypcore/module.c b/src/polypcore/module.c
index 5412f397..fe177a5b 100644
--- a/src/polypcore/module.c
+++ b/src/polypcore/module.c
@@ -30,7 +30,8 @@
#include <string.h>
#include <errno.h>
-#include <polypcore/xmalloc.h>
+#include <polyp/xmalloc.h>
+
#include <polypcore/core-subscribe.h>
#include <polypcore/log.h>
#include <polypcore/util.h>
diff --git a/src/polypcore/namereg.c b/src/polypcore/namereg.c
index 9229a0f9..cf11f5a4 100644
--- a/src/polypcore/namereg.c
+++ b/src/polypcore/namereg.c
@@ -29,10 +29,11 @@
#include <string.h>
#include <stdio.h>
+#include <polyp/xmalloc.h>
+
#include <polypcore/autoload.h>
#include <polypcore/source.h>
#include <polypcore/sink.h>
-#include <polypcore/xmalloc.h>
#include <polypcore/core-subscribe.h>
#include <polypcore/util.h>
diff --git a/src/polypcore/packet.c b/src/polypcore/packet.c
index 31ddad95..646b59e0 100644
--- a/src/polypcore/packet.c
+++ b/src/polypcore/packet.c
@@ -26,7 +26,7 @@
#include <assert.h>
#include <stdlib.h>
-#include <polypcore/xmalloc.h>
+#include <polyp/xmalloc.h>
#include "packet.h"
diff --git a/src/polypcore/parseaddr.c b/src/polypcore/parseaddr.c
index c2b25c89..7e518a5d 100644
--- a/src/polypcore/parseaddr.c
+++ b/src/polypcore/parseaddr.c
@@ -27,7 +27,8 @@
#include <assert.h>
#include <stdlib.h>
-#include <polypcore/xmalloc.h>
+#include <polyp/xmalloc.h>
+
#include <polypcore/util.h>
#include "parseaddr.h"
diff --git a/src/polypcore/pdispatch.c b/src/polypcore/pdispatch.c
index b087f1a5..21e3644e 100644
--- a/src/polypcore/pdispatch.c
+++ b/src/polypcore/pdispatch.c
@@ -27,8 +27,9 @@
#include <stdlib.h>
#include <assert.h>
+#include <polyp/xmalloc.h>
+
#include <polypcore/native-common.h>
-#include <polypcore/xmalloc.h>
#include <polypcore/llist.h>
#include <polypcore/log.h>
#include <polypcore/util.h>
diff --git a/src/polypcore/pid.c b/src/polypcore/pid.c
index b258290b..53b8ad0a 100644
--- a/src/polypcore/pid.c
+++ b/src/polypcore/pid.c
@@ -39,9 +39,10 @@
#include <windows.h>
#endif
+#include <polyp/xmalloc.h>
+
#include <polypcore/util.h>
#include <polypcore/log.h>
-#include <polypcore/xmalloc.h>
#include "pid.h"
diff --git a/src/polypcore/play-memchunk.c b/src/polypcore/play-memchunk.c
index 37ebdcf1..982cedc7 100644
--- a/src/polypcore/play-memchunk.c
+++ b/src/polypcore/play-memchunk.c
@@ -28,8 +28,9 @@
#include <stdio.h>
#include <string.h>
+#include <polyp/xmalloc.h>
+
#include <polypcore/sink-input.h>
-#include <polypcore/xmalloc.h>
#include <polypcore/gccmacro.h>
#include "play-memchunk.h"
diff --git a/src/polypcore/props.c b/src/polypcore/props.c
index 96cdc4f2..1db44ee7 100644
--- a/src/polypcore/props.c
+++ b/src/polypcore/props.c
@@ -21,7 +21,8 @@
#include <assert.h>
-#include <polypcore/xmalloc.h>
+#include <polyp/xmalloc.h>
+
#include <polypcore/log.h>
#include "props.h"
diff --git a/src/polypcore/protocol-cli.c b/src/polypcore/protocol-cli.c
index 7dd489f7..076411cf 100644
--- a/src/polypcore/protocol-cli.c
+++ b/src/polypcore/protocol-cli.c
@@ -26,8 +26,9 @@
#include <assert.h>
#include <stdlib.h>
+#include <polyp/xmalloc.h>
+
#include <polypcore/cli.h>
-#include <polypcore/xmalloc.h>
#include <polypcore/log.h>
#include "protocol-cli.h"
diff --git a/src/polypcore/protocol-esound.c b/src/polypcore/protocol-esound.c
index fcbeba6d..86a8c9e3 100644
--- a/src/polypcore/protocol-esound.c
+++ b/src/polypcore/protocol-esound.c
@@ -31,6 +31,8 @@
#include <limits.h>
#include <polyp/sample.h>
+#include <polyp/xmalloc.h>
+
#include <polypcore/esound.h>
#include <polypcore/memblock.h>
#include <polypcore/client.h>
@@ -42,7 +44,6 @@
#include <polypcore/sample-util.h>
#include <polypcore/authkey.h>
#include <polypcore/namereg.h>
-#include <polypcore/xmalloc.h>
#include <polypcore/log.h>
#include <polypcore/util.h>
#include <polypcore/utf8.h>
diff --git a/src/polypcore/protocol-http.c b/src/polypcore/protocol-http.c
index 85ddebee..68864237 100644
--- a/src/polypcore/protocol-http.c
+++ b/src/polypcore/protocol-http.c
@@ -28,8 +28,9 @@
#include <stdio.h>
#include <string.h>
+#include <polyp/xmalloc.h>
+
#include <polypcore/ioline.h>
-#include <polypcore/xmalloc.h>
#include <polypcore/log.h>
#include <polypcore/namereg.h>
#include <polypcore/cli-text.h>
diff --git a/src/polypcore/protocol-native.c b/src/polypcore/protocol-native.c
index 3b904134..b0ad5955 100644
--- a/src/polypcore/protocol-native.c
+++ b/src/polypcore/protocol-native.c
@@ -30,6 +30,7 @@
#include <unistd.h>
#include <polyp/version.h>
+#include <polyp/xmalloc.h>
#include <polypcore/native-common.h>
#include <polypcore/packet.h>
@@ -43,7 +44,6 @@
#include <polypcore/authkey.h>
#include <polypcore/namereg.h>
#include <polypcore/core-scache.h>
-#include <polypcore/xmalloc.h>
#include <polypcore/util.h>
#include <polypcore/core-subscribe.h>
#include <polypcore/log.h>
diff --git a/src/polypcore/protocol-simple.c b/src/polypcore/protocol-simple.c
index 1e3b169c..caffd5c9 100644
--- a/src/polypcore/protocol-simple.c
+++ b/src/polypcore/protocol-simple.c
@@ -30,12 +30,13 @@
#include <errno.h>
#include <string.h>
+#include <polyp/xmalloc.h>
+
#include <polypcore/sink-input.h>
#include <polypcore/source-output.h>
#include <polypcore/client.h>
#include <polypcore/sample-util.h>
#include <polypcore/namereg.h>
-#include <polypcore/xmalloc.h>
#include <polypcore/log.h>
#include "protocol-simple.h"
diff --git a/src/polypcore/pstream.c b/src/polypcore/pstream.c
index 09bd1e27..074cab91 100644
--- a/src/polypcore/pstream.c
+++ b/src/polypcore/pstream.c
@@ -34,8 +34,9 @@
#include "winsock.h"
+#include <polyp/xmalloc.h>
+
#include <polypcore/queue.h>
-#include <polypcore/xmalloc.h>
#include <polypcore/log.h>
#include <polypcore/core-scache.h>
diff --git a/src/polypcore/queue.c b/src/polypcore/queue.c
index 77ca1ed3..01f957d9 100644
--- a/src/polypcore/queue.c
+++ b/src/polypcore/queue.c
@@ -26,7 +26,7 @@
#include <assert.h>
#include <stdlib.h>
-#include <polypcore/xmalloc.h>
+#include <polyp/xmalloc.h>
#include "queue.h"
diff --git a/src/polypcore/resampler.c b/src/polypcore/resampler.c
index b2a8874b..33e8c295 100644
--- a/src/polypcore/resampler.c
+++ b/src/polypcore/resampler.c
@@ -30,8 +30,9 @@
#include <liboil/liboilfuncs.h>
#include <liboil/liboil.h>
+#include <polyp/xmalloc.h>
+
#include <polypcore/sconv.h>
-#include <polypcore/xmalloc.h>
#include <polypcore/log.h>
#include "resampler.h"
diff --git a/src/polypcore/sink-input.c b/src/polypcore/sink-input.c
index c1026390..5c0caa21 100644
--- a/src/polypcore/sink-input.c
+++ b/src/polypcore/sink-input.c
@@ -28,8 +28,9 @@
#include <stdlib.h>
#include <string.h>
+#include <polyp/xmalloc.h>
+
#include <polypcore/sample-util.h>
-#include <polypcore/xmalloc.h>
#include <polypcore/core-subscribe.h>
#include <polypcore/log.h>
#include <polypcore/utf8.h>
diff --git a/src/polypcore/sink.c b/src/polypcore/sink.c
index b59f1eaa..a873c00a 100644
--- a/src/polypcore/sink.c
+++ b/src/polypcore/sink.c
@@ -29,12 +29,12 @@
#include <stdio.h>
#include <polyp/introspect.h>
+#include <polyp/xmalloc.h>
#include <polypcore/sink-input.h>
#include <polypcore/namereg.h>
#include <polypcore/util.h>
#include <polypcore/sample-util.h>
-#include <polypcore/xmalloc.h>
#include <polypcore/core-subscribe.h>
#include <polypcore/log.h>
#include <polypcore/utf8.h>
diff --git a/src/polypcore/socket-client.c b/src/polypcore/socket-client.c
index 734b9dde..a61cf582 100644
--- a/src/polypcore/socket-client.c
+++ b/src/polypcore/socket-client.c
@@ -54,9 +54,10 @@
#include "winsock.h"
+#include <polyp/xmalloc.h>
+
#include <polypcore/socket-util.h>
#include <polypcore/util.h>
-#include <polypcore/xmalloc.h>
#include <polypcore/log.h>
#include <polypcore/parseaddr.h>
diff --git a/src/polypcore/socket-server.c b/src/polypcore/socket-server.c
index f7e0b647..959173f2 100644
--- a/src/polypcore/socket-server.c
+++ b/src/polypcore/socket-server.c
@@ -62,8 +62,9 @@
#include "winsock.h"
+#include <polyp/xmalloc.h>
+
#include <polypcore/socket-util.h>
-#include <polypcore/xmalloc.h>
#include <polypcore/util.h>
#include <polypcore/log.h>
diff --git a/src/polypcore/socket-util.c b/src/polypcore/socket-util.c
index 915c7f22..0961db21 100644
--- a/src/polypcore/socket-util.c
+++ b/src/polypcore/socket-util.c
@@ -59,8 +59,9 @@
#include "winsock.h"
+#include <polyp/xmalloc.h>
+
#include <polypcore/util.h>
-#include <polypcore/xmalloc.h>
#include <polypcore/log.h>
#include "socket-util.h"
diff --git a/src/polypcore/sound-file-stream.c b/src/polypcore/sound-file-stream.c
index fdacea54..68fd8a89 100644
--- a/src/polypcore/sound-file-stream.c
+++ b/src/polypcore/sound-file-stream.c
@@ -30,8 +30,9 @@
#include <sndfile.h>
+#include <polyp/xmalloc.h>
+
#include <polypcore/sink-input.h>
-#include <polypcore/xmalloc.h>
#include <polypcore/log.h>
#include "sound-file-stream.h"
diff --git a/src/polypcore/source-output.c b/src/polypcore/source-output.c
index b3113071..c8db870b 100644
--- a/src/polypcore/source-output.c
+++ b/src/polypcore/source-output.c
@@ -28,7 +28,8 @@
#include <stdlib.h>
#include <string.h>
-#include <polypcore/xmalloc.h>
+#include <polyp/xmalloc.h>
+
#include <polypcore/core-subscribe.h>
#include <polypcore/log.h>
#include <polypcore/utf8.h>
diff --git a/src/polypcore/source.c b/src/polypcore/source.c
index fca281a7..4d96622b 100644
--- a/src/polypcore/source.c
+++ b/src/polypcore/source.c
@@ -28,9 +28,10 @@
#include <stdlib.h>
#include <string.h>
+#include <polyp/xmalloc.h>
+
#include <polypcore/source-output.h>
#include <polypcore/namereg.h>
-#include <polypcore/xmalloc.h>
#include <polypcore/core-subscribe.h>
#include <polypcore/log.h>
#include <polypcore/sample-util.h>
diff --git a/src/polypcore/strbuf.c b/src/polypcore/strbuf.c
index dcad5e78..d1517a11 100644
--- a/src/polypcore/strbuf.c
+++ b/src/polypcore/strbuf.c
@@ -30,7 +30,7 @@
#include <stdarg.h>
#include <stdio.h>
-#include <polypcore/xmalloc.h>
+#include <polyp/xmalloc.h>
#include "strbuf.h"
diff --git a/src/polypcore/strlist.c b/src/polypcore/strlist.c
index e165aefd..4d70e9e9 100644
--- a/src/polypcore/strlist.c
+++ b/src/polypcore/strlist.c
@@ -26,7 +26,8 @@
#include <string.h>
#include <assert.h>
-#include <polypcore/xmalloc.h>
+#include <polyp/xmalloc.h>
+
#include <polypcore/strbuf.h>
#include <polypcore/util.h>
diff --git a/src/polypcore/tagstruct.c b/src/polypcore/tagstruct.c
index 86b8368a..27582cae 100644
--- a/src/polypcore/tagstruct.c
+++ b/src/polypcore/tagstruct.c
@@ -36,7 +36,7 @@
#include "winsock.h"
-#include <polypcore/xmalloc.h>
+#include <polyp/xmalloc.h>
#include "tagstruct.h"
diff --git a/src/polypcore/tokenizer.c b/src/polypcore/tokenizer.c
index 556a190a..667643fe 100644
--- a/src/polypcore/tokenizer.c
+++ b/src/polypcore/tokenizer.c
@@ -27,8 +27,9 @@
#include <assert.h>
#include <stdlib.h>
+#include <polyp/xmalloc.h>
+
#include <polypcore/dynarray.h>
-#include <polypcore/xmalloc.h>
#include <polypcore/gccmacro.h>
#include "tokenizer.h"
diff --git a/src/polypcore/utf8.c b/src/polypcore/utf8.c
index bb8621e2..01fbfccd 100644
--- a/src/polypcore/utf8.c
+++ b/src/polypcore/utf8.c
@@ -33,8 +33,9 @@
#include <inttypes.h>
#include <string.h>
+#include <polyp/xmalloc.h>
+
#include "utf8.h"
-#include "xmalloc.h"
#define FILTER_CHAR '_'
diff --git a/src/polypcore/util.c b/src/polypcore/util.c
index 6f7f8819..9783b746 100644
--- a/src/polypcore/util.c
+++ b/src/polypcore/util.c
@@ -70,7 +70,8 @@
#include "winsock.h"
-#include <polypcore/xmalloc.h>
+#include <polyp/xmalloc.h>
+
#include <polypcore/log.h>
#include "util.h"
diff --git a/src/polypcore/x11wrap.c b/src/polypcore/x11wrap.c
index c1ca83ca..41a40764 100644
--- a/src/polypcore/x11wrap.c
+++ b/src/polypcore/x11wrap.c
@@ -22,8 +22,9 @@
#include <assert.h>
#include <stdio.h>
+#include <polyp/xmalloc.h>
+
#include <polypcore/llist.h>
-#include <polypcore/xmalloc.h>
#include <polypcore/log.h>
#include <polypcore/props.h>
diff --git a/src/tests/strlist-test.c b/src/tests/strlist-test.c
index 14543112..415c94e6 100644
--- a/src/tests/strlist-test.c
+++ b/src/tests/strlist-test.c
@@ -1,7 +1,7 @@
#include <stdio.h>
+#include <polyp/xmalloc.h>
#include <polypcore/strlist.h>
-#include <polypcore/xmalloc.h>
#include <polypcore/gccmacro.h>
int main(PA_GCC_UNUSED int argc, PA_GCC_UNUSED char* argv[]) {
diff --git a/src/tests/utf8-test.c b/src/tests/utf8-test.c
index c8b2fabb..57f445c7 100644
--- a/src/tests/utf8-test.c
+++ b/src/tests/utf8-test.c
@@ -3,8 +3,8 @@
#include <stdio.h>
#include <assert.h>
+#include <polyp/xmalloc.h>
#include <polypcore/utf8.h>
-#include <polypcore/xmalloc.h>
int main(int argc, char *argv[]) {
char *c;