def guard_macro(src_fname):
    """Return the guard macro that should be used for the header file
       'src_fname'. This function takes paths relative to tor's src directory.
    """
    td = src_fname.replace(".", "_").replace("/", "_").upper()
    return "TOR_{}".format(td)