From owner-freebsd-hackers@FreeBSD.ORG Thu Oct 17 14:09:52 2013 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B43068AA for ; Thu, 17 Oct 2013 14:09:52 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-qc0-x22d.google.com (mail-qc0-x22d.google.com [IPv6:2607:f8b0:400d:c01::22d]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7314F2344 for ; Thu, 17 Oct 2013 14:09:52 +0000 (UTC) Received: by mail-qc0-f173.google.com with SMTP id l13so1572936qcy.18 for ; Thu, 17 Oct 2013 07:09:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=eZ1cPb6+4xGtKBa0V3TZpZRcITz7fPbBvqfpXw9Psj0=; b=YcBZCXHpKMKkTRExYOLlRqGjDhvQ7ObOuDCykI/jYJgfDMHusE6VERslgnzOR7GVcW 9AdcSrEtKLWovzuICvGWv+Gh9WVTpSSBhi/CNWmtRB/OMBHa4OzKzO+RbuXV+g3NTyAf oXUbRlRgqDAgXeFXNZdLbqgzxi9nb9fubPxKM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=eZ1cPb6+4xGtKBa0V3TZpZRcITz7fPbBvqfpXw9Psj0=; b=ftoBRBX/V4/PHqRT7XrtPfjB0KZbrCnK3tkIGwU35lVCXcPiZNvw+UuQ7mlb8/hChp H5p5jsq96sMnGmRXp1ILP9m8/wnl92I4VucTalOzZAgIyMhe6TszKAa+8PuXDdouD+AN oVD9OotojVGgcXcfOfupdhriTZdVWZACtY9mp67DreNqupBiOhqVA8AMyKLr+sc6IftF J7dcXcjXmcRGbRnuFMlfj9Q6M+Hl2aZDQnUddgMZwCGUFHIQ/bCK25QVt2Xl24jyIRhy md+Vq4fJU+A1d9X+Pahm3CT2D2xEgZZu7GDSLsvAT4uLT1AY/1/sCDqHLhp473zou5sQ ncxw== X-Gm-Message-State: ALoCoQnSvqwre3wtZv8agaWIrKG2T1fDGaKCzY9NBnWweOhBu2Nr4hfrcM7iMtgbQErsJJ9C3h/C X-Received: by 10.49.96.42 with SMTP id dp10mr2763212qeb.94.1382018991423; Thu, 17 Oct 2013 07:09:51 -0700 (PDT) MIME-Version: 1.0 Received: by 10.96.63.101 with HTTP; Thu, 17 Oct 2013 07:09:21 -0700 (PDT) In-Reply-To: <525FE857.4020303@embedded-brains.de> References: <525D5A35.4040005@embedded-brains.de> <525FE857.4020303@embedded-brains.de> From: Eitan Adler Date: Thu, 17 Oct 2013 10:09:21 -0400 Message-ID: Subject: Re: Global variables in system programs To: Sebastian Huber Content-Type: text/plain; charset=UTF-8 Cc: FreeBSD Hackers X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Oct 2013 14:09:52 -0000 On Thu, Oct 17, 2013 at 9:38 AM, Sebastian Huber wrote: > Hello, > > there is another problem: getopt(). This function uses global variables on > its own. Newlib provides a getopt_r() variant, but this seems to be not > available on FreeBSD. It shouldn't be hard to port this to FreeBSD (it just requires that the global variables be passed in as pointers-to-values). Please do so! -- Eitan Adler