X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/blobdiff_plain/bb6ae3fb80fff36cd342d6f6bff3dfabd7dd243e..cc3456940b6b30a0fc4f83226c34e4e873336cd0:/lib/hostname.c diff --git a/lib/hostname.c b/lib/hostname.c index 536bb8e..b7318e1 100644 --- a/lib/hostname.c +++ b/lib/hostname.c @@ -2,24 +2,24 @@ * This file is part of DisOrder * Copyright (C) 2007 Richard Kettlewell * - * This program is free software; you can redistribute it and/or modify + * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or + * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA + * along with this program. If not, see . + */ +/** @file lib/hostname.c + * @brief Get the local hostname */ -#include -#include "types.h" +#include "common.h" #include #include @@ -40,9 +40,9 @@ const char *local_hostname(void) { struct hostent *he; if(uname(&u) < 0) - fatal(errno, "error calling uname"); + disorder_fatal(errno, "error calling uname"); if(!(he = gethostbyname(u.nodename))) - fatal(0, "cannot resolve '%s'", u.nodename); + disorder_fatal(0, "cannot resolve '%s'", u.nodename); hostname = xstrdup(he->h_name); } return hostname;