]> granicus.if.org Git - openssl/commit
Add legacy include guards to public header files
authorDr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
Fri, 27 Sep 2019 22:46:00 +0000 (00:46 +0200)
committerDr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
Sat, 28 Sep 2019 18:26:37 +0000 (20:26 +0200)
commitd86167ec7513265bbafaf5c13fa60bd7c23aa732
tree96b9b2a7a779ec6cf21e22b1b153e215275669e4
parentae4186b00487762f581b2276ba83e5214e0e7ee1
Add legacy include guards to public header files

For every public header file, the old include guard definition needs
to be added in addition to the new one

include/openssl/file.h:

    #ifndef OPENSSL_FILE_H
    # define OPENSSL_FILE_H
    # pragma once

    # include <openssl/macros.h>
    # if !OPENSSL_API_3
    #  define HEADER_FILE_H
    # endif
    ...

This is going to ensure that applications which use the old include guards
externally, for example like this

    #ifndef HEADER_FILE_H
    # include <openssl/file.h>
    #endif

will not fail to compile.

In addition to the legacy guard, the public header files also receive a
'# pragma once' directive.

Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/9333)
97 files changed:
include/openssl/aes.h
include/openssl/asn1.h
include/openssl/asn1err.h
include/openssl/asn1t.h
include/openssl/async.h
include/openssl/asyncerr.h
include/openssl/bio.h
include/openssl/bioerr.h
include/openssl/blowfish.h
include/openssl/bn.h
include/openssl/bnerr.h
include/openssl/buffer.h
include/openssl/buffererr.h
include/openssl/camellia.h
include/openssl/cast.h
include/openssl/cmac.h
include/openssl/cms.h
include/openssl/cmserr.h
include/openssl/comp.h
include/openssl/comperr.h
include/openssl/conf.h
include/openssl/conf_api.h
include/openssl/conferr.h
include/openssl/crypto.h
include/openssl/cryptoerr.h
include/openssl/ct.h
include/openssl/cterr.h
include/openssl/des.h
include/openssl/dh.h
include/openssl/dherr.h
include/openssl/dsa.h
include/openssl/dsaerr.h
include/openssl/dtls1.h
include/openssl/e_os2.h
include/openssl/ebcdic.h
include/openssl/ec.h
include/openssl/ecerr.h
include/openssl/engine.h
include/openssl/engineerr.h
include/openssl/err.h
include/openssl/evp.h
include/openssl/evperr.h
include/openssl/hmac.h
include/openssl/idea.h
include/openssl/kdf.h
include/openssl/lhash.h
include/openssl/md2.h
include/openssl/md4.h
include/openssl/md5.h
include/openssl/mdc2.h
include/openssl/modes.h
include/openssl/objects.h
include/openssl/objectserr.h
include/openssl/ocsp.h
include/openssl/ocsperr.h
include/openssl/opensslv.h
include/openssl/pem.h
include/openssl/pem2.h
include/openssl/pemerr.h
include/openssl/pkcs12.h
include/openssl/pkcs12err.h
include/openssl/pkcs7.h
include/openssl/pkcs7err.h
include/openssl/rand.h
include/openssl/rand_drbg.h
include/openssl/randerr.h
include/openssl/rc2.h
include/openssl/rc4.h
include/openssl/rc5.h
include/openssl/ripemd.h
include/openssl/rsa.h
include/openssl/rsaerr.h
include/openssl/safestack.h
include/openssl/seed.h
include/openssl/sha.h
include/openssl/srp.h
include/openssl/srtp.h
include/openssl/ssl.h
include/openssl/ssl2.h
include/openssl/ssl3.h
include/openssl/sslerr.h
include/openssl/stack.h
include/openssl/store.h
include/openssl/storeerr.h
include/openssl/symhacks.h
include/openssl/tls1.h
include/openssl/ts.h
include/openssl/tserr.h
include/openssl/txt_db.h
include/openssl/ui.h
include/openssl/uierr.h
include/openssl/whrlpool.h
include/openssl/x509.h
include/openssl/x509_vfy.h
include/openssl/x509err.h
include/openssl/x509v3.h
include/openssl/x509v3err.h