chiark / gitweb /
Add _cleanup_pclose_ and fix mismatching pipe close opened by popen()
[elogind.git] / src / shared / macro.h
index 29d91392f8abc3848a3f454307ea9560f36a3a73..b307dedaa8bd6fc5fa379f5b715e6e97df7eaa0e 100644 (file)
@@ -196,6 +196,7 @@ static inline size_t IOVEC_INCREMENT(struct iovec *i, unsigned n, size_t k) {
 
 #define _cleanup_free_ __attribute__((cleanup(freep)))
 #define _cleanup_fclose_ __attribute__((cleanup(fclosep)))
+#define _cleanup_pclose_ __attribute__((cleanup(pclosep)))
 #define _cleanup_close_ __attribute__((cleanup(closep)))
 #define _cleanup_closedir_ __attribute__((cleanup(closedirp)))
 #define _cleanup_umask_ __attribute__((cleanup(umaskp)))