)]}'
{
  "commit": "eab9dbbdd1f102dc1a26549a77fcc5c167385cd5",
  "tree": "d56f6ec8748baecf686526fa4e0c198c4b28fc50",
  "parents": [
    "4e720f12fade8d433e5a0eb3ead9017193dac6e7"
  ],
  "author": {
    "name": "Nathan Sidwell",
    "email": "nathan@acm.org",
    "time": "Mon Apr 25 10:50:36 2022 -0700"
  },
  "committer": {
    "name": "Pauli",
    "email": "pauli@openssl.org",
    "time": "Mon May 09 10:04:58 2022 +1000"
  },
  "message": "Header file cleanup for C++20 header-units\n\nC++20 adds \u0027header units\u0027 as a stepping-stone to modules.  Header\nunits are regular header-files that have a \u0027self-contained\u0027 property\n-- they do not require previously-included headers to provide typedefs\nand what not.\n\nThis addresses 2 problems discovered when using clang modules (as a\nproxy for C++20 header-units).\n\na) Some headers that pay attention to OPENSSL_NO_STDIO to determine\nwhether to declare certain FILE*-taking functions do not #include\n\u003cstdio.h\u003e themselves, relying on their includer already having done\nthat.  That breaks the above mentioned encapuslation requirement.\nFixed by conditionally including stdio.h in those headers.  I chose to\nalways include stdio.h in such headers, even when they included\nanother such header that transitively included stdio.  That way they\ndo not rely on an artifact of that intermediate header\u0027s behaviour.\n\nb) Some headers have #includes inside \u0027extern \"C\" { ... }\u0027 regions.\nThat has a bad code-smell, but GCC and clang have extensions to permit\nit with implementation-defined effects.  Clang needs annotation on the\nincluded files to know that they themselves are entirely inside a\nsimilar region.  GCC behavesq as-if there\u0027s an extern \"C++\" region\nwrapping the included header (which must therefore wrap its contents\nin extern \"C\", if that is what it wants.  In effect the includer\u0027s\nextern \"C\" region is just misleading. I didn\u0027t audit all the headers\nfor this, only those I noticed when addressing #a.\n\n\\#a is necessary to build the headers as a set of clang-modules.  #b\nis not necessary, but as I mentioned, avoids potentially\nimplementation-defined behaviour.\n\nReviewed-by: Todd Short \u003ctodd.short@me.com\u003e\nReviewed-by: Paul Dale \u003cpauli@openssl.org\u003e\n(Merged from https://github.com/openssl/openssl/pull/18221)\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "6d5094a3ff7d3482d0e033425539e966ef18be12",
      "old_mode": 33188,
      "old_path": "include/openssl/asn1.h.in",
      "new_id": "550e0c2c25de06508cb9daa5e6270adc7993a77e",
      "new_mode": 33188,
      "new_path": "include/openssl/asn1.h.in"
    },
    {
      "type": "modify",
      "old_id": "b0bd579aa48910a213cc007a909eced956bc4f2c",
      "old_mode": 33188,
      "old_path": "include/openssl/conf.h.in",
      "new_id": "5663287089c9eca1afc7b902caa0cacb51211a1f",
      "new_mode": 33188,
      "new_path": "include/openssl/conf.h.in"
    },
    {
      "type": "modify",
      "old_id": "b97871eca7faa56cd33c1ff757f18fb758d90eec",
      "old_mode": 33188,
      "old_path": "include/openssl/dh.h",
      "new_id": "2c6219e7c2a6bc1e2ab8b822211efe9325a2287f",
      "new_mode": 33188,
      "new_path": "include/openssl/dh.h"
    },
    {
      "type": "modify",
      "old_id": "5c0e4cddfa8e572756a66c7184fa950ff07af610",
      "old_mode": 33188,
      "old_path": "include/openssl/dsa.h",
      "new_id": "109878e68863e9cd580386ddf19354c46288d699",
      "new_mode": 33188,
      "new_path": "include/openssl/dsa.h"
    },
    {
      "type": "modify",
      "old_id": "44d71932db631edb69f963e7d88c7d11ae262191",
      "old_mode": 33188,
      "old_path": "include/openssl/ec.h",
      "new_id": "be9fb2f08923e645bd78df94604b3ad389ac40ae",
      "new_mode": 33188,
      "new_path": "include/openssl/ec.h"
    },
    {
      "type": "modify",
      "old_id": "febefa3c4ac6d84b08a70adc50072a1f36aa83d0",
      "old_mode": 33188,
      "old_path": "include/openssl/lhash.h.in",
      "new_id": "e9bb2590a07c2c5261c8ed5fb92b3b7a007cf5e4",
      "new_mode": 33188,
      "new_path": "include/openssl/lhash.h.in"
    },
    {
      "type": "modify",
      "old_id": "80940dfa969b262ad63d3b2546619c19c6d092c2",
      "old_mode": 33188,
      "old_path": "include/openssl/pem.h",
      "new_id": "ed50f081fa21ee919e60c873603ac1b48b2c80d0",
      "new_mode": 33188,
      "new_path": "include/openssl/pem.h"
    },
    {
      "type": "modify",
      "old_id": "c98eebfb39887538c7d93a7bac2d3e3300bd6221",
      "old_mode": 33188,
      "old_path": "include/openssl/pkcs12.h.in",
      "new_id": "2f95dafd5efd0440ea18f17a5d3ff416ad1a4ed3",
      "new_mode": 33188,
      "new_path": "include/openssl/pkcs12.h.in"
    },
    {
      "type": "modify",
      "old_id": "f5c55a3fbe57610f4ef301bcd989d3dc433c126e",
      "old_mode": 33188,
      "old_path": "include/openssl/pkcs7.h.in",
      "new_id": "a6d1752491d3e1a461ed3fd78a1a948c61e581c8",
      "new_mode": 33188,
      "new_path": "include/openssl/pkcs7.h.in"
    },
    {
      "type": "modify",
      "old_id": "a55c9727c6b9b87b27f79ec16ef008d0c6f884f3",
      "old_mode": 33188,
      "old_path": "include/openssl/rsa.h",
      "new_id": "fa300d02612707405767992c0c2cbceade4c97d1",
      "new_mode": 33188,
      "new_path": "include/openssl/rsa.h"
    },
    {
      "type": "modify",
      "old_id": "84a5760ef78960b28d1c3f62ca380a0ec50e2dfa",
      "old_mode": 33188,
      "old_path": "include/openssl/ssl.h.in",
      "new_id": "0c062ded3edf082d83011b60ba14b83d06a8c19d",
      "new_mode": 33188,
      "new_path": "include/openssl/ssl.h.in"
    },
    {
      "type": "modify",
      "old_id": "5136e4e974af431b5a34c95d86fd59b3d57dfed7",
      "old_mode": 33188,
      "old_path": "include/openssl/ts.h",
      "new_id": "b09b646dffe1f3e453ee54779690c8243803e708",
      "new_mode": 33188,
      "new_path": "include/openssl/ts.h"
    },
    {
      "type": "modify",
      "old_id": "56b8829ca12043d922b13096ae34d637734d77d3",
      "old_mode": 33188,
      "old_path": "include/openssl/x509.h.in",
      "new_id": "0a94303ed94725d61108fb8172eb8f79c205a74e",
      "new_mode": 33188,
      "new_path": "include/openssl/x509.h.in"
    },
    {
      "type": "modify",
      "old_id": "d00a66a343010afdb3b583c27fe697b80874e6ea",
      "old_mode": 33188,
      "old_path": "include/openssl/x509v3.h.in",
      "new_id": "7d7e4718b6db2bcbcfe523ed068b87b43755d304",
      "new_mode": 33188,
      "new_path": "include/openssl/x509v3.h.in"
    }
  ]
}
