Rename signal macros to avoid name conflicts.
Use gslices instead of malloc to allocate memory.