Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q9Y2R-0007W2-RV for pgsql-hackers@arkaria.postgresql.org; Wed, 14 Jun 2023 21:28:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1q9Y2Q-0002Ws-Ki for pgsql-hackers@arkaria.postgresql.org; Wed, 14 Jun 2023 21:28:22 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q9Y2Q-0002Wj-BZ for pgsql-hackers@lists.postgresql.org; Wed, 14 Jun 2023 21:28:22 +0000 Received: from mail-pf1-x42b.google.com ([2607:f8b0:4864:20::42b]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1q9Y2N-002E4t-OF for pgsql-hackers@postgresql.org; Wed, 14 Jun 2023 21:28:21 +0000 Received: by mail-pf1-x42b.google.com with SMTP id d2e1a72fcca58-6667a0811a2so616912b3a.0 for ; Wed, 14 Jun 2023 14:28:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686778099; x=1689370099; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=OQ4UBxpelKWRA/x8BSpB3tTi/r1NwdlAONoOMtdLR6g=; b=DIkcMq8MC+xU0fBxlPSBuxhJ/XAXiieV6ydu1VXcCTMseFfl8lybO0FeyLKM6TK7xo X+SoLeNAWwx0RvI7RxkHtD0RlCrFwC4oDNUWUySW9keXlbHgZpW/HF7oGSu9uy1u+QlD hqL2g6i4E7lsRM2d1zQxJYNGsDGaxTlfj3wGbuR+zN324pmJnOR4WNJ2qEBrnSaBguvv y67hAvr4GBrI8OK7CuOlQeQrLA0HUZMa1yHxoQojRHZnz0IOZ+L+vsoimGcMXEfvOb9B TQJEYHu2k/Ogt1wxLiVBu7zJyMcHvdyvRYGzHzf0rGuVFKIdQ4AX6gNBvTZxpq0Droy9 tY3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686778099; x=1689370099; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=OQ4UBxpelKWRA/x8BSpB3tTi/r1NwdlAONoOMtdLR6g=; b=hdAxHSk/G8D5kk/HePhKHLJO1l3HTwmSxHL1kw/H3YJCbvo8shLAFIRdbqnTaHPKE3 r825l2bOMinTbP/InghSGAY1LUR0awNJf2BpAE6/EQjOv+FmYh7XN2wyy4CsNjqiImZf /387108OeL0Dsp8x1fZ3JKUSVDmgiXtyGMlEACE6o2tLLK3Yyo30ecqiupr//Y86vQpn Y2GfzsD2tOAzMTK5R7rWudDMRYu8TmrUuHowUVDYQlc8ZrDLAwhQOxdM5O3dKSt77qtZ OHpKDa9kd0k0pk8zdvKm/x9v6HMXZ8VqxEtAzPQkT6X0g9Whl4PLCqdj/g0fTbk++8Oq SObw== X-Gm-Message-State: AC+VfDzRo+yY7rrwtpwGQmbCqFICUIAaeizFPfUgVlt/S+SN3gJxKu5G Hnhz5G4rd1bDBO9JE4us4AA= X-Google-Smtp-Source: ACHHUZ5xHmCfc+tyGFLJBJsGGOb0oXdVuHyHKX3XjC/SZrdMwXvT24Sz6D9REl58VbNtG4t9S1+0ew== X-Received: by 2002:a05:6a21:3296:b0:101:1951:d491 with SMTP id yt22-20020a056a21329600b001011951d491mr2992012pzb.6.1686778098566; Wed, 14 Jun 2023 14:28:18 -0700 (PDT) Received: from nathanxps13 ([50.47.162.83]) by smtp.gmail.com with ESMTPSA id p13-20020a62ab0d000000b0066670c48854sm1228169pff.101.2023.06.14.14.28.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Jun 2023 14:28:18 -0700 (PDT) Date: Wed, 14 Jun 2023 14:28:16 -0700 From: Nathan Bossart To: Noah Misch Cc: Michael Paquier , Kyotaro Horiguchi , pgsql-hackers@postgresql.org Subject: Re: add non-option reordering to in-tree getopt_long Message-ID: <20230614212816.GA492731@nathanxps13> References: <20230609232257.GA121461@nathanxps13> <20230613.120001.2091320520660271559.horikyota.ntt@gmail.com> <20230613051343.GA211254@nathanxps13> <20230613.160201.833376179512503274.horikyota.ntt@gmail.com> <20230613223657.GC219055@nathanxps13> <20230614001737.GB1607568@rfd.leadboat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230614001737.GB1607568@rfd.leadboat.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, Jun 13, 2023 at 05:17:37PM -0700, Noah Misch wrote: > If you have a test program to be run, I can run it on AIX. Thanks. The patch above [0] adjusts 040_createuser.pl to test modifying argv, so that's one test program. And here's a few lines for reversing argv: #include int main(int argc, char *argv[]) { for (int i = 0; i < argc / 2; i++) { char *tmp = argv[i]; argv[i] = argv[argc - i - 1]; argv[argc - i - 1] = tmp; } for (int i = 0; i < argc; i++) printf("%s ", argv[i]); printf("\n"); } [0] https://postgr.es/m/attachment/147420/v1-0001-Teach-in-tree-getopt_long-to-move-non-options-to-.patch -- Nathan Bossart Amazon Web Services: https://aws.amazon.com