]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Always include afsconfig.h
authorSimon Wilkinson <sxw@inf.ed.ac.uk>
Thu, 6 May 2010 13:55:59 +0000 (14:55 +0100)
committerDerrick Brashear <shadow@dementia.org>
Thu, 6 May 2010 18:52:08 +0000 (11:52 -0700)
Our coding standards say that OpenAFS source files should always have
 #include <afsconfig.h>
 #include <afs/param.h>
at the start of the file. Including just param.h, or having these
includes in a different order can produce unexpected effects, because
param.h includes sysnames.h, which in turn includes stds.h, which may
rely upon having the results of configure tests available.

Fix the obvious places in the Unix build which get this wrong.

Change-Id: I081f04dab30a6bbb49fe71d3ac2d7c11e231e2f5
Reviewed-on: http://gerrit.openafs.org/1912
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 files changed:
src/JAVA/libjafs/ACL.c
src/JAVA/libjafs/FileOutputStream.c
src/JAVA/libjafs/UserToken.c
src/butc/afsxbsa.c
src/rxkad/fc_test.c
src/rxstat/rxstat.c
src/tests/afscp.c
src/tests/afscp_callback.c
src/tests/afsdump_extract.c
src/tests/afsdump_scan.c
src/tests/dumptool.c
src/tests/write-closed2.c
src/util/fstab.c
src/vol/namei_map.c

index e60166e8b3b36e4bb130b25e5dd04785bad97984..204b7436949bae808ac6a2a04bcd1d96dfa120d7 100644 (file)
@@ -19,6 +19,7 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include <afsconfig.h>
 #include <afs/param.h>
 #include <afs/stds.h>
 #include <errno.h>
index e728da1c960ef64e97e58acf5f6b98a097217205..76aceda8ed336811e73db24aa1761eaeb7490ce7 100644 (file)
@@ -19,6 +19,7 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include <afsconfig.h>
 #include <afs/param.h>
 #include <errno.h>
 
index 1fa5b48d97c5c4b8f8af6d6c1e476e05d66e0474..051250185766730a03f30168a04d608635bcce95 100644 (file)
@@ -19,6 +19,7 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include <afsconfig.h>
 #include <afs/param.h>
 
 #include "Internal.h"
index 1add50844da20abf9dc3b8d6de6218ee9cd553cf..77920f490cc1db3055024c7ef1ed6bd7367cbed4 100644 (file)
@@ -9,7 +9,9 @@
 
 #ifdef xbsa
 
+#include <afsconfig.h>
 #include <afs/param.h>
+
 #include <sys/types.h>
 #include <afs/stds.h>
 #include <stdio.h>
index 28cc589ee9ccfd874cf6304b93e4a53070cf767b..b80e08078973cc632e13e5552873cb69b5c0af88 100644 (file)
@@ -31,6 +31,7 @@
  * SUCH DAMAGE.
  */
 
+#include <afsconfig.h>
 #include <afs/param.h>
 #include "rxkad.h"
 #include <rx/rx.h>
index bfb789823dec610fcba0c7f0b218ebcf5951ab35..4d3801fb22bf24ef4c79d4718e76a20e268dbba7 100644 (file)
@@ -7,8 +7,8 @@
  * directory or online at http://www.openafs.org/dl/license10.html
  */
 
-#include <afs/param.h>
 #include <afsconfig.h>
+#include <afs/param.h>
 
 
 #include <afs/stds.h>
index 717e705f0d0e1fb149d317c0cc29b7c1c9b7e7d0..da858d59f9d8f671265a0d8716974694b643f0de 100644 (file)
@@ -1,3 +1,6 @@
+#include <afsconfig.h>
+#include <afs/param.h>
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -11,7 +14,6 @@
 #include <sys/stat.h>
 #include <netdb.h>
 
-#include <afs/param.h>
 #include <afs/afsint.h>
 #define FSINT_COMMON_XG 1
 #include <afs/afscbint.h>
index 4a9afa0f98c925a52263a09073ad391facf8690e..e590a265793c2965788936f09c0a98a66073fda5 100644 (file)
@@ -1,4 +1,6 @@
+#include <afsconfig.h>
 #include <afs/param.h>
+
 #include <afs/afscbint.h>      /*Callback interface defs */
 #include <afs/afsutil.h>
 #include <afs/afsutil_prototypes.h>
index 9558775fc4ce878ca0cebfc7526bf230d50de9ca..b1ecbb9d2028df5a115fb25e864f4594cf3f9818 100644 (file)
@@ -28,6 +28,9 @@
 
 /* afsdump_extract.c - Extract files from an AFS dump */
 
+#include <afsconfig.h>
+#include <afs/param.h>
+
 #include <sys/fcntl.h>
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -35,7 +38,6 @@
 #include <stdarg.h>
 #include <string.h>
 
-#include <afs/param.h>
 #include <afs/com_err.h>
 #include "dumpscan.h"
 #include "dumpscan_errs.h"
index 0e4221189c1a0de7eefb46647d4d6664e6f216b7..98f1a49c8443ecfa47855c6401a8da38eaf59490 100644 (file)
 
 /* afsdump_scan.c - General-purpose dump scanner */
 
+#include <afsconfig.h>
+#include <afs/param.h>
+
 #include <sys/fcntl.h>
 #include <stdlib.h>
 #include <stdarg.h>
 #include <string.h>
 
-#include <afs/param.h>
 #include <afs/com_err.h>
 #include <afs/pterror.h>
 #include <afs/vlserver.h>
index decf80bcbbcac4676ae1e42015845a2e299a7764..fee670ef363e880f3a409708fae164fc90990429 100644 (file)
@@ -61,6 +61,9 @@
  * so directories will appear first in the VNODE section.
  */
 
+#include <afsconfig.h>
+#include <afs/param.h>
+
 #include <stdio.h>
 #include <sys/types.h>
 #include <sys/param.h>
@@ -74,7 +77,6 @@
 #include <fcntl.h>
 
 #include <lock.h>
-#include <afs/param.h>
 #include <afs/afsint.h>
 #include <afs/nfs.h>
 #include <afs/acl.h>
index 22e147f7a74460fbb7adcfd3d2647bdebbb48feb..a812ff3ebda5e6d5ff7ab3786f21ed77a36972f8 100644 (file)
@@ -31,6 +31,9 @@
  * SUCH DAMAGE.
  */
 
+#include <afsconfig.h>
+#include <afs/param.h>
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
@@ -53,7 +56,6 @@
 
 #include <err.h>
 #include <netinet/in.h>
-#include <afs/param.h>
 #include <afs/stds.h>
 #include <afs/vice.h>
 #include <afs/venus.h>
index 50d0740cbeaa3d93bb14acce534c7d1b06e415ac..cb289e37967711d038c627988c59d1d7ae4804c0 100644 (file)
@@ -27,6 +27,7 @@
  * SUCH DAMAGE.
  */
 
+#include <afsconfig.h>
 #include <afs/param.h>
 
 #if defined(AFS_DARWIN_ENV)
index 8b24c6f8f26b91ed1b53a1862690d022d3f60c9d..e93b7f4686e6649a896ff73ff1c16d2c44779477 100644 (file)
@@ -1,8 +1,10 @@
+#include <afsconfig.h>
+#include <afs/param.h>
+
 #include <sys/types.h>
 #include <inttypes.h>
 #include <stdio.h>
 #include <stdlib.h>
-#include <afs/param.h>
 #include <afs/afsutil.h>
 
 int main(int argc, char **argv) {