+2012-09-22 Paul Eggert <eggert@cs.ucla.edu>
+
+ misc: don't limit commentary to inline functions
+ * lib/binary-io.h, lib/malloca.h, lib/safe-alloc.c:
+ * lib/xalloc-oversized.h, lib/xsize.h:
+ Contrast macros to functions in general, not just to inline functions,
+ when the commentary does not apply only to inline functions.
+
2012-09-20 Jim Meyering <meyering@redhat.com>
non-recursive-gnulib-prefix-hack: new module
# endif
#else
/* On reasonable systems, binary I/O is the only choice. */
- /* Use an inline function rather than a macro, to avoid gcc warnings
+ /* Use a function rather than a macro, to avoid gcc warnings
"warning: statement with no effect". */
static inline int
set_binary_mode (int fd, int mode)
and a page size can be as small as 4096 bytes. So we cannot safely
allocate anything larger than 4096 bytes. Also care for the possibility
of a few compiler-allocated temporary stack slots.
- This must be a macro, not an inline function. */
+ This must be a macro, not a function. */
# define safe_alloca(N) ((N) < 4032 ? alloca (N) : NULL)
#else
# define safe_alloca(N) ((void) (N), NULL)
/* Return 1 if an array of N objects, each of size S, cannot exist due
to size arithmetic overflow. S must be positive and N must be
- nonnegative. This is a macro, not an inline function, so that it
+ nonnegative. This is a macro, not a function, so that it
works correctly even when SIZE_MAX < N.
By gnulib convention, SIZE_MAX represents overflow in size
/* Return 1 if an array of N objects, each of size S, cannot exist due
to size arithmetic overflow. S must be positive and N must be
- nonnegative. This is a macro, not an inline function, so that it
+ nonnegative. This is a macro, not a function, so that it
works correctly even when SIZE_MAX < N.
By gnulib convention, SIZE_MAX represents overflow in size
/* Multiplication of a count with an element size, with overflow check.
The count must be >= 0 and the element size must be > 0.
- This is a macro, not an inline function, so that it works correctly even
+ This is a macro, not a function, so that it works correctly even
when N is of a wider type and N > SIZE_MAX. */
#define xtimes(N, ELSIZE) \
((N) <= SIZE_MAX / (ELSIZE) ? (size_t) (N) * (ELSIZE) : SIZE_MAX)