emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

b... functions in configure.in


From: Dave Love
Subject: b... functions in configure.in
Date: Sun, 18 May 2003 21:20:56 +0100
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.2 (gnu/linux)

I don't understand the purpose of the following fragment in
configure.in, and I'm not convinced it's correct.

What's the point of defining bcopy away if you have it, especially at
the expense of confusion when debugging?  What about the case now
removed for the system not having bcopy or memmove?  (If that's
irrelevant now, stuff in sysdep.c can be cleaned up.)  Is it clear
that bcopy is never used with overlapping args, and what's to prevent
someone doing that in future?  If it's always used with
non-overlapping args and you want to outlaw it, I think it should just
be replaced globally with memcpy (which has the advantage of being
inlined by gcc) to avoid confusion.  What's BCMP for, which doesn't
seem to be used anywhere.

/* avoid deprecated functions */
#ifdef HAVE_MEMCPY
#  define bcopy(a,b,s) memcpy (b,a,s)
#endif
#ifdef HAVE_MEMSET
#  define bzero(a,s) memset (a,0,s)
#endif
#ifdef HAVE_MEMCMP
#  define BCMP memcmp
#  define bcmp memcmp
#endif




reply via email to

[Prev in Thread] Current Thread [Next in Thread]