Add min/max macros in file requiring it.

Fix #293.

As there is no common header between this three files, I added macros in each file.