CVS Ids in source files

I would like to include a declaration like the following into every .c file.

static const char mc_cvsid[] = "$Id";

Then in case of bug reports we can ask the reporter to run the ident(1) command on the mc binary, and even for CVS versions, we get the version of every file that's used.

I would provide a macro MC_CVSID("$Id"), which would either do that or which expands to nothing, if someone needs to have smaller binaries.

#  define MC_CVSID(Id) static const char mc_cvsid[] = Id
#  define MC_CVSID(Id) typedef int mc_cvsid_dummy_type


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]