The compare function is passed by value (like all things in C) and the preprocessor is not smart enough to find the code.
#define SORT_ELEMENT_TYPE int
#define SORT_COMPARE(a, b) sign(a - b)
#include "specialized_sort.h"
And the header would define a function with the following signature:
int sort_int(int[] a, size_t n);
But generics provide another benefit: in theory with them, the compiler should be able to determine that two high-level types are actually the same machine type, so in the above example, SORT_ELEMENT_TYPE int and long would not generate duplicate code on many machines.
https://godbolt.org/ might be useful for this exercise.