Interrupt numbers: portable code? macro?

I know there are some differences in the interrupt numbering on different Arduino boards.

For example:

UNO: D3 is INT1

Pro-Micro: D3 is INT0

Since I need to specify the interrupt number as the first parameter of attachInterrupt(), how can I write sketches that are portable across board types?

Is there some macro or other way to compute INT number from pin number?

Something like:

PIN_TO_INT(3)

Or at least some definitions that can be tested to determine which board type is being compiled?

Something like:

if(board_type==PROMICRO) INT=0;

Thanks!