pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nathan Bossart <nathandbossart@gmail.com>
To: Noah Misch <noah@leadboat.com>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: add non-option reordering to in-tree getopt_long
Date: Wed, 14 Jun 2023 14:28:16 -0700
Message-ID: <20230614212816.GA492731@nathanxps13> (raw)
In-Reply-To: <20230614001737.GB1607568@rfd.leadboat.com>
References: <20230609232257.GA121461@nathanxps13>
	<20230613.120001.2091320520660271559.horikyota.ntt@gmail.com>
	<20230613051343.GA211254@nathanxps13>
	<20230613.160201.833376179512503274.horikyota.ntt@gmail.com>
	<20230613223657.GC219055@nathanxps13>
	<ZIkBOzE8LBx1Ec7q@paquier.xyz>
	<ZIkDynQcrtFoXs5c@paquier.xyz>
	<20230614001737.GB1607568@rfd.leadboat.com>

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 <stdio.h>

	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-.patc...

-- 
Nathan Bossart
Amazon Web Services: https://aws.amazon.com





view thread (37+ messages)  latest in thread

Message-ID: <20230614212816.GA492731@nathanxps13>
Permalink:  ../20230614212816.GA492731@nathanxps13/
Also on:    postgresql.org/message-id/20230614212816.GA492731@nathanxps13

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: nathandbossart@gmail.com, noah@leadboat.com, michael@paquier.xyz, horikyota.ntt@gmail.com
  Subject: Re: add non-option reordering to in-tree getopt_long
  In-Reply-To: <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> <ZIkBOzE8LBx1Ec7q@paquier.xyz> <ZIkDynQcrtFoXs5c@paquier.xyz> <20230614001737.GB1607568@rfd.leadboat.com> <20230614212816.GA492731@nathanxps13>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox