00001 #ifndef _VERSION_H 00002 #define _VERSION_H 00003 00004 #include <stdlib.h> 00005 00006 #define VERSION_TIME_PRINT(name) \ 00007 {\ 00008 struct tm *version_h_pt; \ 00009 struct timeval version_h_tv; \ 00010 gettimeofday(&version_h_tv, NULL); \ 00011 version_h_pt = localtime( &version_h_tv.tv_sec ); \ 00012 fprintf( stderr, "%04d.%02d.%02d-%02d:%02d:%02d-%03d %s %s %s %s\n", \ 00013 version_h_pt->tm_year+1900, \ 00014 version_h_pt->tm_mon+1, \ 00015 version_h_pt->tm_mday, \ 00016 version_h_pt->tm_hour, \ 00017 version_h_pt->tm_min, \ 00018 version_h_pt->tm_sec, (int) (version_h_tv.tv_usec / 1000 ), \ 00019 name, VERS_BUILD_ID, VERS_BUILD_NO, VERS_BUILD_TIME ); \ 00020 }; 00021 00022 00023 #define VERSION_PRINT(name) fprintf( stderr, "%s %s %s %s\n", name, VERS_BUILD_ID, VERS_BUILD_NO, VERS_BUILD_TIME ) \ 00024 00025 #define VERSION_STR VERS_BUILD_ID VERS_BUILD_NO VERS_BUILD_TIME 00026 00027 #ifdef BELAP_VERSION_C 00028 00029 char *ixf_vers_build_id = VERS_BUILD_ID; 00030 char *ixf_vers_build_time = VERS_BUILD_TIME; 00031 char *ixf_vers_build_no = VERS_BUILD_NO; 00032 char *ixf_build_deps[] = VERS_BUILD_DEPS ; 00033 char *ixf_build_fes[] = VERS_BUILD_FES ; 00034 00035 #endif 00036 00037 #endif 00038