/* Return path to "%SystemRoot%/drivers/etc/<file>" (Win-NT+) or to "%Windir%/etc/<file>" (Win-9x/ME)  */
const char* etc_path(const char *file)
/* Return path to "%SystemRoot%/drivers/etc/<file>" (Win-NT+) or to "%Windir%/etc/<file>" (Win-9x/ME)  */
const char* etc_path(const char *file)
{
  BOOL win9x = is_win9x();
  const char *env = win9x ? getenv("WinDir") : getenv("SystemRoot");
  static char path[MAX_PATH];
  if (!env)
    return (file);
  if (win9x)
    snprintf (path, sizeof(path), "%s\\etc\\%s", env, file);
  else
    snprintf (path, sizeof(path), "%s\\system32\\drivers\\etc\\%s", env, file);
  return (path);
}