summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorDr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>2019-09-27 23:58:12 +0200
committerDr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>2019-09-27 23:58:12 +0200
commitea21f6f88e4699d231f7ef51eb774f343b39d6ab (patch)
treee6614c40b0457ee53da7bc3ace5b69e87c9bacf6 /util
parentfbbfd128c9aa884216ace8c63be9071b3b690bee (diff)
Add util/fix-includes script
This script contains all adjustments to header files which were made during the reorganization of the header files. It is meant as an aid for other contributors which encounter preprocessor #include errors after rebasing over this pull request. Simply running util/fix-includes from the root of the source directory should hopefully fix the problem. Note: such #include errors are expected only for pull requests which add a lot of new code, in particular new compilation modules. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9681)
Diffstat (limited to 'util')
-rwxr-xr-xutil/fix-includes19
-rw-r--r--util/fix-includes.sed5
2 files changed, 24 insertions, 0 deletions
diff --git a/util/fix-includes b/util/fix-includes
new file mode 100755
index 0000000000..c49163875b
--- /dev/null
+++ b/util/fix-includes
@@ -0,0 +1,19 @@
+#!/bin/sh
+#
+# Copyright 2019 The OpenSSL Project Authors. All Rights Reserved.
+#
+# Licensed under the Apache License 2.0 (the "License"). You may not use
+# this file except in compliance with the License. You can obtain a copy
+# in the file LICENSE in the source distribution or at
+# https://www.openssl.org/source/license.html
+
+find -name ossl_typ.h -o \( \
+ -name '*.h' -o \
+ -name '*.h.in' -o \
+ -name '*.c' -o \
+ -name '*.ec' -o \
+ -name 'README*' -o \
+ -name '*.pod' -o \
+ -name '*.conf' \
+ \) -exec sed -E -i \
+ -f util/fix-includes.sed {} \;
diff --git a/util/fix-includes.sed b/util/fix-includes.sed
new file mode 100644
index 0000000000..fb0d652875
--- /dev/null
+++ b/util/fix-includes.sed
@@ -0,0 +1,5 @@
+s|internal/([a-z0-9_]+)_int\.h|crypto/\1.h|g ;
+s@internal/(aria.h|async.h|bn_conf.h|bn_dh.h|bn_srp.h|chacha.h|ctype.h|__DECC_INCLUDE_EPILOGUE.H|__DECC_INCLUDE_PROLOGUE.H|dso_conf.h|engine.h|lhash.h|md32_common.h|objects.h|poly1305.h|sha.h|siphash.h|sm2err.h|sm2.h|sm3.h|sm4.h|store.h|foobar)@crypto/\1@g ;
+s/constant_time_locl/constant_time/g ;
+s/_lo?cl\.h/_local.h/g ;
+s/_int\.h/_local.h/g ;