Hi Amir, and the dev-list too,

At 08:24 AM 3/30/99 -0500, you wrote:

>> There is a problem with reLyX used on Windows NT, which gives an errormsg
>> about 'getlogin' not being implemented. I took a latest and greatest
>> distribution from perl.org and it didn't contain it. I have changed the
line 
>> 
>>              $nm = getlogin || getpwuid($<);
>> 
>>      in MakePreamble.pl to
>>      
>>              $nm = `whoami`; chop $nm; 
>> 
>> 'whoami' is an executable that is provided with the Cygwin tools.
>> 
>> I guess you know what to do with this?
>
>Not really. I have zero experience with windows or with porting to windows.
>Or with having software that other people port to windows :) I learned perl
>on my sgi, and that's all I've really coded on.
>
>When you get the "getlogin not implemented" error, does it crash or just
>complain? 

It says:
Creating LyX preamble
The getlogin function is unimplemented at
../share/lyx/reLyX/MakePreamble.pm line 136.
Exited due to fatal Error!

>If it just complains, then you could probably change it to
>something like:
>
>       $nm = getlogin || getpwuid($<) || `whoami`;
>       chomp($nm);

This did not help.

>(chomp instead of chop so it will only remove a \n, so it works with
>getlogin too). I wouldn't want to change it to just whoami, because next
>thing you know, someone will try to port it to their palmpilot, which
>doesn't have whoami.
>This is sort of unfortunate. I always thought perl was write once, (debug a
>zillion times), run anywhere.
>
>There's a  faq for perl for win32, which I got to by following the "perl
>ports" link at perl.com. But I didn't see anything too helpful.
>
>If the getlogin thing is crashing your computer, we may have to do something
>fancy; e.g. put the $nm stuff in reLyX.in, and change that line based on
>configure. Ugh.

I don't have any bright ideas either. Sorry.

>We may need to take this discussion to the devel list since I'm so clueless.

I CC'd this, so we'll see if there is a porting-expert in the room.


                                                                Dag,
                                                                Steven
--- (http://www.cs.uu.nl/staff/steven.html)

Reply via email to