Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [PATCH 5/6] memmove is expected to return dest



On Jun 7,  7:18pm, Nikolas Garofil wrote:
}
}  #ifndef HAVE_MEMMOVE
} -# define memmove(dest, src, len) bcopy((src), (dest), (len))
} +void *memmove(void *dest, const void *src, size_t n) {
} +	bcopy(src, dest, n);
} +	return dest;
} +}
}  #endif

Defining a function in a .h file, especially without declaring it
static, is probably not the best idea.

Perhaps something like

#ifndef HAVE_MEMMOVE
# ifndef memmove
static void *zmm;
# define memmove(dest, src, len) (bcopy((src), zmm = (dest), (len)), zmm)
# endif
#endif

??



Messages sorted by: Reverse Date, Date, Thread, Author