get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/138438/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 138438,
    "url": "http://patchwork.dpdk.org/api/patches/138438/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20240317153413.5780-1-stephen@networkplumber.org/",
    "project": {
        "id": 1,
        "url": "http://patchwork.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20240317153413.5780-1-stephen@networkplumber.org>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20240317153413.5780-1-stephen@networkplumber.org",
    "date": "2024-03-17T15:33:59",
    "name": "[v2] windows: make getopt functions have const properties",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "408a4113f97b57b4e939b1445cbf4bd13c876fed",
    "submitter": {
        "id": 27,
        "url": "http://patchwork.dpdk.org/api/people/27/?format=api",
        "name": "Stephen Hemminger",
        "email": "stephen@networkplumber.org"
    },
    "delegate": {
        "id": 1,
        "url": "http://patchwork.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20240317153413.5780-1-stephen@networkplumber.org/mbox/",
    "series": [
        {
            "id": 31538,
            "url": "http://patchwork.dpdk.org/api/series/31538/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=31538",
            "date": "2024-03-17T15:33:59",
            "name": "[v2] windows: make getopt functions have const properties",
            "version": 2,
            "mbox": "http://patchwork.dpdk.org/series/31538/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/138438/comments/",
    "check": "warning",
    "checks": "http://patchwork.dpdk.org/api/patches/138438/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id B56D743CDB;\n\tSun, 17 Mar 2024 16:34:26 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 411004026F;\n\tSun, 17 Mar 2024 16:34:26 +0100 (CET)",
            "from mail-pg1-f178.google.com (mail-pg1-f178.google.com\n [209.85.215.178])\n by mails.dpdk.org (Postfix) with ESMTP id 763E540262\n for <dev@dpdk.org>; Sun, 17 Mar 2024 16:34:24 +0100 (CET)",
            "by mail-pg1-f178.google.com with SMTP id\n 41be03b00d2f7-5d3907ff128so2766101a12.3\n for <dev@dpdk.org>; Sun, 17 Mar 2024 08:34:24 -0700 (PDT)",
            "from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141])\n by smtp.gmail.com with ESMTPSA id\n h5-20020a170902f54500b001e009717560sm364089plf.232.2024.03.17.08.34.22\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Sun, 17 Mar 2024 08:34:22 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1710689663;\n x=1711294463; darn=dpdk.org;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=MxTYZpMXUfqtuNgTJbwrIqu/ZFVDcUewbND1CRpyEKY=;\n b=xYojKgUK7AC7XeW5o6iBa24tdRC64Yx+YuOPk80x6RnAcepmtU1ZYHerA4sjHQgvZ4\n FvTJCl0J6MztI/oRTH4wDTQAoy9DtCg33ZBYY8yLWYD5bP64WlOAXKLpOvnHKFW586Ir\n JnYBYTNG1xvk7GJQSYKoREZvCj439WgY4nuHNQ6oJO0dTCAowA1w3t0QYyMR2I+lhQMC\n gsRiBBrY+CBwTjk/OVUC/bZoese2s8Uc0oZsSCEmvPPfcKJbXa2kaXMOYqLtwewQRcIv\n ZlGnlvxmuNRdn9Pjqo9dNQWe7M2S1Dkyvff5gii2xhWpq2lz/FNGPVoKr537J3P/6q9f\n jcFA==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1710689663; x=1711294463;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n :subject:date:message-id:reply-to;\n bh=MxTYZpMXUfqtuNgTJbwrIqu/ZFVDcUewbND1CRpyEKY=;\n b=iCOgzPzTJL1HEo0lpsZTAlZtwzKYkBXlsqFWSFIPe8QFiyVGYXhZfoBm5tZmNfl05W\n gSWuHtw1yd+qWsHeQ2VPw4F4tkhWoIlCBWyhAKxIGpw8WP8hPJsHmSAAXz32zWWbqDs4\n 0CUtrPHOLHBtPeI02LZQL1RzCPngut8+g1VI0zAjijqchwB+Lt04lslJrE02O7fDMKdW\n 3zHs1468GD3f41ZZu5g/cO0I5IO8PT0KRn5R1VMXkPXJOku2v9lEZc87qWUdIr7+vHtd\n RAkv212P+oQPi2pg5gyc74Bc3CJCexEQlcnZbvpdEqMXSgsEBjIJpZK4TN98zSWMthi0\n Sqbw==",
        "X-Gm-Message-State": "AOJu0Yyd/M5CBZkTjFNzOGC/gveOkQ2+LAZKGD9L5d4peVwM/jtD25G2\n OR54tR90wKlQ+QA3Sq5mkyE+ZkFR9LrDx2ZKLsS9AvRHKE6w3bOgm/7o7S6EJocFkubO6QyZtKT\n 5xtU=",
        "X-Google-Smtp-Source": "\n AGHT+IGV44zpieBqHJccz/5QLBwIvEDT6MS5ZJRMHclsZarmFz5yRiHiuF/bpZ1qyY+Nle5UX6dvmg==",
        "X-Received": "by 2002:a17:902:ce0f:b0:1e0:115c:e05d with SMTP id\n k15-20020a170902ce0f00b001e0115ce05dmr2693562plg.9.1710689663375;\n Sun, 17 Mar 2024 08:34:23 -0700 (PDT)",
        "From": "Stephen Hemminger <stephen@networkplumber.org>",
        "To": "dev@dpdk.org",
        "Cc": "Stephen Hemminger <stephen@networkplumber.org>,\n Tyler Retzlaff <roretzla@linux.microsoft.com>,\n Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>,\n Pallavi Kadam <pallavi.kadam@intel.com>",
        "Subject": "[PATCH v2] windows: make getopt functions have const properties",
        "Date": "Sun, 17 Mar 2024 08:33:59 -0700",
        "Message-ID": "<20240317153413.5780-1-stephen@networkplumber.org>",
        "X-Mailer": "git-send-email 2.43.0",
        "In-Reply-To": "<20240315151407.7517-1-stephen@networkplumber.org>",
        "References": "<20240315151407.7517-1-stephen@networkplumber.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org"
    },
    "content": "Having different prototypes on different platforms can lead\nto lots of unnecessary workarounds.  Looks like the version of\ngetopt used from windows was based on an older out of date\nversion from FreeBSD.\n\nThis patch changes getopt, getopt_long, etc to have the same const\nattributes as Linux and FreeBSD. The changes are derived from\nthe current FreeBSD version of getopt_long.\n\nSigned-off-by: Stephen Hemminger <stephen@networkplumber.org>\nAcked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>\nAcked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>\n---\nv2 - remove orig file\n\n lib/eal/windows/getopt.c         | 23 ++++++++++++-----------\n lib/eal/windows/include/getopt.h |  8 ++++----\n 2 files changed, 16 insertions(+), 15 deletions(-)",
    "diff": "diff --git a/lib/eal/windows/getopt.c b/lib/eal/windows/getopt.c\nindex a1f51c6c2318..50ff71b9300d 100644\n--- a/lib/eal/windows/getopt.c\n+++ b/lib/eal/windows/getopt.c\n@@ -20,7 +20,7 @@\n #include <string.h>\n #include <stdlib.h>\n \n-const char    *optarg;\t\t/* argument associated with option */\n+char    *optarg;\t\t/* argument associated with option */\n int\topterr = 1;\t\t/* if error message should be printed */\n int\toptind = 1;\t\t/* index into parent argv vector */\n int\toptopt = '?';\t\t/* character checked for validity */\n@@ -39,9 +39,9 @@ static void pass(const char *a) {(void) a; }\n #define\tBADARG\t\t((*options == ':') ? (int)':' : (int)'?')\n #define\tINORDER\t\t1\n \n-#define\tEMSG\t\t\"\"\n+static char EMSG[] = \"\";\n \n-static const char *place = EMSG; /* option letter processing */\n+static char *place = EMSG; /* option letter processing */\n \n /* XXX: set optreset to 1 rather than these two */\n static int nonopt_start = -1; /* first non option argument (for permute) */\n@@ -80,7 +80,7 @@ gcd(int a, int b)\n  */\n static void\n permute_args(int panonopt_start, int panonopt_end, int opt_end,\n-\tchar **nargv)\n+\tchar * const *nargv)\n {\n \tint cstart, cyclelen, i, j, ncycle, nnonopts, nopts, pos;\n \tchar *swap;\n@@ -101,11 +101,12 @@ permute_args(int panonopt_start, int panonopt_end, int opt_end,\n \t\t\t\tpos -= nnonopts;\n \t\t\telse\n \t\t\t\tpos += nopts;\n+\n \t\t\tswap = nargv[pos];\n \t\t\t/* LINTED const cast */\n-\t\t\t((char **) nargv)[pos] = nargv[cstart];\n+\t\t\t((char **)(uintptr_t)nargv)[pos] = nargv[cstart];\n \t\t\t/* LINTED const cast */\n-\t\t\t((char **)nargv)[cstart] = swap;\n+\t\t\t((char **)(uintptr_t)nargv)[cstart] = swap;\n \t\t}\n \t}\n }\n@@ -116,7 +117,7 @@ permute_args(int panonopt_start, int panonopt_end, int opt_end,\n  * Returns -1 if short_too is set and the option does not match long_options.\n  */\n static int\n-parse_long_options(char **nargv, const char *options,\n+parse_long_options(char * const *nargv, const char *options,\n \tconst struct option *long_options, int *idx, int short_too)\n {\n \tconst char *current_argv;\n@@ -236,7 +237,7 @@ parse_long_options(char **nargv, const char *options,\n  *\tParse argc/argv argument vector.  Called by user level routines.\n  */\n static int\n-getopt_internal(int nargc, char **nargv, const char *options,\n+getopt_internal(int nargc, char *const nargv[], const char *options,\n \tconst struct option *long_options, int *idx, int flags)\n {\n \tchar *oli;\t\t\t\t/* option letter list index */\n@@ -434,7 +435,7 @@ getopt_internal(int nargc, char **nargv, const char *options,\n  *\tParse argc/argv argument vector.\n  */\n int\n-getopt(int nargc, char *nargv[], const char *options)\n+getopt(int nargc, char *const nargv[], const char *options)\n {\n \treturn getopt_internal(nargc, nargv, options, NULL, NULL,\n \t\t\t       FLAG_PERMUTE);\n@@ -445,7 +446,7 @@ getopt(int nargc, char *nargv[], const char *options)\n  *\tParse argc/argv argument vector.\n  */\n int\n-getopt_long(int nargc, char *nargv[], const char *options,\n+getopt_long(int nargc, char *const nargv[], const char *options,\n \tconst struct option *long_options, int *idx)\n {\n \n@@ -458,7 +459,7 @@ getopt_long(int nargc, char *nargv[], const char *options,\n  *\tParse argc/argv argument vector.\n  */\n int\n-getopt_long_only(int nargc, char *nargv[], const char *options,\n+getopt_long_only(int nargc, char *const nargv[], const char *options,\n \tconst struct option *long_options, int *idx)\n {\n \ndiff --git a/lib/eal/windows/include/getopt.h b/lib/eal/windows/include/getopt.h\nindex 6f57af454b17..e4cf6873cb0c 100644\n--- a/lib/eal/windows/include/getopt.h\n+++ b/lib/eal/windows/include/getopt.h\n@@ -44,7 +44,7 @@\n \n \n /** argument to current option, or NULL if it has none */\n-extern const char *optarg;\n+extern char *optarg;\n /** Current position in arg string.  Starts from 1.\n  * Setting to 0 resets state.\n  */\n@@ -80,14 +80,14 @@ struct option {\n };\n \n /** Compat: getopt */\n-int getopt(int argc, char *argv[], const char *options);\n+int getopt(int argc, char *const argv[], const char *options);\n \n /** Compat: getopt_long */\n-int getopt_long(int argc, char *argv[], const char *options,\n+int getopt_long(int argc, char *const argv[], const char *options,\n \t\tconst struct option *longopts, int *longindex);\n \n /** Compat: getopt_long_only */\n-int getopt_long_only(int nargc, char *argv[], const char *options,\n+int getopt_long_only(int nargc, char *const argv[], const char *options,\n \t\t     const struct option *long_options, int *idx);\n \n \n",
    "prefixes": [
        "v2"
    ]
}