summaryrefslogtreecommitdiffstats
path: root/src/clients
diff options
context:
space:
mode:
authorGreg Hudson <ghudson@mit.edu>2014-07-05 11:50:58 -0400
committerGreg Hudson <ghudson@mit.edu>2014-07-08 19:19:24 -0400
commit02a1123cf44381690c28f18ab2c4ba8036200539 (patch)
tree821ad7e29d2f90227b6f12dc63aaae948baa2447 /src/clients
parent6a8da91b691b8f51ac62d8142cd2fa32a69f3d15 (diff)
downloadkrb5-02a1123cf44381690c28f18ab2c4ba8036200539.tar.gz
krb5-02a1123cf44381690c28f18ab2c4ba8036200539.tar.xz
krb5-02a1123cf44381690c28f18ab2c4ba8036200539.zip
Include autoconf.h before system headers
Include autoconf.h (either directly or via proxy) before system headers, so that feature test macros defined there can affect the system namespace. Where include order was changed, eliminate some redundant or unnecessary includes. ticket: 7961
Diffstat (limited to 'src/clients')
-rw-r--r--src/clients/kpasswd/kpasswd.c3
-rw-r--r--src/clients/kpasswd/ksetpwd.c4
-rw-r--r--src/clients/ksu/setenv.c2
-rw-r--r--src/clients/ksu/xmalloc.c3
-rw-r--r--src/clients/kswitch/kswitch.c2
-rw-r--r--src/clients/kvno/kvno.c4
6 files changed, 6 insertions, 12 deletions
diff --git a/src/clients/kpasswd/kpasswd.c b/src/clients/kpasswd/kpasswd.c
index 9f4952bb8..efc596edf 100644
--- a/src/clients/kpasswd/kpasswd.c
+++ b/src/clients/kpasswd/kpasswd.c
@@ -1,8 +1,7 @@
/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
+#include "k5-platform.h"
#include <locale.h>
-#include <stdio.h>
#include <sys/types.h>
-#include "k5-platform.h"
#ifndef _WIN32
#include <unistd.h>
diff --git a/src/clients/kpasswd/ksetpwd.c b/src/clients/kpasswd/ksetpwd.c
index 971990506..5f9c98261 100644
--- a/src/clients/kpasswd/ksetpwd.c
+++ b/src/clients/kpasswd/ksetpwd.c
@@ -1,10 +1,8 @@
/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
+#include <k5-platform.h>
#include <krb5.h>
-#include <string.h>
#include <unistd.h>
-#include <stdio.h>
#include <time.h>
-#include <k5-platform.h>
#define TKTTIMELEFT 60*10 /* ten minutes */
diff --git a/src/clients/ksu/setenv.c b/src/clients/ksu/setenv.c
index 33ac1e303..a7895c6b4 100644
--- a/src/clients/ksu/setenv.c
+++ b/src/clients/ksu/setenv.c
@@ -34,11 +34,11 @@
/* based on @(#)setenv.c 5.2 (Berkeley) 6/27/88 */
+#include "autoconf.h"
#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include "autoconf.h"
static char *_findenv(char *, int *);
diff --git a/src/clients/ksu/xmalloc.c b/src/clients/ksu/xmalloc.c
index 9e3e98db2..430a6b3bf 100644
--- a/src/clients/ksu/xmalloc.c
+++ b/src/clients/ksu/xmalloc.c
@@ -24,9 +24,8 @@
* or implied warranty.
*/
-#include "ksu.h"
-#include <stdarg.h>
#include "k5-platform.h"
+#include "ksu.h"
void *xmalloc (size_t sz)
{
diff --git a/src/clients/kswitch/kswitch.c b/src/clients/kswitch/kswitch.c
index b64947972..6ad470b09 100644
--- a/src/clients/kswitch/kswitch.c
+++ b/src/clients/kswitch/kswitch.c
@@ -24,8 +24,8 @@
* or implied warranty.
*/
-#include <locale.h>
#include "k5-int.h"
+#include <locale.h>
extern int optind;
extern char *optarg;
diff --git a/src/clients/kvno/kvno.c b/src/clients/kvno/kvno.c
index 134accbd7..377d4f345 100644
--- a/src/clients/kvno/kvno.c
+++ b/src/clients/kvno/kvno.c
@@ -25,10 +25,8 @@
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
-#include <locale.h>
-#include <stdio.h>
-#include <stdlib.h>
#include "k5-platform.h"
+#include <locale.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif