The following commit has been merged in the master branch:
commit 6fdc75338295a91ceebfddebb1e672fe8f929012
Author: Guillem Jover <[email protected]>
Date: Sat Mar 13 07:26:45 2010 +0100
libdpkg: Always use C99 variadic macros
As the build requires them anyway, we avoid exposing the configure
variable HAVE_C99, which was never defined for the installed headers.
diff --git a/debian/changelog b/debian/changelog
index f301171..39c530c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,8 @@
dpkg (1.15.6.1) UNRELEASED; urgency=low
* Fix two memory leaks introduced in 1.15.6.
+ * Always use C99 variadic macros, as the build requires them anyway, we
+ avoid exposing the configure variable HAVE_C99 on installed headers.
-- Guillem Jover <[email protected]> Sat, 13 Mar 2010 05:23:34 +0100
diff --git a/lib/dpkg/buffer.h b/lib/dpkg/buffer.h
index ac852a3..6700ec5 100644
--- a/lib/dpkg/buffer.h
+++ b/lib/dpkg/buffer.h
@@ -51,7 +51,6 @@ struct buffer_data {
# define buffer_md5(buf, hash, limit) \
buffer_hash(buf, hash, BUFFER_WRITE_MD5, limit)
-#if HAVE_C99
# define fd_md5(fd, hash, limit, ...) \
buffer_copy_IntPtr(fd, BUFFER_READ_FD, hash, BUFFER_WRITE_MD5, \
limit, __VA_ARGS__)
@@ -86,42 +85,6 @@ struct buffer_data {
# define stream_fd_copy(file, fd, limit, ...) \
buffer_copy_PtrInt(file, BUFFER_READ_STREAM, fd, BUFFER_WRITE_FD, \
limit, __VA_ARGS__)
-#else /* HAVE_C99 */
-# define fd_md5(fd, hash, limit, desc...) \
- buffer_copy_IntPtr(fd, BUFFER_READ_FD, hash, BUFFER_WRITE_MD5, \
- limit, desc)
-# define stream_md5(file, hash, limit, desc...) \
- buffer_copy_PtrPtr(file, BUFFER_READ_STREAM, hash, BUFFER_WRITE_MD5, \
- limit, desc)
-# define fd_fd_copy(fd1, fd2, limit, desc...) \
- buffer_copy_IntInt(fd1, BUFFER_READ_FD, fd2, BUFFER_WRITE_FD, \
- limit, desc)
-# define fd_buf_copy(fd, buf, limit, desc...) \
- buffer_copy_IntPtr(fd, BUFFER_READ_FD, buf, BUFFER_WRITE_BUF, \
- limit, desc)
-# define fd_vbuf_copy(fd, buf, limit, desc...) \
- buffer_copy_IntPtr(fd, BUFFER_READ_FD, buf, BUFFER_WRITE_VBUF, \
- limit, desc)
-# define fd_null_copy(fd, limit, desc...) \
- if (lseek(fd, limit, SEEK_CUR) == -1) { \
- if (errno != ESPIPE) \
- ohshite(desc); \
- buffer_copy_IntPtr(fd, BUFFER_READ_FD, \
- NULL, BUFFER_WRITE_NULL, \
- limit, desc); \
- }
-# define stream_null_copy(file, limit, desc...) \
- if (fseek(file, limit, SEEK_CUR) == -1) { \
- if (errno != EBADF) \
- ohshite(desc); \
- buffer_copy_PtrPtr(file, BUFFER_READ_STREAM, \
- NULL, BUFFER_WRITE_NULL, \
- limit, desc); \
- }
-# define stream_fd_copy(file, fd, limit, desc...)\
- buffer_copy_PtrInt(file, BUFFER_READ_STREAM, fd, BUFFER_WRITE_FD, \
- limit, desc)
-#endif /* HAVE_C99 */
off_t buffer_copy_PtrInt(void *p, int typeIn, int i, int typeOut,
off_t limit, const char *desc,
diff --git a/lib/dpkg/dpkg.h b/lib/dpkg/dpkg.h
index 749c172..7f94417 100644
--- a/lib/dpkg/dpkg.h
+++ b/lib/dpkg/dpkg.h
@@ -140,11 +140,7 @@ enum { ehflag_normaltidy=01, ehflag_bombout=02,
ehflag_recursiveerror=04 };
void do_internerr(const char *file, int line, const char *fmt, ...)
DPKG_ATTR_NORET DPKG_ATTR_PRINTF(3);
-#if HAVE_C99
#define internerr(...) do_internerr(__FILE__, __LINE__, __VA_ARGS__)
-#else
-#define internerr(args...) do_internerr(__FILE__, __LINE__, args)
-#endif
void ohshit(const char *fmt, ...) DPKG_ATTR_NORET DPKG_ATTR_PRINTF(1);
void ohshitv(const char *fmt, va_list al) DPKG_ATTR_NORET DPKG_ATTR_VPRINTF(1);
diff --git a/utils/install-info.c b/utils/install-info.c
index 81e9d4f..eb1679f 100644
--- a/utils/install-info.c
+++ b/utils/install-info.c
@@ -29,13 +29,8 @@
#define SELF "/usr/sbin/install-info"
#define WRAPPED "/usr/bin/install-info"
-#if HAVE_C99
#define warn(...) fprintf(stderr, "install-info: warning: " __VA_ARGS__)
#define error(...) fprintf(stderr, "install-info: error: " __VA_ARGS__)
-#else
-#define warn(msg...) fprintf(stderr, "install-info: warning: " msg)
-#define error(msg...) fprintf(stderr, "install-info: error: " msg)
-#endif
int
main(int argc, char **argv)
--
dpkg's main repository
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]