Move these macros to util.h.

#802