delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2013/06/12/08:12:22

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:date:message-id:subject:from:to
:content-type; q=dns; s=default; b=OGKrE8ELr5gf8RyOlDtL8VvkhX7s7
DjNYjz4zwE5PNuKCgqvU01i/zxskh3gSPSk/PMCSZrWrY+Pru8d9DF4KIwMhAdiY
4oqAhwd6WkEOVfa2xRLrQNDUOljQm/BAxGIcar/UdrjsHhyPvanJIy8EG5BR8zeq
D5LrLErMyynf4g=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:date:message-id:subject:from:to
:content-type; s=default; bh=cbio3V8o6hxS+dwYdiTdIWDMC7s=; b=h0q
RHDjY36DI2f8TS8Q6tP6NGi3klm23yLgSqnFmmvwFiLnQGJgM2LcA6+2GVjVHzWi
coUfpyMc2bDu72hR+JL8XGevybsPNCf8gbDrPSxUZHiqa7A0pNs5Ju7zoHv5zRI5
gcTIwYhy3LERbvFAnlE2j2KFA9avpYlgAb28QBa8=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,SPF_PASS autolearn=ham version=3.3.1
MIME-Version: 1.0
X-Received: by 10.50.21.42 with SMTP id s10mr3169844ige.84.1371039122528; Wed, 12 Jun 2013 05:12:02 -0700 (PDT)
Date: Wed, 12 Jun 2013 14:12:02 +0200
Message-ID: <CAHYyVz4opx4sT4dvQ4BoYD+Nb=CZC5uTYjy6TTn8Ph7bE75r6w@mail.gmail.com>
Subject: Re: __cygwin_environ, __imp_environ, _cur_environ, where is 'environ' symbol?
From: Vasiliy <testtest_2005 AT ukr DOT net>
To: cygwin AT cygwin DOT com

ok, it seems that newlib/libc/stdlib/environ.c has not made its way
into cygwin1.dll and/or libcygwin.a; shouldn't that be included?
________________________________
From: Corinna Vinschen <corinna-cygwin at cygwin dot com>
To: cygwin at cygwin dot com
Date: Wed, 12 Jun 2013 11:53:15 +0200
Subject: Re: __cygwin_environ, __imp_environ, _cur_environ, where is
'environ' symbol?
References: <CAHYyVz6bkXx89HZsWrt8ojgUVw02W_qG1s6bd7Ev2XAW3wcRog at
mail dot gmail dot com>
Reply-to: cygwin at cygwin dot com

________________________________

environ is the exported symbol referencing the internal __cygwin_environ
variable on x86_64.  Linking against and accessing it works for me:

  $ uname -a
  CYGWIN_NT-6.2 VMBERT864 1.7.21(0.266/5/3) 2013-06-11 21:43 x86_64 Cygwin
  $ cat > envtest.c <<EOF
  #include <stdio.h>

  int
  main ()
  {
    extern char **environ;

    printf ("environ: %p first entry: <%s>\n", &environ, environ[0]);
    return 0;
  }
  EOF
  $ gcc -o envtest envtest.c
  $ ./envtest
  environ: 0x1802a4778 first entry: <ALLUSERSPROFILE=C:\ProgramData>


Corinna

--
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019