Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-developers-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin-developers AT sources DOT redhat DOT com Message-ID: <779F20BCCE5AD31186A50008C75D9979171746@silldn_mail1.sanwaint.com> From: "Fifer, Eric" To: "'cygwin-developers AT sourceware DOT cygnus DOT com'" Subject: RE: _impure_ptr uninitialized in DLLs? Date: Wed, 12 Jul 2000 19:03:07 +0100 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: text/plain; charset="iso-8859-1" >This should be fixed in CVS now. It will require updating libcygwin.a. I'm still having problems. The dlopen() flavor works now, but when linking against a normal DLL, environ is NULL in the main program. Here's another demonstration: d.c: #include int __declspec(dllexport) d() { printf("in d\n"); printf("environ=%x\n", environ); } m.c: #include main(int argc, char **argv, char **envp) { printf("envp=%x\n", envp); printf("environ=%x\n", environ); d(); printf("environ=%x\n", environ); } build: gcc -g -c d.c dllwrap --output-lib libd.a --dllname libd.dll d.o gcc -g -c m.c gcc -o m m.o -L. -Wl,--Bstatic -ld -Wl,--Bdynamic run: envp=a040008 environ=0 in d environ=a040008 environ=0 Thanks, Eric Fifer