misc basic installation problems with cygwin

2003-10-25 Thread Werner Beck
Hi - I've seen this twice now, and I can't find a hint in the FAQ, and searching the 
newsgroups available to me didn't turn up something that seemed related, so I hope 
this list is appropriate for asking such questions ... if not, I would appreciate a 
pointer to "the right thing to do".

On WinXP Pro, the installation leaves all file permissions to "-+".  Is that 
the way it should be - probably not ??  Anyway, nothing worked.

After I opened file permissions a little and re-ran the postinstall scripts, some 
things started working.

However, there are still many problems.

Like, the terminal type 'cygwin' is unknown.

Or, the 'man' command fails with:

groff: can't find `DESC' file

groff:fatal error: invalid device `ascii'

Is there some documentation that I've just not stumbled across that would tell me what 
I forgot, or did incorrectly ?

Thanks,
Werner

__
Horoskop, Comics, VIPs, Wetter, Sport und Lotto im WEB.DE Screensaver1.2
Kostenlos downloaden: http://screensaver.web.de/?mc=021110


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



misc basic installation problems with cygwin

2003-10-25 Thread Werner Beck
Hi - I've seen this twice now, and I can't find a hint in the FAQ, and
searching the newsgroups available to me didn't turn up something that
seemed related, so I hope this list is appropriate for asking such
questions ... if not, I would appreciate a pointer to "the right thing
to do".

On WinXP Pro, the installation leaves all file permissions to
"-+".  Is that the way it should be - probably not ??  Anyway,
nothing worked.

After I opened file permissions a little and re-ran the postinstall
scripts, some things started working.

However, there are still many problems.

Like, the terminal type 'cygwin' is unknown.

Or, the 'man' command fails with:

groff: can't find `DESC' file

groff:fatal error: invalid device `ascii'

Is there some documentation that I've just not stumbled across that
would tell me what I forgot, or did incorrectly ?

Thanks,
Werner




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



Re: Problem with a cygwin App - Broken on a pristine system until I install cygwin, cygwin1.dll doesn't seem to be enough

2003-10-25 Thread Cliff Hones
Benjamin Cutler wrote:
...
Hrm, next time I get a chance to sit down in the CS lab and hammer away at it
for a while (I currently only have a Linux box available to me without making
a trip across campus) I'll try strace. As the previous poster suggested, I
had already tried cygcheck, and all it spat back at me was SDL.dll,
cygwin1.dll, and a bunch of standard Windows DLLs. Perhaps there's a compiler
switch that I missed?
Have you considered the registry?  Installing Cygwin updates the
registry - it's where the mount points are recorded.  If your app
is using a POSIX-style path anywhere (eg /tmp/...) this would not
be found, and if your app is dependent on the text/binary mount
switches it would behave differently.
A quick check would be to temporarily rename your Cygnus Solutions
registry keys (in HKLM/Software and HKCU/Software), or else use
mount to experiment.
-- Cliff



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


Re: rsync local dir copy hang - solved for me

2003-10-25 Thread Corinna Vinschen
On Fri, Oct 24, 2003 at 07:41:54AM -0700, Bakken, Luke wrote:
> It never got past cygwin_select().
> [...]
> > The bottom point: *don't do that* ;-)
> >  i.e. leave the msleep() call there.
> 
> If I leave msleep there, it hangs every time. So I'm taking it out. Now,

But Hannu is right.  Why not replace msleep(2) by usleep(2)?  AFAICS,
it should fix the hang as well.  Would you mind to try it?

>  I'm now going to see if
> I can isolate the heart of the problem with a simple program that forks
> and sleeps in the same fashion as with rsync.

No worries, I have a working testcase which shows the hang.  But thanks
for the offer.

Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Developermailto:[EMAIL PROTECTED]
Red Hat, Inc.

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



Re: ssh-host-config: "mkpasswd -l -u sshd"; should it be "-d" on domain controller?

2003-10-25 Thread Corinna Vinschen
On Fri, Oct 24, 2003 at 01:38:50PM -0500, Tom Rodman wrote:
> consider:
> 
>   bash-2.05b$ uname -r; grep mkpasswd /bin/ssh-host-config
>   1.5.5(0.94/3/2)
> mkpasswd -l -u sshd | sed -e 's/bash$/false/' >> ${SYSCONFDIR}/passwd
> 
> Does "mkpasswd -l" make any sense on a domain controller?
> 
> On an NT domain controller I tested 
> 
>   mkpasswd -d -u sshd | sed -e 's/bash$/false/' >> /etc/passwd
> 
> and "ssh localhost" worked fine after stopping and starting sshd.  The '-d"
> option creates a user entry that apparently has the same SID, but
> different uid offset.

It's only the uid which is different then, this has been introduced
long ago to minimize the chance for collision between local and domain
account ids.  Other than that, -l and -d are practically the same on a
domain controller.

Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Developermailto:[EMAIL PROTECTED]
Red Hat, Inc.

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



(newbie) "Unable to load setup.ini..." error

2003-10-25 Thread news.gmane.org
Hi,

I read the archives and google before and I have no problems with trailing
blanks or trailing slashes. I also deleted last-mirror file.

I have several packages I put on my local webserver.
I added this url during setup (2.416), and packages shows up.

Then I uploaded the directory to my ISP. When I add this url during my
setup,
I always get the message "unable to load setup.ini...". I tried from another
computer, same result (W2000 and XP). I verified that setup.ini was not
corruped. I also tried setup.ini with unix and dos line endings.
My ISP is french Wanadoo (http://perso.wanadoo.fr/t.b/cygwin) . I am not
able
to test with another one.

Thanks

Thierry B.



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



Re: Binaries for bootstrap GNAT/GCC-Cygwin Build

2003-10-25 Thread Gerrit P. Haase
Hallo David,

>>Do you have a reasonable amount of time and Ada code to test run the Ada
>>compiler? 

> I have an /unreasonable/ amount of time.  Ada code - I can write it, I
> can also go download the conformance tests (I think).

Fine, since it is not yet released, I send you the URL to download in
a private Mail.


Thanks,
Gerrit
-- 
=^..^=


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



RE: rsync local dir copy hang - solved for me

2003-10-25 Thread Hannu E K Nevalainen
> From: Corinna Vinschen
> Sent: Saturday, October 25, 2003 12:18 PM
> 
> On Fri, Oct 24, 2003 at 07:41:54AM -0700, Bakken, Luke wrote:
> > It never got past cygwin_select().
> > [...]
Hannu:
> > > The bottom point: *don't do that* ;-)
> > >  i.e. leave the msleep() call there.
> > 
> > If I leave msleep there, it hangs every time.
> > So I'm taking it out. 
> 
> But Hannu is right.  Why not replace msleep(2) by usleep(2)?
> AFAICS, it should fix the hang as well.  Would you mind to try it?

 IMO that's a good "temporary thing", yes. :-)

/Hannu E K Nevalainen, B.Sc. EE - 59?16.37'N, 17?12.60'E
-- printf("Timezone: %s\n", (DST)?"UTC+02":"UTC+01"); --
--END OF MESSAGE--

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



RE: Wildcard problem with recursion

2003-10-25 Thread Hannu E K Nevalainen
> From: Ajith Kumar
> Sent: Saturday, October 25, 2003 7:59 AM

> > Yes, read the shell man pages to learn how file completion works.
> > What you want is a job for `find | xargs grep'.
> >
> > Corinna

> I run these from the win2k cmd.exe and not from the bash prompt.
> Can u be more specific please to which doc or man pages I shold
> refer to?
> Thank You
> Regards,
> ajith

$ info bash # bash shell info pages (hypertext)
 (some man pages are updated less requently than info pages)
$ info find
$ info xargs

In most cases you can replace "info" with "man" - but note that man pages
often are less frequently updated.

If
$ type -a 
says "Internal command" then
$ help 
usually tells more.

Though you might find it easier to find relevant parts of the text by using
less's "/" key to search for interesting text in the _man_ pages  (this
works in the info pages too, but is less succesful IMO)

/Hannu E K Nevalainen, B.Sc. EE - 59?16.37'N, 17?12.60'E
-- printf("Timezone: %s\n", (DST)?"UTC+02":"UTC+01"); --
--END OF MESSAGE--


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



RE: misc basic installation problems with cygwin

2003-10-25 Thread Hannu E K Nevalainen
> From: Werner Beck
> Sent: Saturday, October 25, 2003 10:09 AM
>
> Hi - I've seen this twice now, and I can't find a hint in the FAQ, and
> searching the newsgroups available to me didn't turn up something that
> seemed related, so I hope this list is appropriate for asking such
> questions ... if not, I would appreciate a pointer to "the right thing
> to do".
>
> On WinXP Pro, the installation leaves all file permissions to
> "-+".  Is that the way it should be - probably not ??  Anyway,
> nothing worked.
>
> After I opened file permissions a little and re-ran the postinstall
> scripts, some things started working.

 Sorry for beeing vague, but I have a recollection of seeing a posting by
Igor, or maybe Corinna, about creating the cygwin root folder with some
specific permissions PRIOR to running setup.exe a while back...
 Why don't you try to google on
"site:cygwin.com +setup +perm +before +install +Igor"
or some such, it might turn up that particular posting... I wonder if it
wasn't Igor who wrote about it.

/Hannu E K Nevalainen, B.Sc. EE - 59?16.37'N, 17?12.60'E
-- printf("Timezone: %s\n", (DST)?"UTC+02":"UTC+01"); --
--END OF MESSAGE--


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



RE: Problem with a cygwin App - Broken on a pristine system until I install cygwin, cygwin1.dll doesn't seem to be enough

2003-10-25 Thread Hannu E K Nevalainen
> From: Cliff Hones
> Sent: Saturday, October 25, 2003 12:08 PM

> Have you considered the registry?  Installing Cygwin updates the
> registry - it's where the mount points are recorded.  If your app
> is using a POSIX-style path anywhere (eg /tmp/...) this would not
> be found, and if your app is dependent on the text/binary mount
> switches it would behave differently.
> 
> A quick check would be to temporarily rename your Cygnus Solutions
> registry keys (in HKLM/Software and HKCU/Software), or else use
> mount to experiment.

i.e.
$ mount -m >mounts.bat
# on the dev. machine

# Assuming mount.exe and mounts.bat from cygwin in PATH
C:\> mounts.bat 
# on the user machine

May be a good idea to
- minimize mounts.bat
- NOT use "-s" mount flag.
  (-s == for all users, privilege problems unless running as admin)
- adjust mounts.bat for drive letters on the user machine.
  (hmm... is there a "sed" for MSDOS? Installation problem.)

/Hannu E K Nevalainen, B.Sc. EE - 59?16.37'N, 17?12.60'E
-- printf("Timezone: %s\n", (DST)?"UTC+02":"UTC+01"); --
--END OF MESSAGE--

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



Re: Problem with a cygwin App - Broken on a pristine system until I install cygwin, cygwin1.dll doesn't seem to be enough

2003-10-25 Thread Christopher Faylor
On Sat, Oct 25, 2003 at 11:07:31AM +0100, Cliff Hones wrote:
>Benjamin Cutler wrote:
>>...
>>Hrm, next time I get a chance to sit down in the CS lab and hammer away
>>at it for a while (I currently only have a Linux box available to me
>>without making a trip across campus) I'll try strace.  As the previous
>>poster suggested, I had already tried cygcheck, and all it spat back at
>>me was SDL.dll, cygwin1.dll, and a bunch of standard Windows DLLs.
>>Perhaps there's a compiler switch that I missed?
>
>Have you considered the registry?  Installing Cygwin updates the
>registry - it's where the mount points are recorded.  If your app is
>using a POSIX-style path anywhere (eg /tmp/...) this would not be
>found, and if your app is dependent on the text/binary mount switches
>it would behave differently.
>
>A quick check would be to temporarily rename your Cygnus Solutions
>registry keys (in HKLM/Software and HKCU/Software), or else use mount
>to experiment.

PLEASE don't instruct people to play around with the registry.
We have a perfectly good tool for them to use -- mount.  It is designed
to manipulate cygwin's mount table.  The fact that it is in the registry
is incidental.  You can do everything you need with the mount command,
ignoring the registry completely.

cgf

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



Re: 1.5.1: can't open files beginning with "..."

2003-10-25 Thread Corinna Vinschen
On Sat, Oct 25, 2003 at 12:04:14AM +0200, Pavel Tsekov wrote:
> > Chris Moore wrote:
> > > I have a file on my PC called "...foo.txt".
> 
> This does work, but Cygwin's path handling code understands
> only ".." and "." . If it get three dots in a raw and they
> appear before the last '/' char, Cygwin returns ENOENT.

Fixed in CVS now.

Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Developermailto:[EMAIL PROTECTED]
Red Hat, Inc.

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



Re: Problem with a cygwin App - Broken on a pristine system until I install cygwin, cygwin1.dll doesn't seem to be enough

2003-10-25 Thread Cliff Hones
Christopher Faylor wrote:
PLEASE don't instruct people to play around with the registry.
We have a perfectly good tool for them to use -- mount.  It is designed
to manipulate cygwin's mount table.  The fact that it is in the registry
is incidental.  You can do everything you need with the mount command,
ignoring the registry completely.
I take your point - and indeed I almost posted a suggestion to
use mount alone.  But the original poster sounded as though he
knew what he was doing, and in this *particular* case, where
the key to his problem was to find what in the environment
had been changed by the Cygwin install, a quick dive into
the registry looks to be the best test.  It's what I would
have done - and bear in mind also that it may not be mount
points - doesn't Cygwin1.dll also look at the registry for
application-specific CYGWIN settings?
In mitigation, I did say *temporarily* rename.  I guess I
should also have said:
  Children, don't do this at home unless you know *exactly*
  what you are doing.
CGF is absolutely right to point out that to manipulate
mount points the mount command is the right way to go.
and Hannu has posted an example.  Also, it's not
unlikely (I understand, and hope) that the mount point
info will one day be moved out of the registry.
But I still stand by my original suggestion, for experts only,
to determine if it is a registry setting added or changed
by the installation of Cygwin which was causing the problem.
-- Cliff



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


Re: Problem with a cygwin App - Broken on a pristine system until I install cygwin, cygwin1.dll doesn't seem to be enough

2003-10-25 Thread Christopher Faylor
On Sat, Oct 25, 2003 at 05:58:00PM +0100, Cliff Hones wrote:
>Christopher Faylor wrote:
>>PLEASE don't instruct people to play around with the registry.  We have
>>a perfectly good tool for them to use -- mount.  It is designed to
>>manipulate cygwin's mount table.  The fact that it is in the registry
>>is incidental.  You can do everything you need with the mount command,
>>ignoring the registry completely.
>
>I take your point - and indeed I almost posted a suggestion to use
>mount alone.  But the original poster sounded as though he knew what he
>was doing, and in this *particular* case, where the key to his problem
>was to find what in the environment had been changed by the Cygwin
>install, a quick dive into the registry looks to be the best test.
>It's what I would have done - and bear in mind also that it may not be
>mount points - doesn't Cygwin1.dll also look at the registry for
>application-specific CYGWIN settings?

This is the argument that people often make when I go into the "don't
use the registry" litany but I find it unlikely in the extreme that
someone would just "forget" that they'd modified the registry at one
point, especially when the someone isn't really sure if just copying
cygwin to the new machine should be sufficient.

The idea that this may be mount point related is a good one but none of
the other program settings in the registry should have this kind of
effect on a program.

cgf

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



binutils: Strange ld error: Error: 0-bit reloc in dll

2003-10-25 Thread Gerrit P. Haase
Hallo,

I'm getting a 'I've never seen before' ld error:
 Error: 0-bit reloc in dll

Libtool issues the link command like this:
gcc -shared \
 $(OBJECTS) \
 -L/usr/lib \
 -L/usr/X11R6/lib $(LIBS) \
 -Wl,--export-dynamic \
 -Wl,--export-dynamic \
 -o .libs/cyggucharmap-3.dll \
 -Wl,--image-base=0x1000 \
 -Wl,--out-implib,.libs/libgucharmap.dll.a
Error: 0-bit reloc in dll
Creating library file: .libs/libgucharmap.dll.a
collect2: ld returned 1 exit status
make[3]: *** [libgucharmap.la] Error 1
  
I tried to reorder the command, I tried to add some switches like
--export-all-symbols and -no-whole-archive, but it doesn't help.

A google search shows only one hit of interest:

http://article.gmane.org/gmane.comp.gnu.mingw.user/7425
where Danny Smith wrote at 29 May 2003:
>> gcc.exe -shared -Wl,--out-implib,libfoo.a -o foo.dll foo.o
>> Error: 0-bit reloc in dll
>> 
>> Any idea what I should look for to work around this issue?
>> 
> Did you use -r (or --relocateable) to construct the object?
> What version of ld?
> 
> The -r bug should be fixed in latest relwase candidade of binutils.
> Danny


Any ideas?  Was the '-r bug' which Danny fixed in the MinGW binutils
release candidate not fixed in the Cygwin binutils release, or is it
already included in the latest Cygwin binutils release?

I'm also not sure what is meant with 'Did you use -r ...', should I
use it or is there the bug and I shouldn't use it?

What I did at last was to change '-g -O2' to '-O2' to reduce the size
of the objects, because it was suggested in some other postings I
found that it happens only with big object files and I added the -r
flag to compile the objects for the dynamic library which results in
the same 'Error: 0-bit reloc in dll'.

Is it neccessary to recompile all the 25 libraries (which I need to
link the application to) with the -r switch?


Gerrit
-- 
=^..^=


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



Re: binutils: Strange ld error: Error: 0-bit reloc in dll

2003-10-25 Thread Gerrit P. Haase
Additional info about the statements that it happens with big object
files:
$ d gucharmap-unicode-info.o
rw-r--r--  #gerrit:Admins  3.9M  Oct 25 19:27  gucharmap-unicode-info.o
1 regular files, with a total size of 3.9M.

May be that is just too big?

Gerrit

> I'm getting a 'I've never seen before' ld error:
>  Error: 0-bit reloc in dll

> Libtool issues the link command like this:
> gcc -shared \
>  $(OBJECTS) \
>  -L/usr/lib \
>  -L/usr/X11R6/lib $(LIBS) \
>  -Wl,--export-dynamic \
>  -Wl,--export-dynamic \
>  -o .libs/cyggucharmap-3.dll \
>  -Wl,--image-base=0x1000 \
>  -Wl,--out-implib,.libs/libgucharmap.dll.a
> Error: 0-bit reloc in dll
> Creating library file: .libs/libgucharmap.dll.a
> collect2: ld returned 1 exit status
> make[3]: *** [libgucharmap.la] Error 1
  
> I tried to reorder the command, I tried to add some switches like
> --export-all-symbols and -no-whole-archive, but it doesn't help.

> A google search shows only one hit of interest:

> http://article.gmane.org/gmane.comp.gnu.mingw.user/7425
> where Danny Smith wrote at 29 May 2003:
>>> gcc.exe -shared -Wl,--out-implib,libfoo.a -o foo.dll foo.o
>>> Error: 0-bit reloc in dll
>>> 
>>> Any idea what I should look for to work around this issue?
>>> 
>> Did you use -r (or --relocateable) to construct the object?
>> What version of ld?
>> 
>> The -r bug should be fixed in latest relwase candidade of binutils.
>> Danny


> Any ideas?  Was the '-r bug' which Danny fixed in the MinGW binutils
> release candidate not fixed in the Cygwin binutils release, or is it
> already included in the latest Cygwin binutils release?

> I'm also not sure what is meant with 'Did you use -r ...', should I
> use it or is there the bug and I shouldn't use it?

> What I did at last was to change '-g -O2' to '-O2' to reduce the size
> of the objects, because it was suggested in some other postings I
> found that it happens only with big object files and I added the -r
> flag to compile the objects for the dynamic library which results in
> the same 'Error: 0-bit reloc in dll'.

> Is it neccessary to recompile all the 25 libraries (which I need to
> link the application to) with the -r switch?


> Gerrit



-- 
=^..^=


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



Re: 1.5.1: can't open files beginning with "..."

2003-10-25 Thread Pavel Tsekov


On Sat, 25 Oct 2003, Corinna Vinschen wrote:

> On Sat, Oct 25, 2003 at 12:04:14AM +0200, Pavel Tsekov wrote:
> > > Chris Moore wrote:
> > > > I have a file on my PC called "...foo.txt".
> >
> > This does work, but Cygwin's path handling code understands
> > only ".." and "." . If it get three dots in a raw and they
> > appear before the last '/' char, Cygwin returns ENOENT.
>
> Fixed in CVS now.

Does it fix the following:

[EMAIL PROTECTED] ~
$ cd /usr/bin../

[EMAIL PROTECTED] /usr/bin..
$ pwd
/usr/bin..

[EMAIL PROTECTED] /usr/bin..
$

Pavel

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



Re: 1.5.1: can't open files beginning with "..."

2003-10-25 Thread Corinna Vinschen
On Sat, Oct 25, 2003 at 10:58:10PM +0200, Pavel Tsekov wrote:
> 
> 
> On Sat, 25 Oct 2003, Corinna Vinschen wrote:
> 
> > On Sat, Oct 25, 2003 at 12:04:14AM +0200, Pavel Tsekov wrote:
> > > > Chris Moore wrote:
> > > > > I have a file on my PC called "...foo.txt".
> > >
> > > This does work, but Cygwin's path handling code understands
> > > only ".." and "." . If it get three dots in a raw and they
> > > appear before the last '/' char, Cygwin returns ENOENT.
> >
> > Fixed in CVS now.
> 
> Does it fix the following:
> 
> [EMAIL PROTECTED] ~
> $ cd /usr/bin../

No, it fixes the more than two leading dots problem.  The above is
a genuin windows problem as you noted in your previous mail.  I don't
know how to fix this without noticeably slowing down the path conv
routine.

Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Developermailto:[EMAIL PROTECTED]
Red Hat, Inc.

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



Re: 1.5.1: can't open files beginning with "..."

2003-10-25 Thread Igor Pechtchanski
On Sun, 26 Oct 2003, Corinna Vinschen wrote:

> On Sat, Oct 25, 2003 at 10:58:10PM +0200, Pavel Tsekov wrote:
>
> > On Sat, 25 Oct 2003, Corinna Vinschen wrote:
> >
> > > On Sat, Oct 25, 2003 at 12:04:14AM +0200, Pavel Tsekov wrote:
> > > > > Chris Moore wrote:
> > > > > > I have a file on my PC called "...foo.txt".
> > > >
> > > > This does work, but Cygwin's path handling code understands
> > > > only ".." and "." . If it get three dots in a raw and they
> > > > appear before the last '/' char, Cygwin returns ENOENT.
> > >
> > > Fixed in CVS now.
> >
> > Does it fix the following:
> >
> > [EMAIL PROTECTED] ~
> > $ cd /usr/bin../
>
> No, it fixes the more than two leading dots problem.  The above is
> a genuin windows problem as you noted in your previous mail.  I don't
> know how to fix this without noticeably slowing down the path conv
> routine.
>
> Corinna

That's what managed mode would be perfect for.  It would need something
like the patch below:

Index: winsup/cygwin/path.cc
===
RCS file: /cvs/src/src/winsup/cygwin/path.cc,v
retrieving revision 1.277
diff -u -p -r1.277 path.cc
--- winsup/cygwin/path.cc   25 Oct 2003 16:12:45 -  1.277
+++ winsup/cygwin/path.cc   26 Oct 2003 01:35:16 -
@@ -1178,6 +1178,11 @@ special_name (const char *s, int inc = 1
   if (strpbrk (s, special_chars))
 return !strncasematch (s, "%2f", 3);

+  if (strcasematch (s, ".") || strcasematch (s, ".."))
+return false;
+  if (s[strlen (s)-1] == '.')
+return -1;
+
   const char *p;
   if (strcasematch (s, "conin$") || strcasematch (s, "conout$"))
 return -1;

-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_[EMAIL PROTECTED]
 |,4-  ) )-,_. ,\ (  `'-'   Igor Pechtchanski, Ph.D.
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton

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