This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Roland McGrath wrote:
Sadly, glibc does not seem to provide an ARRAY_SIZE macro for global use.If you want one, put it in libc-internal.h.
I suggest avoiding the name 'ARRAY_SIZE', as a size is typically a byte count, e.g., what 'sizeof' returns. To help avoid this confusion GNU Emacs uses the name 'ARRAYELTS' internally, in src/lisp.h:
#define ARRAYELTS(arr) (sizeof (arr) / sizeof (arr)[0]) and perhaps glibc should do the same.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |