| www.delorie.com/archives/browse.cgi | search |
| 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:date:from:to:subject:message-id:reply-to | |
| :references:mime-version:content-type:in-reply-to; q=dns; s= | |
| default; b=tUF1+nhUg1zL0dYVFuVjjsJsJ8zd9rsbN7BLDiJyuzcpYw53B7sfG | |
| r20KIrNlJlsCbWo2/vg8swF71iBZGbRCJbGSTPfJVGJ0fQBjtPVRqHD6hi85cuGy | |
| cvc3hq3BX9bMrSbmu/MwNd2Zay2fX+ptqg3PCkQe2uvTCif1ggsm00= | |
| 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:date:from:to:subject:message-id:reply-to | |
| :references:mime-version:content-type:in-reply-to; s=default; | |
| bh=+sWPyiylQST9WouzmxflByuwjzg=; b=a/8VaEH5aQq4yNTKB9gIEumh5aRW | |
| oR2t0IOrIydYkxRY5VswnKshi+dPhsSKuGjl79At/SfTC82lArCMv6Q51ssyRHk8 | |
| uFpD995DKli8fjpfnmAO9RrF07/9F481ja+utj/0dqv9LHPd7v2urFqHFjS5UqR5 | |
| skK1M1wAhKG6Lww= | |
| 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=-1.8 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.1 |
| Date: | Wed, 12 Jun 2013 11:53:15 +0200 |
| From: | Corinna Vinschen <corinna-cygwin AT cygwin DOT com> |
| To: | cygwin AT cygwin DOT com |
| Subject: | Re: __cygwin_environ, __imp_environ, _cur_environ, where is 'environ' symbol? |
| Message-ID: | <20130612095315.GB30377@calimero.vinschen.de> |
| Reply-To: | cygwin AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| References: | <CAHYyVz6bkXx89HZsWrt8ojgUVw02W_qG1s6bd7Ev2XAW3wcRog AT mail DOT gmail DOT com> |
| MIME-Version: | 1.0 |
| In-Reply-To: | <CAHYyVz6bkXx89HZsWrt8ojgUVw02W_qG1s6bd7Ev2XAW3wcRog@mail.gmail.com> |
| User-Agent: | Mutt/1.5.21 (2010-09-15) |
On Jun 11 23:55, Vasyl Khalak wrote:
> I have tried to compile 0.18.2 gettext on x64 Cygwin, and got
> "undefined reference to `environ'", where is the symbol?
>
> user AT host /cygdrive/c/cygwin
>
> 32 bit:
> $ nm lib/libcygwin.a
> 00000000 I __imp____cygwin_environ
> 00000000 I __nm____cygwin_environ
> ...
> 00000000 B _environ
>
> $ nm bin/cygwin1.dll
> 61227a44 B ___cygwin_environ
> 6102db00 T _cur_environ AT 0
> 61184444 D _main_environ
>
> 64 bit:
> $ nm /usr/lib/libcygwin.a
> 0000000000000000 I __imp_environ
> 0000000000000000 I __nm_environ
>
> $ nm /usr/bin/cygwin1.dll
> 00000001802a4778 B __cygwin_environ
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
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |