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 1qC24J-0001Gv-Fc for pgsql-hackers@arkaria.postgresql.org; Wed, 21 Jun 2023 17:56:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1qC24H-0003eY-M3 for pgsql-hackers@arkaria.postgresql.org; Wed, 21 Jun 2023 17:56:33 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qC24H-0003aX-AX for pgsql-hackers@lists.postgresql.org; Wed, 21 Jun 2023 17:56:33 +0000 Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qC24E-003rfi-5Y for pgsql-hackers@postgresql.org; Wed, 21 Jun 2023 17:56:32 +0000 Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-1b51414b080so36424835ad.0 for ; Wed, 21 Jun 2023 10:56:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687370187; x=1689962187; 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=FXEeSl5cvfrDV/lun4DtXlXxHiThQqX2RBtD1ie/0os=; b=XOGo/cKlwCTW1rn1jrS9E1RlR8zh8es3Db6A5CfVHozmvADxTFlTt8DgFQc9keDA6J t/tv2K0SahQgf+X1iFqTTwPiXZI+zZDHS6FXyuMu2WCVnVNmNIHeVGWePt9UjDKoo9CR f1wVHpJLJqXknpW+YpU8MxPEkQthe3nmzJcQX3C1leG2+Hn7SJmPWOcYGWjuB/ks1B7X +3IVz5rhN529vlvh+i8qL4qqLwZMbBBPZdTpHsn+pyKJdCZ17eDfKv51AeJrUBaBaHCt LIDbMbCuLjWTuZ2y8z3ohRfUsPqvItvAmXYjaoqOSJmq5mbRAzNqVmRuWHXmSTjz2LaI LCQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687370187; x=1689962187; 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=FXEeSl5cvfrDV/lun4DtXlXxHiThQqX2RBtD1ie/0os=; b=I3xtFM2hpRj5eTNx0fvcAGbkbWZRQtlRU2wm8FYefnbTNK7g/uWGRwaHWokM/Lmqs5 oP4RFHNew19Ga18ZpdPdkOQblAHtm3hT3J7ok/FbpZEOVdv2iREKzFk6G9nJhyGAD7ji dlo9pMzn3L0gYT4lGjz7vwTRSstJ6H/R4eKb2qQigj6p1RRrxGYIVM7eIU65WMRS62Bq 4qHZHA1zgTRTS5tjFysUpwDp9xoSasTSY8J1FVJmwu1UHMU9iqAD9U/zXhExVvemkZgr ZT8ViulWDtfHxP84QgX+o1v1pL2nOKKHHOszEff8O9ImYZVBKW/v+QiMWrEYDP1j3CRC nlWg== X-Gm-Message-State: AC+VfDwi4/MMN+FTDVH4xCYBXt+uCz8YKECzYWD/HC5QwpqgNB4NKdSb SBXzwhk9RPt6N/9fSWITxUo= X-Google-Smtp-Source: ACHHUZ7tEadAoyORePwrV9dezJOgJp7J4/qiHmCTtLGdQn0HOS/aO2NE4PNCcHVyJ+975FirltOGrA== X-Received: by 2002:a17:902:e5cf:b0:1b6:9853:1759 with SMTP id u15-20020a170902e5cf00b001b698531759mr2584743plf.18.1687370187395; Wed, 21 Jun 2023 10:56:27 -0700 (PDT) Received: from nathanxps13 ([50.47.162.83]) by smtp.gmail.com with ESMTPSA id p18-20020a170902ebd200b001b523714ed5sm3723192plg.252.2023.06.21.10.56.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Jun 2023 10:56:26 -0700 (PDT) Date: Wed, 21 Jun 2023 10:56:24 -0700 From: Nathan Bossart To: Kyotaro Horiguchi Cc: michael@paquier.xyz, noah@leadboat.com, pgsql-hackers@postgresql.org Subject: Re: add non-option reordering to in-tree getopt_long Message-ID: <20230621175624.GA882103@nathanxps13> References: <20230616045828.GA972663@nathanxps13> <20230616.165138.1460643839992276252.horikyota.ntt@gmail.com> <20230616182847.GA71216@nathanxps13> <20230620.141244.1061039848681375358.horikyota.ntt@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230620.141244.1061039848681375358.horikyota.ntt@gmail.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, Jun 20, 2023 at 02:12:44PM +0900, Kyotaro Horiguchi wrote: > The argv elements get shuffled around many times with the > patch. However, I couldn't find a way to decrease the count without > resorting to a forward scan. So I've concluded the current approach > is them most effeicient, considering the complexity. Yeah, I'm not sure it's worth doing anything more sophisticated. > I tried some patterns with the patch and it generates the same results > with the glibc version. > > The TAP test looks fine and it catches the change. > > Everything looks fine to me. Thanks for reviewing. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com