headers: include-what-you-use fixes

Usage of includes are set up the way found to be in use, with a help of
magnificent utility.

http://code.google.com/p/include-what-you-use/

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
Sami Kerola 2011-06-08 20:59:56 +02:00
parent 4c9f177b2e
commit e299e7fce2
9 changed files with 25 additions and 48 deletions

View file

@ -15,12 +15,8 @@
** along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stddef.h>
#include <stdlib.h>
#include <stdio.h>
#include "dhcpd-pools.h"

View file

@ -20,9 +20,6 @@
#endif
#include <stdio.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#else /* Not STDC_HEADERS */
@ -33,12 +30,12 @@ extern char *malloc();
#else
#include <strings.h>
#endif
#include <getopt.h>
#include <errno.h>
#include <err.h>
#include <errno.h>
#include <getopt.h>
#include "dhcpd-pools.h"
#include "defaults.h"
#include "dhcpd-pools.h"
int main(int argc, char **argv)
{

View file

@ -19,16 +19,18 @@
# define DHCPD_POOLS_H 1
#include <config.h>
#include <stddef.h>
/* Feature test switches */
#define _POSIX_SOURCE 1
#define POSIXLY_CORRECT 1
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#else
extern void exit();
extern char *malloc();
#define EXIT_FAILURE 1
#define EXIT_SUCCESS 0
#endif /* STDC_HEADERS */
#ifndef HAVE_PROGRAM_INVOCATION_SHORT_NAME

View file

@ -19,10 +19,6 @@
#include <config.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#else /* Not STDC_HEADERS */
@ -37,20 +33,20 @@ extern char *malloc();
#include <strings.h>
#endif
#include <stdio.h>
#include <arpa/inet.h>
#include <assert.h>
#include <ctype.h>
#include <err.h>
#include <errno.h>
#include <fcntl.h>
#include <features.h>
#include <netinet/in.h>
#include <sys/socket.h>
#include <stddef.h>
#include <stdio.h>
#include <sys/stat.h>
#include <sys/types.h>
#ifndef _XOPEN_SOURCE
#define _XOPEN_SOURCE 600
#endif
#include <fcntl.h>
#include <errno.h>
#include <err.h>
#include <ctype.h>
#include <assert.h>
#include "dhcpd-pools.h"
#include "defaults.h"

View file

@ -26,9 +26,7 @@
# define _NO_PROTO
#endif
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <features.h>
#if !defined __STDC__ || !__STDC__
/* This is a separate conditional since some stdc systems
@ -38,8 +36,6 @@
# endif
#endif
#include <stdio.h>
/* Comment out all this code if we are using the GNU C Library, and are not
actually compiling the library itself. This code is part of the GNU C
Library, but also included in many other GNU distributions. Compiling

View file

@ -17,11 +17,7 @@
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "getopt.h"
#include <features.h>
#if !defined __STDC__ || !__STDC__
/* This is a separate conditional since some stdc systems
@ -31,8 +27,6 @@
#endif
#endif
#include <stdio.h>
/* Comment out all this code if we are using the GNU C Library, and are not
actually compiling the library itself. This code is part of the GNU C
Library, but also included in many other GNU distributions. Compiling

View file

@ -28,9 +28,9 @@
extern void exit();
extern char *malloc();
#endif /* STDC_HEADERS */
#include <errno.h>
#include <err.h>
#include <stdarg.h>
#include <errno.h>
#include <stddef.h>
#ifdef HAVE_STRING_H
#include <string.h>
#else

View file

@ -19,11 +19,11 @@
#include <config.h>
#endif
#include <stdio.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <err.h>
#include <netinet/in.h>
#include <stdio.h>
#include <stdlib.h>
#include "dhcpd-pools.h"

View file

@ -15,15 +15,11 @@
** along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <err.h>
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include "dhcpd-pools.h"