From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-3.9 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 68D8C1F4B4 for ; Thu, 1 Oct 2020 19:00:09 +0000 (UTC) Received: from localhost ([::1]:54144 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kO3oG-0008OZ-2R for normalperson@yhbt.net; Thu, 01 Oct 2020 15:00:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54718) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kO3oC-0008ON-L5 for bug-gnulib@gnu.org; Thu, 01 Oct 2020 15:00:04 -0400 Received: from ext140.multitalents.net ([173.164.249.140]:44879 helo=server01.int.multitalents.net) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kO3oA-0007ny-1c for bug-gnulib@gnu.org; Thu, 01 Oct 2020 15:00:04 -0400 Received: from server01.int.multitalents.net (localhost [127.0.0.1]) by server01.int.multitalents.net (8.15.2/8.13.8) with ESMTP id 091IxpeS005092; Thu, 1 Oct 2020 11:59:54 -0700 (PDT) Received: from localhost (tim@localhost) by server01.int.multitalents.net (8.15.2/8.13.8/Submit) with ESMTP id 091IxlKQ004957; Thu, 1 Oct 2020 11:59:47 -0700 (PDT) X-Authentication-Warning: server01.int.multitalents.net: tim owned process doing -bs Date: Thu, 1 Oct 2020 11:59:47 -0700 (PDT) From: Tim Rice X-X-Sender: tim@server01.int.multitalents.net To: Benji Wiebe Subject: Re: Port getprogname module to SCO OpenServer In-Reply-To: Message-ID: References: User-Agent: Alpine 2.11 (UW2 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Received-SPF: pass client-ip=173.164.249.140; envelope-from=tim@multitalents.net; helo=server01.int.multitalents.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/01 14:59:58 X-ACL-Warn: Detected OS = ??? X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: bug-gnulib@gnu.org Cc: bug-gnulib@gnu.org Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" Hi Benji, On Wed, 30 Sep 2020, Benji Wiebe wrote: > I ported the getprogname module to SCO OpenServer 6 (should also work on OSR5 > and UnixWare). It prevents several OSS packages from building. No proc filesystem on Openserver 5 so it will not work there. Would need a different "#ifdef" for 5 anyway. > I just made it read from /proc//cmdline to get the command name. The > patch is below. Comments are welcome. Thanks! Note reading /proc//cmdline will limit you to a 79 char pathname. And your program limits to 49. > > +# elif defined __SCO_VERSION__ /* SCO OpenServer/UnixWare */ While __SCO_VERSION__ covers Openserver 6 and UnixWare 7, what is normally used for 6 and 7 is __USLC__ for the native compiler and __sysv5__ for gcc Ie. # elif defined __USLC__ || defined __sysv5__ -- Tim Rice Multitalents tim@multitalents.net