get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 138938,
    "url": "http://patches.dpdk.org/api/patches/138938/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20240327233001.83505-3-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": "<20240327233001.83505-3-stephen@networkplumber.org>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20240327233001.83505-3-stephen@networkplumber.org",
    "date": "2024-03-27T23:28:25",
    "name": "[v17,02/15] 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": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20240327233001.83505-3-stephen@networkplumber.org/mbox/",
    "series": [
        {
            "id": 31635,
            "url": "http://patches.dpdk.org/api/series/31635/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=31635",
            "date": "2024-03-27T23:28:23",
            "name": "Logging unification and improvements",
            "version": 17,
            "mbox": "http://patches.dpdk.org/series/31635/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/138938/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/138938/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 E05CC43D5B;\n\tThu, 28 Mar 2024 00:30:25 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 2B48541144;\n\tThu, 28 Mar 2024 00:30:17 +0100 (CET)",
            "from mail-pl1-f171.google.com (mail-pl1-f171.google.com\n [209.85.214.171])\n by mails.dpdk.org (Postfix) with ESMTP id 0E787402E7\n for <dev@dpdk.org>; Thu, 28 Mar 2024 00:30:13 +0100 (CET)",
            "by mail-pl1-f171.google.com with SMTP id\n d9443c01a7336-1e0411c0a52so3871295ad.0\n for <dev@dpdk.org>; Wed, 27 Mar 2024 16:30:12 -0700 (PDT)",
            "from hermes.local (204-195-123-203.wavecable.com. [204.195.123.203])\n by smtp.gmail.com with ESMTPSA id\n n15-20020a170902e54f00b001e0fdc6e4ebsm80772plf.175.2024.03.27.16.30.11\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Wed, 27 Mar 2024 16:30:11 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1711582212;\n x=1712187012; 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=j2bWaQew6uFbTYM7AsbymK+bBIaNZpLFH5iS8177eDI=;\n b=tMYNH9jN0rKmrBeyw60WnJ4pe7NgcEvX/O7NLnmzvb/gpNVAQ2uH/E41+N0+xj9u45\n CNzdto21/Gp8pmd6/Lg7/WFpkLhwMankmnWSceL3AvQAvrsUORyXVN57r4aYvGQihsSZ\n DV5Yovs23QUFZSEGnHi0qaKMIFK8dgBcgXFic3v0fr3pYvYTgiFu8DjA0F3YCfZCSc8b\n agzIwJ5mE26a1jj+JmxNn9XCzSqfeXnQY3F52uM24YiWoARZvIs9vBRFl0Iq3clbADtg\n sKM9mvcQlYIYlB7daFceDxBwdyz+hBUadO4cpK4Pvq++0V48TVEF4UMZBeLTk/C6ZYuc\n 9rlw==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1711582212; x=1712187012;\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=j2bWaQew6uFbTYM7AsbymK+bBIaNZpLFH5iS8177eDI=;\n b=mqpL2VSVsN7kf2XtgH6Zxj3WkXw/0T9c0ynnmD66Bu8tMG9xq97kT6e/4qmshaTVeH\n TjWxMvgpCUG1P10aY8AksQZWP2BG3agUnak8qeVfAbxeGSfyIk2nroQrP++fNwsiWld3\n 4YroBllvhjruugqCvX+8i5ip3YEL+SMPxScBXYBTydUdkUXzzCb+V23abGzdFCAO+xAM\n cMV7N0E0KTFDdh8hZ+YXtHZ1Ni5rms3uX+R6Q6DORWcebdGzuIweN0lU7JVHCwJwvC90\n a8rfeYplz8pFLs9ILp7LlcdW92ZXnQqHff9ppD7ZUyMhZnZHZ4qQXxMGgPF9IHzq7ufG\n PUKw==",
        "X-Gm-Message-State": "AOJu0YwIOn/CLWMCLrb++OROMxc3gCC0HpI5QSDT3172NSccOJ0XceKk\n fB77l8uL413ZVH5P2kcIgdwGevTgT1ylOZqrU+HX+bPFcqoYhBZdddOqvUlAB+ne89U55IJQ8Cm\n L",
        "X-Google-Smtp-Source": "\n AGHT+IHirt+vle7t6G6l2HiPHcorGJrplOW6ypRcKsvdZPpUviTqwrk8I/yKqVygYy3ScaaBotjCSg==",
        "X-Received": "by 2002:a17:902:ba94:b0:1e0:c567:bb42 with SMTP id\n k20-20020a170902ba9400b001e0c567bb42mr1101932pls.59.1711582212199;\n Wed, 27 Mar 2024 16:30:12 -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 v17 02/15] windows: make getopt functions have const\n properties",
        "Date": "Wed, 27 Mar 2024 16:28:25 -0700",
        "Message-ID": "<20240327233001.83505-3-stephen@networkplumber.org>",
        "X-Mailer": "git-send-email 2.43.0",
        "In-Reply-To": "<20240327233001.83505-1-stephen@networkplumber.org>",
        "References": "<20200814173441.23086-1-stephen@networkplumber.org>\n <20240327233001.83505-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 a1f51c6c23..50ff71b930 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 6f57af454b..e4cf6873cb 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": [
        "v17",
        "02/15"
    ]
}