)]}'
{
  "commit": "340aa4f6872ca3c4f7fc4a79671537064d0ca91f",
  "tree": "d8aa6b70aeb4d0fd3856d55132ff925d8cf7270f",
  "parents": [
    "96894c19ad2b91db76b9b606d48c56ad354b4801"
  ],
  "author": {
    "name": "Tsukasa OI",
    "email": "research_trasio@irq.a4lg.com",
    "time": "Thu Oct 06 06:43:52 2022 +0000"
  },
  "committer": {
    "name": "Andrew Burgess",
    "email": "aburgess@redhat.com",
    "time": "Tue Oct 11 15:18:14 2022 +0100"
  },
  "message": "sim: Check known getopt definition existence\n\nClang generates a warning if there is a function declaration/definition\nwith zero arguments.  Such declarations/definitions without a prototype (an\nargument list) are deprecated forms of indefinite arguments\n(\"-Wdeprecated-non-prototype\").  On the default configuration, it causes a\nbuild failure (unless \"--disable-werror\" is specified).\n\ninclude/getopt.h defines some getopt function definitions but one of them\nhas a form \"extern int getopt ();\".  If this form is selected in\ninclude/getopt.h, Clang generates a warning and the build fails by default.\n\nIn really old environments, this getopt definition with no arguments is\nnecessary (because the definition may change between environments).\nHowever, this definition is now a cause of problems on modern environments.\n\nA good news is, this definition is not always selected (e.g. if used by\nbinutils/*.c).  This is because configuration scripts of binutils, gas,\ngprof and ld tries to find known definition of getopt function is used and\ndefines HAVE_DECL_GETOPT macro.  If this macro is defined when getopt.h is\nincluded, a good form of getopt is used and Clang won\u0027t generate warnings.\n\nThis commit adds a modified portion of ld/configure.ac to find the known\ngetopt definition.  If we could find one (and we *will* in most modern\nenvironments), we don\u0027t need to rely on the deprecated definition.\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "84c363c0aecee5bbda6e08794d50000b748214a6",
      "old_mode": 33188,
      "old_path": "sim/config.h.in",
      "new_id": "9a94b289e4679e87e83e84d03b779b5860d5efe3",
      "new_mode": 33188,
      "new_path": "sim/config.h.in"
    },
    {
      "type": "modify",
      "old_id": "75d1935df38a1cb618044051dada8e9a603c818d",
      "old_mode": 33261,
      "old_path": "sim/configure",
      "new_id": "dac7f085be17481aba3c7faf4d71485ae6145a0f",
      "new_mode": 33261,
      "new_path": "sim/configure"
    },
    {
      "type": "modify",
      "old_id": "66a1020efe008a54ae92a3bea71f625569931880",
      "old_mode": 33188,
      "old_path": "sim/configure.ac",
      "new_id": "be0cfdbea32169a60834e6f42e70b5a7d5f53030",
      "new_mode": 33188,
      "new_path": "sim/configure.ac"
    }
  ]
}
