You could simply use M_PI from the <math.h> include (there are other constants too).
A direct solution to your question would be:
globals.h:
double g_pi; globals.c
g_pi = 3.; For all other .c and .h files:
extern double g_pi; Also see wikipedia