develooper Front page | perl.perl5.porters | Postings from June 2013

Re: dmake can't find config.h, and collector throws error when tryingto compile perl-static.exe (perl-5.18.0 / mingw / 32b)

Thread Previous | Thread Next
From:
Jan Dubois
Date:
June 6, 2013 18:16
Subject:
Re: dmake can't find config.h, and collector throws error when tryingto compile perl-static.exe (perl-5.18.0 / mingw / 32b)
Message ID:
CAD-TLz9Yk6jhdZL4BXxeu3_Ohmq9TwuFssKhgN_OzynxwK9NPA@mail.gmail.com
On Thu, Jun 6, 2013 at 11:10 AM, Jan Dubois <jand@activestate.com> wrote:
> I notice that DllMain also calls set_w32_module_name(), but I think
> that may be redundant, because it is called before w32_module_name is
> used anyways.  The only reason I can think of calling it during
> DllMain would be if perl.exe called set_w32_module_name() before the
> DLL was loaded, in which case w32_module_name would initially be set
> to the name of the EXE file, and once the DLL is loaded, it would be
> reset to the DLL name.
>
> In either case, there should be no need to call set_w32_module_name()
> from Perl_init_os_extras.

Oops, forgot to mention this part in DllMain:

    case DLL_PROCESS_ATTACH:
/* #define DEFAULT_BINMODE */
#ifdef DEFAULT_BINMODE
    setmode( fileno( stdin  ), O_BINARY );
    setmode( fileno( stdout ), O_BINARY );
    setmode( fileno( stderr ), O_BINARY );
    _fmode = O_BINARY;
#endif

So technically this should be mirrored for the all-staic build as
well.  But given that DEFAULT_BINMODE isn't documented or referenced
anywhere, I would be in favour of removing this part from perllib.c
instead.

Cheers,
-Jan

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About