Your code makes an assumptation that int is 32bit. If you can live with this assumptation, then:
#define mkid(a,b,c,d) ((a)<<24 | (b)<<16 | (c)<<8 | (d))
enum
{
JOHN_NAME = mkid('j','o','h','n'),
FRED_NAME = mkid('f','r','e','d'),
...
};
However, one can wonder if this makes any sense at all. Why not just have indexes from 0...n instead?
You can have the names as strings in another indexed table.