get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 138667,
    "url": "http://patches.dpdk.org/api/patches/138667/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20240321161146.340421-2-stephen@networkplumber.org/",
    "project": {
        "id": 1,
        "url": "http://patches.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": "<20240321161146.340421-2-stephen@networkplumber.org>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20240321161146.340421-2-stephen@networkplumber.org",
    "date": "2024-03-21T16:00:17",
    "name": "[v10,01/10] windows: make getopt functions have const properties",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "408a4113f97b57b4e939b1445cbf4bd13c876fed",
    "submitter": {
        "id": 27,
        "url": "http://patches.dpdk.org/api/people/27/?format=api",
        "name": "Stephen Hemminger",
        "email": "stephen@networkplumber.org"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20240321161146.340421-2-stephen@networkplumber.org/mbox/",
    "series": [
        {
            "id": 31589,
            "url": "http://patches.dpdk.org/api/series/31589/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=31589",
            "date": "2024-03-21T16:00:17",
            "name": "Logging enhancements.",
            "version": 10,
            "mbox": "http://patches.dpdk.org/series/31589/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/138667/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/138667/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 0F29A43D17;\n\tThu, 21 Mar 2024 17:18:25 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id EDD5042E05;\n\tThu, 21 Mar 2024 17:18:24 +0100 (CET)",
            "from mail-yb1-f170.google.com (mail-yb1-f170.google.com\n [209.85.219.170])\n by mails.dpdk.org (Postfix) with ESMTP id 6CDEC427E1\n for <dev@dpdk.org>; Thu, 21 Mar 2024 17:18:23 +0100 (CET)",
            "by mail-yb1-f170.google.com with SMTP id\n 3f1490d57ef6-dcd7c526cc0so1235970276.1\n for <dev@dpdk.org>; Thu, 21 Mar 2024 09:18:23 -0700 (PDT)",
            "from hermes.local (204-195-123-203.wavecable.com. [204.195.123.203])\n by smtp.gmail.com with ESMTPSA id\n w62-20020a638241000000b005e485fbd455sm41815pgd.45.2024.03.21.09.11.56\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Thu, 21 Mar 2024 09:11:56 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1711037903;\n x=1711642703; 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=Hf75PC3cGL3/aHUnTvzOVFoCo+jxSQLWlI0Kn+D/zko=;\n b=DPcQHNpaTg4i/sYKty6MkL8JJ6/Gg1Du1YU2RSb3GQ+x5iwG+k44REJ0To8H+6NsSG\n Mcdn8QCq68UfBqIrnruPhbyt91DSq6rbtulGDunj14Ora4W5zAGcCVtzcnqX2MFuk6kA\n e0DmLTGpiz+z1GGw8ds76ybSnvc8RbQAKPbCuUh0XDfQAyqz2emBCxhFuByVUiCsfRxp\n yYLAeBR13y8ovYmRWNmMzZNp1D+n+CB1vbl79NLJ/ZfeCqkcDI6+VDWNbNVr3gLrrYKu\n gO4fKpt4h+KdnuonXy1Rd/SPbKn9m6m3w9Oe27hQuU//JXzOClI3HrJ+wB45senyCRpj\n IMOg==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1711037903; x=1711642703;\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=Hf75PC3cGL3/aHUnTvzOVFoCo+jxSQLWlI0Kn+D/zko=;\n b=EfnxAaMa06tv0Ohi3i/rKlXJbV2MfO64Qqj1hW4XBMZwnfe/Z2k6+Lq9QIAuVlIjeo\n zx8X/dqhZvJqlIpbdjLt+ySFqZo6ugawplrJWd4jVdZuTUW0XzwmYNpZr6Mns3UFum86\n sqzz27xUx4jfrFhYXNky/Y6Y3cjMup9Bsnso61e2Nf0SxwYfVH6fq43vtWu/MOiFzbWa\n Phhi71qBYproj3uhiEFytLGObvoxXSfyZaUrVw5TNZkAGsaWAiC5dNIZnsp0g67aj0Kk\n 1ozmgfoqI1b3VhBZcbd6J3EUEQwK7U9XytXoNCqAVVk1w7qr8d6yW2Lih1eWzS5t96TK\n FPWg==",
        "X-Gm-Message-State": "AOJu0YwxVdxJL65z6yHNnmKPFWZPz2mNJKHwLJCJYAgN+HAE0u8RnqeE\n lX6imyayOCzGDChZi3MpMkr46S/6rivaMlmqhit0hQoQptrrC8RrKKz5dWSlp2D0t5qw36gzQgl\n J",
        "X-Google-Smtp-Source": "\n AGHT+IGyy1NRs56yUVIwhlz0kcEKO0QFToMVjiNofnMuT/gxMrPXkbyatDFJb2ulED2iGTbdefm9WA==",
        "X-Received": "by 2002:a05:6a20:438f:b0:1a3:59ac:a626 with SMTP id\n i15-20020a056a20438f00b001a359aca626mr6962224pzl.41.1711037517358;\n Thu, 21 Mar 2024 09:11:57 -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>",
        "Subject": "[PATCH v10 01/10] windows: make getopt functions have const\n properties",
        "Date": "Thu, 21 Mar 2024 09:00:17 -0700",
        "Message-ID": "<20240321161146.340421-2-stephen@networkplumber.org>",
        "X-Mailer": "git-send-email 2.43.0",
        "In-Reply-To": "<20240321161146.340421-1-stephen@networkplumber.org>",
        "References": "<20200814173441.23086-1-stephen@networkplumber.org>\n <20240321161146.340421-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---\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": [
        "v10",
        "01/10"
    ]
}