Re: Support for Baud Rates above 250000 baud?

2007-01-10 Thread Corinna Vinschen
On Jan 10 10:18, David le Comte wrote:
> I'm wondering if the most general way of modifying fhandler_serial.cc 
> (and cf[io]speed()?) is to do what SetCommState() is doing, ie,
> if the value that is passed is NOT equivalent to one of the Bn
> "define"s, then assume it is a literal speed and pass that.

Cygwin does this already for 230400 baud.  See fhandler_serial.cc.

> This would mean changing "speed_t" to be an unsigned int (can we
> now assume that is 32bit?) rather than char?, and removing and/or
> changing any parsing that cfset[io]speed() are doing.

No.  This would needlessly break backward compatibility.  The way to
go is to define new Bxxx values in termios.h and support them in
fhandler_serial.cc, which is what Brian already said.
What's left at this point is just http://cygwin.com/acronyms/#SHTDI.
See http://cygwin.com/contrib.html.


Corinna


-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader  cygwin AT cygwin DOT com
Red Hat

--
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: bug in syscalls.cc sync()

2007-01-10 Thread Corinna Vinschen
On Jan  9 13:39, Howard Chu wrote:
> I was just browsing the CVSweb repository looking at the sync()
> implementation and noticed this small typo. It's not worth the trouble
> for me to download the CVS repository just for this:
> 
> /* sync: SUSv3 */
> extern "C" void
> sync ()
> {
>  char vol[CYG_MAX_PATH];
> 
>  if (wincap.has_guid_volumes ()) /* Win2k and newer */
>{
>  char a_drive[CYG_MAX_PATH] = {0};
>  char b_drive[CYG_MAX_PATH] = {0};
> 
>  if (is_floppy ("A:"))
>GetVolumeNameForVolumeMountPointA ("A:\\", a_drive, CYG_MAX_PATH);
>  if (is_floppy ("B:"))
>GetVolumeNameForVolumeMountPointA ("B:\\", a_drive, CYG_MAX_PATH);
> 
> Notice the last line there - "a_drive" should be "b_drive".

Ouch.  Thanks for the report, I applied a fix to CVS.


Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader  cygwin AT cygwin DOT com
Red Hat

--
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: New procps package filename is procps-3.2.7-1-bin.tar.bz2 instead of procps-3.2.7-1.tar.bz2

2007-01-10 Thread Corinna Vinschen
On Jan 10 07:39, Dr. Volker Zell wrote:
> see subject

Thanks, fixed on sourceware.


Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader  cygwin AT cygwin DOT com
Red Hat

--
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.7.0 CVS mmap failure

2007-01-10 Thread Corinna Vinschen
On Jan  5 20:23, Corinna Vinschen wrote:
> On Jan  5 12:42, Brian Ford wrote:
> > On Fri, 5 Jan 2007, Corinna Vinschen wrote:
> > So, it does indeed look taken.
> 
> Too bad.
> 
> > > Actually this shows a problem in the mmap implementation with respect to
> > > MEM_TOP_DOWN.  I think, what mmap should actually do is to create a
> > > lightweight MAP_RESERVE anonymous mapping of the whole requested mapping
> > > size, then close it again and then reopen it with the address it got
> > > in this first try.  This would probably ensure that the subsequent two
> > > mapping will work.
> > 
> > I don't know what mmap magic Cygwin uses internally to do this, but can't
> > you just map the big region, then overmap the disk file without the map,
> > unmap, remap, remap?
> 
> "overmap"?  -v please?

Since overmapping doesn't work on Windows, unfortunately, I implemented
the above mentioned technique, which isn't much code anyway.  It
reserves a memory lot big enough to fit in the whole mapping, memorizes
the address, free's the memory again and then uses the new address in
the subsequent real mappings.

This should work (knock on wood) on all systems now.  My testcases still
work on my 512 MB machine, so I'd appreciate if you could give the latest
snapshot a try on /3GB enabled machines.


Corinna


-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader  cygwin AT cygwin DOT com
Red Hat

--
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: username should be lower-case for $USER

2007-01-10 Thread Dave Korn
On 09 January 2007 22:15, David Smiley wrote:

> I forgot to add, I log into a windows domain and so I can't set the case.
> Perhaps this issue only relates to windows domain logins.  Maybe they are
> case insensitive because when I log into the domain, I ALWAYS specify it in
> lower case.  I don't think I've ever seen it presented to me (in Windows) as
> upper case.  Yet in CYGWIN, $USER=DSMILEY.  If domain logins are case
> *in*sensitive (appears likely), then it would seem to me that it should be
> normalized to lower-case for use in CYGWIN.

  That's a non-sequitur.  It should not be /normalised/; it should be
*canonicalised*.  And the canonical definition is whatever your domain server
reports to cygwin that your user name is.  Case-preserving but
case-insensitive, remember?

  Since it's insensitive, just hand-edit your /etc/passwd to look the way you
like and you're done.

  BTW, I log-on to a domain, and my $USER name has always been lower-case.
It's just the way your admin has created your account.

cheers,
  DaveK
-- 
Can't think of a witty .sigline today


--
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: Fw: help win winxp install

2007-01-10 Thread Dave Korn
On 10 January 2007 01:43, Larry Hall (Cygwin) wrote:



> It's not old code but gcc is a long time package.  Looks like it incorrectly
> picked up cygintl-3.dll for cc1.exe the last time it was built.  But looking
> at the setup.hint files, it correctly says that it depends on it.  So if you
> were installing gcc, you would get the libintl3 package if it existed on the
> mirror you chose.
> 
> I do notice, however, that gcc has a dependency on cygintl-8.dll but doesn't
> show the dependency in the setup.hint file.  Dave, can you review this and
> see if the setup.hint files need to be updated?

  I should probably roll a fresh release that consistently uses -8 throughout, 
but that would mean finding out what caused autotools to pick different libintl 
versions when I built the thing, so I'll fix the setup.hint files shortly as a 
stop-gap.

cheers,
  DaveK
-- 
Can't think of a witty .sigline today


--
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: windows bluescreens while looking for ANSI C headers

2007-01-10 Thread Dave Korn
On 10 January 2007 04:30, Morgan Gangwere wrote:

> is this an issue with the configure script or make?

  No.  It is impossible for a user-mode program to cause a BSoD.  Only a
device driver or kernel bug can cause that.


cheers,
  DaveK
-- 
Can't think of a witty .sigline today


--
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: [ANNOUNCEMENT] Updated: git-1.4.4.4-1

2007-01-10 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

According to Dr. Volker Zell on 1/9/2007 11:38 PM:
>> Eric Blake writes:
> 
> > A new release of git, 1.4.4.4-1, has been uploaded, replacing 1.4.4.3-1 
> as
> > the current version.
> 
> No big deal but I'm wondering why all files are listed twice in
> 
>  o /usr/lib/perl5/vendor_perl/5.8/cygwin/auto/Git/.packlist

You've got me.  I suspect it may be a (harmless) upstream bug in the way
that git is using perl's makefile-making facilities.  Or there may be a
cygport issue when using 'inherit perl'.

- --
Don't work too hard, make some time for fun as well!

Eric Blake [EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFpOPl84KuGfSFAYARAjqzAJ9JOVk1UmPP6bFMrWUi2b2reK0SGwCffCAJ
WICFEBjyoxnzzI0y4RNbxtc=
=77MU
-END PGP SIGNATURE-

--
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: Link errors related to vtable

2007-01-10 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

According to George on 1/9/2007 11:02 PM:
> Hi,
> I am getting link errors like below when I compile my
> code(systemc) which is  on cygwin 1.5.23 with gcc
> 3.4.4
> (systemc is a c++ class library)

No wonder.  C++ code MUST be compiled with g++, not gcc (unless you REALLY
know what you are doing).

- --
Don't work too hard, make some time for fun as well!

Eric Blake [EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFpOQi84KuGfSFAYARAncjAJ426bVTzwsm0bXr6QzIgflGRPwhEwCfeAAL
LtMK9kWRBCxM3/6oAA4/95M=
=aK6S
-END PGP SIGNATURE-

--
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: activestate perl on cygwin

2007-01-10 Thread Andrew DeFaria

Kevin T Cella wrote:
I don't actually install through cygwin, but use the ppm installer 
from Activestate. 
Why people would want to use a proprietary Perl with a proprietary 
installer is beyond me. Let me ask you a question, what happens when you 
call setsid in this ActiveState Perl? Anyways...
I still need to know how to solve the issue that occurs with the 
command I mentioned in my original post. Using the version of perl
installed with cygwin is not really an option since I already have 
scripts written that utilize windows specific modules.

I betcha there are Cygwin versions of those "windows specific modules"...

Best way to think of things IMHO, is either go totally into Cygwin or 
get totally out of Cygwin, WRT Perl. Said differently, if you're gonna 
be using Activestate Perl then start a cmd shell!


I'm not sure I agree with your script's premise which states in the 
comment "Cygwin passes 'cygwin style' paths to the program in the #! 
statement". I don't believe that is true. Cygwin passes what you specify 
at the command line. Cygwin doesn't really know, for example, given a 
"myperlscript.pl foo/bar" whether "foo/bar" is supposed to represent a 
path or just a set of characters. That's for your Perl script to decide 
and act upon. Of course if you are giving "cygwin style" paths on the 
command line then I'd expect them to come in in that manner. Stated 
differently, if you type "myperlscript.pl /cygdrive/d/foo.dat" then I'd 
expect /cygdrive/d/foo.data. Perhaps you should instead specify 
"myperlscript.pl D:\\foo.dat"?


If you are saying that you like using the Cygwin bash prompt and like 
using say file name completion to help specify file paths to ActiveState 
Perl scripts then I would suggest this: Make your ActiveState Perl 
script aware that arguments it has that represent file paths may be 
coming in as a Cygwin path and have it convert the path to a Windows 
path in the Perl script. When I write Perl scripts I tend to write them 
so that they work on Linux/Unix and Windows using Cygwin or just plain 
Windows (and where possible totally neutral) and I usually leave open 
the possibility that a file path may be of Unix or Windows style and act 
accordingly.


--

Andrew DeFaria 
A good scapegoat is almost as good as a solution.


--
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: activestate perl on cygwin

2007-01-10 Thread Igor Peshansky
On Mon, 8 Jan 2007, Kevin T Cella wrote:

> I understand the trouble with using Activestate perl on cygwin is the
> path conversion problem. Searching online I found the following wrapper
> script useful for most perl commands:
>
>   #! /bin/sh
>
>   # This is necessary to make perl work with cygwin.  Cygwin passes
>   # "cygwin style" paths to the program in the #! statement and 
> ActiveState
>   # perl does not know what /cygwin/d/... means.
>   #
>   # So, we put #!/usr/local/bin/perl in the perl script and this is called
>   # This routine translates the path name to something of type d:/
>   #
>   args=""
>   while [ $# -gt 0 ]
>   do
>   var="$1"
>   shift
>
>   if test "`echo $var | grep '/'`" = "$var"
>   then
>   # cygpath does the /cygwin/d/ to d:/ conversion
>   var=`cygpath -w $var`
>
>   # Then we have to swap \ for / (extra \ needed because the
>   # shell makes a first pass at removing the \.
> #
>   var=`echo "$var" | sed 's/\\\/\\//g'`
>   fi
>   args="$args $var"
>   done
>
>   # Finally the command is to call perl with the name of the script and 
> the args.
>   #
>   /c/Perl/bin/perl.exe $args
>
> An example of one that does not work is as follows:
>
>   perl -e 'print join "\n", @INC, "\n";'
>
> For some reason, the script above strips the single quotes from the
> command and therefore does not execute the command properly. Please
> advise.

The reason the script above strips the single quotes from the command is
because it's buggy.  Not only that, it'll be pretty slow, as it'll spawn a
'test' and a 'sed' for every argument.  And, judging from the comments,
its intended purpose is to allow invoking perl with a script filename, not
with a literal script.  Oh, and there's a typo in the comment --
"/cygwin/d" should be "/cygdrive/d".

However, none of these issues are Cygwin-specific (with a possible
exceptions of the typo and using "cygpath -m" instead of "cygpath -w" to
save yourself the trouble of the extra backslash translation).  Any good
tutorial on bash should show you how to properly quote the arguments.
You may also want to search the Cygwin list archives, where this exact
issue comes up once in a while (usually in the context of paths with
spaces).
HTH,
Igor
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED] | [EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_Igor Peshansky, Ph.D. (name changed!)
 |,4-  ) )-,_. ,\ (  `'-'   old name: Igor Pechtchanski
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

Freedom is just another word for "nothing left to lose"...  -- Janis Joplin

--
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: activestate perl on cygwin

2007-01-10 Thread Igor Peshansky
On Wed, 10 Jan 2007, Andrew DeFaria wrote:

> I'm not sure I agree with your script's premise which states in the
> comment "Cygwin passes 'cygwin style' paths to the program in the #!
> statement". I don't believe that is true. Cygwin passes what you specify
> at the command line.

That part is actually correct.  Save the following two files, add the
directory where you saved test_script.wr to $PATH, and then invoke it by
name to see what I mean.
--- BEGIN /usr/local/bin/wraptest ---
#!/bin/sh
echo "$@"
 END /usr/local/bin/wraptest 
--- BEGIN test_script.wr 
#!/usr/local/bin/wraptest
Doesn't matter what you put here...
 END test_script.wr -

FWIW, for the past few years I've been using the following script to allow
Windows programs in the shebang (#!) line:
- BEGIN /usr/local/bin/wrap -
#!/bin/sh
pname="$1"
fname="`cygpath -wi "$2"`"
shift 2 && exec "$pname" "$fname" "$@"
-- END /usr/local/bin/wrap --

A typical use would be as follows:

#!/usr/local/bin/wrap /cygdrive/c/perl/perl

which invokes ActiveState Perl with Win32 path to the current script and
with the rest of the arguments intact.
Igor
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED] | [EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_Igor Peshansky, Ph.D. (name changed!)
 |,4-  ) )-,_. ,\ (  `'-'   old name: Igor Pechtchanski
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

Freedom is just another word for "nothing left to lose"...  -- Janis Joplin

--
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: Link errors related to vtable

2007-01-10 Thread Dave Korn
On 10 January 2007 13:04, Eric Blake wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> According to George on 1/9/2007 11:02 PM:
>> Hi,
>> I am getting link errors like below when I compile my
>> code(systemc) which is  on cygwin 1.5.23 with gcc
>> 3.4.4
>> (systemc is a c++ class library)
> 
> No wonder.  C++ code MUST be compiled with g++, not gcc (unless you REALLY
> know what you are doing).

  I guess George does, since...

On 10 January 2007 06:03, George wrote:

> ---
> g++ -O3 -Wall -I. -I.. -I../../../include -L. -L..
> -L../../../lib-linux -o run.x packet.o
> packet_generator.o hub.o main.o -lsystemc -lm  2>&1 |
> c++filt
>
main.o:main.cpp:(.text$_ZN11packet_fifoC1EN7sc_core14sc_module_nameE[packet_fi
fo::packet_fifo(sc_core::sc_module_name)]+0x91):
> undefined reference to `VTT for packet_fifo'

  George, this will be hard for me to diagnose without an STC.  The first
thing you should do is read "6.4 Vague Linkage" in the gcc manual which
explains how and when gcc decides to emit the vtable for a class; then try
running nm over the object files and seeing if it's there in the expected one
or not.  Maybe there's a link-ordering problem or something.

  If you can produce an STC based only on snippets of main and packet_fifo I'd
be able to figure it out in more detail.

cheers,
  DaveK
-- 
Can't think of a witty .sigline today


--
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: Arkeia

2007-01-10 Thread Saro Engels

ignacious schrieb:

I'm working with Arkeia and I'm trying to get Cygwin on a windows xp client
to connect to the Linux backup server using SSH. Does anybody have
experience with this? I'm able to connect to the server but I can't get the
gui to come up. I can ping both ways and I've shut down firewalls on both
sides (This is just a test network). I thought SSH handles the exporting of
the Linux gui so it should be visible through Cygwin. Do I need to change
anything on the linux server?

Thanks


Do you have included ssh-option '-X'?
This is a common error I make.
(Just a thought...)
SE

--
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: Fw: help win winxp install

2007-01-10 Thread Larry Hall (Cygwin)

Dave Korn wrote:

On 10 January 2007 01:43, Larry Hall (Cygwin) wrote:




It's not old code but gcc is a long time package.  Looks like it
incorrectly picked up cygintl-3.dll for cc1.exe the last time it was
built.  But looking at the setup.hint files, it correctly says that it
depends on it.  So if you were installing gcc, you would get the libintl3
package if it existed on the mirror you chose.

I do notice, however, that gcc has a dependency on cygintl-8.dll but
doesn't show the dependency in the setup.hint file.  Dave, can you review
this and see if the setup.hint files need to be updated?


I should probably roll a fresh release that consistently uses -8
throughout, but that would mean finding out what caused autotools to pick
different libintl versions when I built the thing, so I'll fix the
setup.hint files shortly as a stop-gap.


Thanks Dave.  :-)

--
Larry Hall  http://www.rfk.com
RFK Partners, Inc.  (508) 893-9779 - RFK Office
216 Dalton Rd.  (508) 893-9889 - FAX
Holliston, MA 01746

_

A: Yes.

Q: Are you sure?

A: Because it reverses the logical flow of conversation.

Q: Why is top posting annoying in email?


--
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/



cygrunsrv interactive?

2007-01-10 Thread Max Kipness
Hello,

I've been trying to use CYGRUNSRV to run an application that runs in a
loop and basically just contacts a socket server every 15 seconds. I've
tried various options to install the service so that it can run as
SYSTEM and interactive.

When starting the app with an appropriate user in the domain or local
computer, the service runs fine, however when running it as SYSTEM with
or without INTERACTIVE set, it fails stating that the program has
terminated unexpectedly.

When I use another utility, RunAsSvc.exe, the same program runs just
fine as SYSTEM and INTERACTIVE. The only problem with this utility is
that even though it allows batch installation, it does not allow you to
set INTERACTIVE via batch commands, and CYGRUNSRV does.

Why would an app run with as a user, but not as SERVICE if the app runs
a infinite While loop?

Any tips to get this working?

Thanks,
Max



--
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.7.0 CVS mmap failure

2007-01-10 Thread Brian Ford
On Fri, 5 Jan 2007, Corinna Vinschen wrote:

> Actually this shows a problem in the mmap implementation with respect to
> MEM_TOP_DOWN.  I think, what mmap should actually do is to create a
> lightweight MAP_RESERVE anonymous mapping of the whole requested mapping
> size, then close it again and then reopen it with the address it got
> in this first try.  This would probably ensure that the subsequent two
> mapping will work.

Why MAP_RESERVE if the requested mapping is NO_RESERVE?  This is just
about whether you have swap (paging file) space initially committed or
not, right?

On Wed, 10 Jan 2007, Corinna Vinschen wrote:

> I implemented the above mentioned technique, which isn't much code
> anyway.  It reserves a memory lot big enough to fit in the whole
> mapping, memorizes the address, free's the memory again and then uses
> the new address in the subsequent real mappings.
>
> This should work (knock on wood) on all systems now.  My testcases still
> work on my 512 MB machine, so I'd appreciate if you could give the latest
> snapshot a try on /3GB enabled machines.

Yes, this fixes my STC and the application from which it was derived.
Thanks.

Sorry to dig up the dead, but I had a question about your statement here:

>From http://www.cygwin.com/ml/cygwin-developers/2004-03/msg00033.html

On Fri, 19 Mar 2004, Corinna Vinschen wrote:

> The 2nd problem: POSIX allows file mappings to exceed the file size,
> Windows doesn't.  If the code tries to map a bigger size, the file on
> disk is automatically extended to the size of the map.  The current
> solution restricts the mapping always to the end of the file, so that it
> isn't changed by the mapping size.  If the offset is beyond EOF, mmap
> fails with ENXIO.  My patch uses the AT_EXTENDABLE_FILE flag in a call
> to ZwMapViewOfSection which allows POSIX semantics.  But as you might
> guess, this has again a downside.  First, it only works since W2K,
> second and worse, it only works with PAGE_READWRITE mapping.  Neither
> PAGE_READONLY, nor PAGE_WRITECOPY (aka MAP_PRIVATE) are allowed.  Oh
> boy. While PAGE_READONLY can be managed by changing the page protection
> afterwards, I don't see a way to get it right for MAP_PRIVATE.

So you mean that POSIX specifies that when a file is mapped larger
than its size, as read only or private, the on disk file is actually
extended?  That would have been completely contrary to what I'd expect
from those two modes.  Otherwise, I don't understand this problem.

Also, couldn't Cygwin's mmap extend the file via other means before
mapping?

Also FYI:

You don't need more memory to enable /3GB on your machine.  That switch is
just about NT kernel vs. application virtual address space allocation (2G
kernel/2G application or 1G kernel/3G application).  If you ever want to
test this, just throw /3GB into your boot.ini and reboot.  To revert, just
do the opposite.

Note that for an application to actually see and use the extra 1G of
virtual address space, it must be compiled with the linker switch
--large-address-aware.  If not, to the application, it is supposed to
not see any difference.  But, prior to your mmap patch, it did.

Note also that we usually run with /3GB /Userva=2800, which means 1.2G
kernel/2.8G application, because we found that certain drivers need that
much kernel space to map their large PCI memories (video cards, image
processing boards, SCSI drivers, etc.)

The PAE stuff discussed by Christopher Layne in this thread does, however,
actually need that much memory for testing.

-- 
Brian Ford
Lead Realtime Software Engineer
VITAL - Visual Simulation Systems
FlightSafety International
the best safety device in any aircraft is a well-trained crew...



--
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: cygrunsrv interactive?

2007-01-10 Thread Igor Peshansky
On Wed, 10 Jan 2007, Max Kipness wrote:

> Hello,
>
> I've been trying to use CYGRUNSRV to run an application that runs in a
> loop and basically just contacts a socket server every 15 seconds. I've
> tried various options to install the service so that it can run as
> SYSTEM and interactive.
>
> When starting the app with an appropriate user in the domain or local
> computer, the service runs fine, however when running it as SYSTEM with
> or without INTERACTIVE set, it fails stating that the program has
> terminated unexpectedly.
>
> When I use another utility, RunAsSvc.exe, the same program runs just
> fine as SYSTEM and INTERACTIVE. The only problem with this utility is
> that even though it allows batch installation, it does not allow you to
> set INTERACTIVE via batch commands, and CYGRUNSRV does.
>
> Why would an app run with as a user, but not as SERVICE if the app runs
> a infinite While loop?
>
> Any tips to get this working?

Yes.  Start here:

> Problem reports:   http://cygwin.com/problems.html

In particular, the output of "cygcheck -svr" (attached to your reply, as
requested on the above page) would be helpful in diagnosing your problem.
HTH,
Igor
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED] | [EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_Igor Peshansky, Ph.D. (name changed!)
 |,4-  ) )-,_. ,\ (  `'-'   old name: Igor Pechtchanski
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

Freedom is just another word for "nothing left to lose"...  -- Janis Joplin

--
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: activestate perl on cygwin

2007-01-10 Thread moka

 Andrew DeFaria wrote:
...
>> I don't actually install through cygwin, but use the ppm installer
>> from Activestate.
>Why people would want to use a proprietary Perl with a proprietary
>installer is beyond me. Let me ask you a question, what happens when you
>call setsid in this ActiveState Perl? Anyways...
Well,  in my case when I make the call I run perl on Linux. Here I had
 to write a scripton a windows machine and before checking cygwin
 I checked activestate. Then I needed some modules, DBD:Orcale to be exact. This
was a HUGE pain to get it to work, as Activestate has no binary. After having
gone
 through this I got a further request: "can your script do some graphs to?"
Then I thought of grace which does not work under windows, hence
 cygwin. But then I remembered the Oracle pains and though" what it Oracle  has
a problem with cygwin or is a similar pain(I had some equally bad experience
 installing an oracle client on Linux), so since I'm no Oracle expert
 and would not have much help I decided not to mess with the perl+oracle DBD,
 hence installed the cygwin modules except perl. Ugly, but seems to work...

--
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: cygwin-email utility clipping attached zips

2007-01-10 Thread Joey Officer
I'm using it send attachments, but I would like to be able to send 
multiple attachments using a wildcard expression.  Unfortunately when I 
specify something like *.pdf , it only grabs the first PDF file within 
the directory.


my sample command line is something along the following:

$ email.exe [EMAIL PROTECTED] -s testing -a *.pdf < body.txt

This grabs files1.pdf but not files2.pdf or any other file.

Is anyone using email.exe to send multiple 'unknown' attachments?

zzapper wrote:

zzapper <[EMAIL PROTECTED]> wrote in
news:[EMAIL PROTECTED]: 


Hi
I'm using the following to send attachments from the cli, works fine
except for word Docs etc but zip files loose a few bytes

eg

-rwxr-xr-x  1 davidr None 161792 Dec  2 12:47 ../aaa/am4mar.doc 
(RECEIVED) -rwxrwxrwx+ 1 davidr None 161792 Feb 14  2006 am4mar.doc
(SENT) 

-rwxr-xr-x  1 davidr None 596312 Dec  2 12:44 ../aaa/xnews.ZIP  
(RECEIVED FILE BAD)

-rwxrwxrwx+ 1 davidr None 596319 Dec  1 17:48 xnews.ZIP  (SENT FILE)

email -b -n "DJR BACKUP" -f [EMAIL PROTECTED] -s "BACKUP: " [EMAIL PROTECTED]
-- attach xnews.zip



Is anyone else using the email utility to send attachments, successfully or 
otherwise?






--
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.7.0 CVS mmap failure

2007-01-10 Thread Corinna Vinschen
On Jan 10 09:37, Brian Ford wrote:
> On Fri, 5 Jan 2007, Corinna Vinschen wrote:
> 
> > Actually this shows a problem in the mmap implementation with respect to
> > MEM_TOP_DOWN.  I think, what mmap should actually do is to create a
> > lightweight MAP_RESERVE anonymous mapping of the whole requested mapping
> > size, then close it again and then reopen it with the address it got
> > in this first try.  This would probably ensure that the subsequent two
> > mapping will work.
> 
> Why MAP_RESERVE if the requested mapping is NO_RESERVE?  This is just
> about whether you have swap (paging file) space initially committed or
> not, right?

MAP_RESERVE is Windows speak, NO_RESERVE is POSIX speak.  Using the same
term doesn't always mean the same.  The MSDN description of VirtualAlloc
is very helpful here.

> > This should work (knock on wood) on all systems now.  My testcases still
> > work on my 512 MB machine, so I'd appreciate if you could give the latest
> > snapshot a try on /3GB enabled machines.
> 
> Yes, this fixes my STC and the application from which it was derived.
> Thanks.

Glad to hear.

> > The 2nd problem: POSIX allows file mappings to exceed the file size,
> > Windows doesn't.  If the code tries to map a bigger size, the file on
> > disk is automatically extended to the size of the map.  The current
> > solution restricts the mapping always to the end of the file, so that it
> > isn't changed by the mapping size.  If the offset is beyond EOF, mmap
> > fails with ENXIO.  My patch uses the AT_EXTENDABLE_FILE flag in a call
> > to ZwMapViewOfSection which allows POSIX semantics.  But as you might
> > guess, this has again a downside.  First, it only works since W2K,
> > second and worse, it only works with PAGE_READWRITE mapping.  Neither
> > PAGE_READONLY, nor PAGE_WRITECOPY (aka MAP_PRIVATE) are allowed.  Oh
> > boy. While PAGE_READONLY can be managed by changing the page protection
> > afterwards, I don't see a way to get it right for MAP_PRIVATE.
> 
> So you mean that POSIX specifies that when a file is mapped larger
> than its size, as read only or private, the on disk file is actually
> extended?  That would have been completely contrary to what I'd expect
> from those two modes.  Otherwise, I don't understand this problem.

Read again.  It's the contrary, as you'd expected.  Briefly, POSIX allows
mappings beyond EOF w/o extending the file size, Windows doesn't.
There's a native NT flag called AT_EXTENDABLE_FILE which allows POSIX
semantics, but only starting with W2K, and only with PAGE_READWRITE, not
with PAGE_WRITECOPY page protection.  PAGE_WRITECOPY is basically what
POSIX calls MAP_PRIVATE, so the AT_EXTENDABLE_FILE flag works only 50/50.

> Also FYI:
> 
> You don't need more memory to enable /3GB on your machine.

Ok, thanks for the info.


Corinna


-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader  cygwin AT cygwin DOT com
Red Hat

--
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: cygwin-email utility clipping attached zips

2007-01-10 Thread Dave Korn
On 10 January 2007 16:03, Joey Officer wrote:

> I'm using it send attachments, but I would like to be able to send
> multiple attachments using a wildcard expression.  Unfortunately when I
> specify something like *.pdf , it only grabs the first PDF file within
> the directory.
> 
> my sample command line is something along the following:
> 
> $ email.exe [EMAIL PROTECTED] -s testing -a *.pdf < body.txt
> 
> This grabs files1.pdf but not files2.pdf or any other file.
> 
> Is anyone using email.exe to send multiple 'unknown' attachments?

  You need a '-a' before /each/ of the filenames to attach.  Otherwise it'll
think they're recipient names.


cheers,
  DaveK
-- 
Can't think of a witty .sigline today


--
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: cygwin-email utility clipping attached zips

2007-01-10 Thread Dave Korn
On 10 January 2007 16:46, Dave Korn wrote:

> On 10 January 2007 16:03, Joey Officer wrote:
> 

>> my sample command line is something along the following:
>> 
>> $ email.exe [EMAIL PROTECTED] -s testing -a *.pdf < body.txt
>> 
>> This grabs files1.pdf but not files2.pdf or any other file.
>> 
>> Is anyone using email.exe to send multiple 'unknown' attachments?
> 
>   You need a '-a' before /each/ of the filenames to attach.  Otherwise it'll
> think they're recipient names.
> 

  Or you need to separate them with commas instead of spaces.


cheers,
  DaveK
-- 
Can't think of a witty .sigline today


--
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: cygwin-email utility clipping attached zips

2007-01-10 Thread Joey Officer
I spoke with Dean as well, the author, and he advised the same.  I wrote 
a little script that accomplishes what I need, and wanted to share it, 
pasted in line below:


email.bash
#!/bin/bash
export file=""
for x in *.pdf; do
export file=$file,$x
done
echo $file
email [EMAIL PROTECTED] -s test -a $file < sample.txt


Hope someone finds some use for it.

Dave Korn wrote:

On 10 January 2007 16:03, Joey Officer wrote:


I'm using it send attachments, but I would like to be able to send
multiple attachments using a wildcard expression.  Unfortunately when I
specify something like *.pdf , it only grabs the first PDF file within
the directory.

my sample command line is something along the following:

$ email.exe [EMAIL PROTECTED] -s testing -a *.pdf < body.txt

This grabs files1.pdf but not files2.pdf or any other file.

Is anyone using email.exe to send multiple 'unknown' attachments?


  You need a '-a' before /each/ of the filenames to attach.  Otherwise it'll
think they're recipient names.


cheers,
  DaveK


--
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: cygwin-email utility clipping attached zips

2007-01-10 Thread Saro Engels
I spoke with Dean as well, the author, and he advised the same.  I wrote 
a little script that accomplishes what I need, and wanted to share it, 
pasted in line below:


email.bash
#!/bin/bash
export file=""
for x in *.pdf; do
export file=$file,$x
done
echo $file
email [EMAIL PROTECTED] -s test -a $file < sample.txt



I think you should better use the following thing:
$ file=*.pdf; file=`echo $file | sed "s/ /,/"`
$ echo $file
$ email [EMAIL PROTECTED] -s test -a $file < sample.txt

your code will return a list starting with a comma:
$ echo $file
,file1.pdf,file2.pdf,file3.pdf...

See it as an improvement - I needed quite long for that part.
SE

--
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: cygwin-email utility clipping attached zips

2007-01-10 Thread Saro Engels

Saro Engels schrieb:
I spoke with Dean as well, the author, and he advised the same.  I 
wrote a little script that accomplishes what I need, and wanted to 
share it, pasted in line below:


email.bash
#!/bin/bash
export file=""
for x in *.pdf; do
export file=$file,$x
done
echo $file
email [EMAIL PROTECTED] -s test -a $file < sample.txt



I think you should better use the following thing:
$ file=*.pdf; file=`echo $file | sed "s/ /,/"`
$ echo $file
$ email [EMAIL PROTECTED] -s test -a $file < sample.txt

your code will return a list starting with a comma:
$ echo $file
,file1.pdf,file2.pdf,file3.pdf...

See it as an improvement - I needed quite long for that part.
SE


I wasn't right:
It should be:
$ file=*.pdf; file=`echo $file | sed "s/ /,/g"`
$ echo $file
$ email [EMAIL PROTECTED] -s test -a $file < sample.txt

;-)
SE


--
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: cygwin-email utility clipping attached zips

2007-01-10 Thread Brian Dessent
Saro Engels wrote:

> I wasn't right:
> It should be:
> $ file=*.pdf; file=`echo $file | sed "s/ /,/g"`
> $ echo $file
> $ email [EMAIL PROTECTED] -s test -a $file < sample.txt

Firstly this can be simplified to simply:

email [EMAIL PROTECTED] -s test -a $(echo *.pdf|sed "s/ /,/g") http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



spawnvp is "unbreakable" for non-cygwin programs - Was: spawn doesn't return for non-cygwin programs (and also is unbreakable)

2007-01-10 Thread Volker Quetschke
Christopher Faylor wrote:
> On Mon, Dec 25, 2006 at 04:02:20PM -0500, Volker Quetschke wrote:
>> I recently tripped over the following problem: If a non-cygwin
>> program gets started by cygwin's spawnvp() the spawn doesn't return
>> until the started program returns.
> 
> Should be fixed in the latest snapshot.  Thanks for the test case.

Thanks! Now spawnvp() really behaves like spawn.

As reported in the original mail, but only being a minor nuisance,
the spawned child is still not interruptible by CTRL-c when
CYGWIN=tty in bash from cmd.exe is used, or when rxvt is used.

The symptoms changed slightly compared to before the fix
but essentially the spawned child is still unbreakable.

Use the files from the original email and try hitting CTRL-c while
breaktestwin.exe is running from a tty enabled shell.
The SIGINT will be handled for the parent but not passed down to the
child (As I learned this is/should be done by the shell.)

Thanks for the quick fix of the major part of the problem

  Volker

P.S.: I'm using the current snapshot:
$ uname -a
CYGWIN_NT-5.1 Turion 1.7.0s(0.161/4/2) 20070110 09:38:11 i686 Cygwin

-- 
PGP/GPG key  (ID: 0x9F8A785D)  available  from  wwwkeys.de.pgp.net
key-fingerprint 550D F17E B082 A3E9 F913  9E53 3D35 C9BA 9F8A 785D



signature.asc
Description: OpenPGP digital signature


Re: spawnvp is "unbreakable" for non-cygwin programs - Was: spawn doesn't return for non-cygwin programs (and also is unbreakable)

2007-01-10 Thread Christopher Faylor
On Wed, Jan 10, 2007 at 12:53:31PM -0600, Volker Quetschke wrote:
>Christopher Faylor wrote:
>>On Mon, Dec 25, 2006 at 04:02:20PM -0500, Volker Quetschke wrote:
>>>I recently tripped over the following problem: If a non-cygwin
>>>program gets started by cygwin's spawnvp() the spawn doesn't return
>>>until the started program returns.
>> 
>>Should be fixed in the latest snapshot.  Thanks for the test case.
>
>Thanks! Now spawnvp() really behaves like spawn.
>
>As reported in the original mail, but only being a minor nuisance,
>the spawned child is still not interruptible by CTRL-c when
>CYGWIN=tty in bash from cmd.exe is used, or when rxvt is used.

Since this isn't really a linux feature, I am willing to consider it a
feature that spawned non-cygwin processes do not exit when you hit
CTRL-C under control of a tty.

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: cygwin-email utility clipping attached zips

2007-01-10 Thread Matt Wozniski

Firstly this can be simplified to simply:

email [EMAIL PROTECTED] -s test -a $(echo *.pdf|sed "s/ /,/g") 

But that won't work for files with commas in the name!  (Rare, but it
can happen...)  I'd prefer something like

email [EMAIL PROTECTED] -s test -a "$(ls -1 *.pdf | tr '\n' ',' )" < sample.txt

Which would only fail if the file name had embedded newlines.  I
suppose `email' probably wouldn't be able to process a file with an
embedded comma in the name one way or the other, but I find this sort
of solution more portable than messing with IFS.

~Matt

--
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: cygwin-email utility clipping attached zips

2007-01-10 Thread Joey Officer

And thank you as well Brian.

I'm still fairly new to bash scripting, and am unfamiliar with all of 
the tools that make our lives easier.


Thanks for the additions.

Regards,
joey


Brian Dessent wrote:

Saro Engels wrote:


I wasn't right:
It should be:
$ file=*.pdf; file=`echo $file | sed "s/ /,/g"`
$ echo $file
$ email [EMAIL PROTECTED] -s test -a $file < sample.txt


Firstly this can be simplified to simply:

email [EMAIL PROTECTED] -s test -a $(echo *.pdf|sed "s/ /,/g") http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



--
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: How to resolve hiccups by patch program?

2007-01-10 Thread Markus Elfring



Does running d2u over the rejected hunk fix your problem?


No luck on my system ...

$ uname -a
CYGWIN_NT-5.1 sonne 1.5.23(0.156/4/2) 2006-12-19 10:52 i686 Cygwin

$ cd /cygdrive/e/Projekte/Asterisk/Probe
$ d2u -U app_db.c const4.patch.part010
app_db.c: done.
const4.patch.part010: done.

$ patch -l -r test8160.rej app_db.c const4.patch.part010
patching file app_db.c
Hunk #1 FAILED at 49.
1 out of 1 hunk FAILED -- saving rejects to file test8160.rej



Does generating the patch by the commandline svn client under cygwin generate
a patch in the correct format for the patch utility under cygwin?


$ cd /cygdrive/e/Projekte/Asterisk/8160/
$ svn --version
svn, version 1.4.2 (r22196)
  compiled Dec  2 2006, 14:28:55
[...]
$ svn update
Fetching external item into 'menuselect'

Fetching external item into 'menuselect/mxml'
External at revision 17.

At revision 100.
At revision 50443.

$ svn diff apps/app_db.c > ../Probe/try_const.diff
$ cd ../Probe/
$ patch -r test8160b.rej app_db.c try_const.diff
patching file app_db.c
Hunk #1 FAILED at 49.
1 out of 1 hunk FAILED -- saving rejects to file test8160b.rej


Which next steps do you imagine now?

Regards,
Markus

--
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: Re: username should be lower-case for $USER

2007-01-10 Thread Irwin, Doug
...snip...
> If the user ID is created with lower-cased letters, it will be stored
> and reported in lower-cased letters.  At least that is how the Windows
> 2003 Active Directory where I work expresses its user IDs.
...snip...

U-huh. Just played around in the GUI and that seems to be true.  I
reckon 
I was getting confused with some APIs returning in upper.  The
comparisons
Certainly are case insensitive, tho.

TFT!

-doug

--
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: activestate perl on cygwin

2007-01-10 Thread Kevin T Cella
Win32::Mechanize
Win32::OLE
Win32::GuiTest
Win32::Process

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
Yitzchak Scott-Thoennes
Sent: Tuesday, January 09, 2007 10:58 PM
To: cygwin@cygwin.com
Subject: Re: activestate perl on cygwin

Kevin T Cella  nycap.rr.com> writes:
> Using the version of perl installed with cygwin is not really an option
> since I already have scripts written that utilize windows specific
modules.

Out of curiousity, which modules are those?


--
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/


--
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/



dealing with spaces in paths

2007-01-10 Thread David Bear
I'm attempting to script building mount points in order to handle spaces in
file names. So I do something like this:

homedir=`cygpath -w $USERPROFILE`
mount -buf "\"$homedir\" $HOME/myh

When I echo the mount command to the syntax looks correct.

However, when I actually run the mount command via the script I get the
message there are not enough parameters, like mount is not getting what it
needs.

Dealing with spaces is a huge pain... but this seems be one way to handle
them. Any idea why mount is unhappy when scripted as shown above?

-- 
--
David Bear
College of Public Programs at Arizona State University


--
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: activestate perl on cygwin

2007-01-10 Thread Kevin T Cella
Offer an alternative. As I mentioned in my original post, I got this script
online. In using it I found it was not sufficient, I started this thread in
the hopes that someone would provide me with a better wrapper script.
Instead I got a bunch of replies about how it is a bad idea to use
Activestate with cygwin. My scripts are written to make my life on Windows
easier, so that means using Windows specific code to automate common tasks.
Ideally I'd prefer to stay in a pure Linux environment, but for reasons I do
not need to go into, I am stuck with Windows. It was my understanding that
the intent of this mailing list was to offer a place to discuss issues
involving cygwin and develop solutions to those problems. Seeing as I do not
have a whole lot of free time to research a better solution, I hoped a quick
answer would be provided via this medium. While I appreciate the suggestions
that have been made on this thread, I want to install two copies of the perl
interpreter or port my existing scripts to cygwin as that appears to be the
compromise. Are there any other ideas?

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
Igor Peshansky
Sent: Wednesday, January 10, 2007 9:06 AM
To: Kevin T Cella
Cc: cygwin@cygwin.com
Subject: Re: activestate perl on cygwin

On Mon, 8 Jan 2007, Kevin T Cella wrote:

> I understand the trouble with using Activestate perl on cygwin is the
> path conversion problem. Searching online I found the following wrapper
> script useful for most perl commands:
>
>   #! /bin/sh
>
>   # This is necessary to make perl work with cygwin.  Cygwin passes
>   # "cygwin style" paths to the program in the #! statement and
ActiveState
>   # perl does not know what /cygwin/d/... means.
>   #
>   # So, we put #!/usr/local/bin/perl in the perl script and this is
called
>   # This routine translates the path name to something of type d:/
>   #
>   args=""
>   while [ $# -gt 0 ]
>   do
>   var="$1"
>   shift
>
>   if test "`echo $var | grep '/'`" = "$var"
>   then
>   # cygpath does the /cygwin/d/ to d:/ conversion
>   var=`cygpath -w $var`
>
>   # Then we have to swap \ for / (extra \ needed because the
>   # shell makes a first pass at removing the \.
> #
>   var=`echo "$var" | sed 's/\\\/\\//g'`
>   fi
>   args="$args $var"
>   done
>
>   # Finally the command is to call perl with the name of the script
and the args.
>   #
>   /c/Perl/bin/perl.exe $args
>
> An example of one that does not work is as follows:
>
>   perl -e 'print join "\n", @INC, "\n";'
>
> For some reason, the script above strips the single quotes from the
> command and therefore does not execute the command properly. Please
> advise.

The reason the script above strips the single quotes from the command is
because it's buggy.  Not only that, it'll be pretty slow, as it'll spawn a
'test' and a 'sed' for every argument.  And, judging from the comments,
its intended purpose is to allow invoking perl with a script filename, not
with a literal script.  Oh, and there's a typo in the comment --
"/cygwin/d" should be "/cygdrive/d".

However, none of these issues are Cygwin-specific (with a possible
exceptions of the typo and using "cygpath -m" instead of "cygpath -w" to
save yourself the trouble of the extra backslash translation).  Any good
tutorial on bash should show you how to properly quote the arguments.
You may also want to search the Cygwin list archives, where this exact
issue comes up once in a while (usually in the context of paths with
spaces).
HTH,
Igor
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED] |
[EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_Igor Peshansky, Ph.D. (name
changed!)
 |,4-  ) )-,_. ,\ (  `'-'   old name: Igor Pechtchanski
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

Freedom is just another word for "nothing left to lose"...  -- Janis Joplin

--
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/


--
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: activestate perl on cygwin

2007-01-10 Thread Igor Peshansky
Ugh, top-posting...  Reformatted.

On Wed, 10 Jan 2007, Kevin T Cella wrote:

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
> Igor Peshansky
> Sent: Wednesday, January 10, 2007 9:06 AM
> To: Kevin T Cella
> Cc: [EMAIL PROTECTED]

.  Thanks.

> Subject: Re: activestate perl on cygwin
>
> > On Mon, 8 Jan 2007, Kevin T Cella wrote:
> >
> > > I understand the trouble with using Activestate perl on cygwin is
> > > the path conversion problem. Searching online I found the following
> > > wrapper script useful for most perl commands:
> > >[snip buggy script]
> > >
> > > An example of one that does not work is as follows:
> > >
> > >   perl -e 'print join "\n", @INC, "\n";'
> > >
> > > For some reason, the script above strips the single quotes from the
> > > command and therefore does not execute the command properly. Please
> > > advise.
> >
> > The reason the script above strips the single quotes from the command
> > is because it's buggy.
> > [snip]
> >
> > However, none of these issues are Cygwin-specific (with a possible
> > exceptions of the typo and using "cygpath -m" instead of "cygpath -w" to
> > save yourself the trouble of the extra backslash translation).  Any good
> > tutorial on bash should show you how to properly quote the arguments.
> > You may also want to search the Cygwin list archives, where this exact
> > issue comes up once in a while (usually in the context of paths with
> > spaces).
>
> Offer an alternative. As I mentioned in my original post, I got this
> script online. In using it I found it was not sufficient, I started this
> thread in the hopes that someone would provide me with a better wrapper
> script.

I did.  .

> Instead I got a bunch of replies about how it is a bad idea to
> use Activestate with cygwin. My scripts are written to make my life on
> Windows easier, so that means using Windows specific code to automate
> common tasks. Ideally I'd prefer to stay in a pure Linux environment,
> but for reasons I do not need to go into, I am stuck with Windows. It
> was my understanding that the intent of this mailing list was to offer a
> place to discuss issues involving cygwin and develop solutions to those
> problems. Seeing as I do not have a whole lot of free time to research a
> better solution, I hoped a quick answer would be provided via this
> medium. While I appreciate the suggestions that have been made on this
> thread, I want to install two copies of the perl interpreter or port my
> existing scripts to cygwin as that appears to be the compromise. Are
> there any other ideas?

Rant aside, there is nothing Cygwin-specific about writing such a wrapper
script.  As I said, any good bash tutorial would have contained enough
information for you to write one.  Since this is not a bash support list,
discussion of techniques for making such scripts work is off-topic.

Besides, it's been discussed to death at least 3 times that I recall --
and it's all in the archives of this very list.  The script in my message
above has definitely been posted before, and even in a similar context.
In fact, that discussion is the 5th match when searching the list archives
for "activestate wrapper", and the 1st (yes, first) match when Googling
for "activestate wrapper site:cygwin.com inurl:ml" (or even for
"activestate wrapper cygwin").  That's why we have the web archives -- to
hopefully avoid rehashing the same issues over and over again.

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

Freedom is just another word for "nothing left to lose"...  -- Janis Joplin

--
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: dealing with spaces in paths

2007-01-10 Thread Larry Hall (Cygwin)

David Bear wrote:

I'm attempting to script building mount points in order to handle spaces in
file names. So I do something like this:

homedir=`cygpath -w $USERPROFILE`
mount -buf "\"$homedir\" $HOME/myh

When I echo the mount command to the syntax looks correct.

However, when I actually run the mount command via the script I get the
message there are not enough parameters, like mount is not getting what it
needs.

Dealing with spaces is a huge pain... but this seems be one way to handle
them. Any idea why mount is unhappy when scripted as shown above?



Quote $USERPROFILE.  Loose the '\'s around $homedir.  Make sure that there
is only 1 quote preceding $homedir.

--
Larry Hall  http://www.rfk.com
RFK Partners, Inc.  (508) 893-9779 - RFK Office
216 Dalton Rd.  (508) 893-9889 - FAX
Holliston, MA 01746

_

A: Yes.
> Q: Are you sure?
>> A: Because it reverses the logical flow of conversation.
>>> Q: Why is top posting annoying in email?

--
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: activestate perl on cygwin

2007-01-10 Thread Kevin T Cella

> .  Thanks.

Seeing as I do not know how to configure this, I cannot oblige.

>> Offer an alternative. As I mentioned in my original post, I got this
>> script online. In using it I found it was not sufficient, I started this
>> thread in the hopes that someone would provide me with a better wrapper
>> script.

> I did.  .

This also does not appear to work for the example I gave.

> ... there is nothing Cygwin-specific about writing such a wrapper
> script.  As I said, any good bash tutorial would have contained enough
> information for you to write one.  Since this is not a bash support list,
> discussion of techniques for making such scripts work is off-topic.

That's debatable, the distinction is vague at best.

> Besides, it's been discussed to death at least 3 times that I recall --
> and it's all in the archives of this very list.  The script in my message
> above has definitely been posted before, and even in a similar context.
> In fact, that discussion is the 5th match when searching the list archives
> for "activestate wrapper", and the 1st (yes, first) match when Googling
> for "activestate wrapper site:cygwin.com inurl:ml" (or even for
> "activestate wrapper cygwin").  That's why we have the web archives -- to
> hopefully avoid rehashing the same issues over and over again.

>> Seeing as I do not have a whole lot of free time to research a better
solution,
>> I hoped a quick answer would be provided via this medium.
[snip]

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

Freedom is just another word for "nothing left to lose"...  -- Janis Joplin

--
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/


--
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: dealing with spaces in paths

2007-01-10 Thread David Bear
Larry Hall (Cygwin) wrote:

> David Bear wrote:
>> I'm attempting to script building mount points in order to handle spaces
>> in file names. So I do something like this:
>> 
>> homedir=`cygpath -w $USERPROFILE`
>> mount -buf "\"$homedir\" $HOME/myh
>> 
>> When I echo the mount command to the syntax looks correct.
>> 
>> However, when I actually run the mount command via the script I get the
>> message there are not enough parameters, like mount is not getting what
>> it needs.
>> 
>> Dealing with spaces is a huge pain... but this seems be one way to handle
>> them. Any idea why mount is unhappy when scripted as shown above?
>> 
> 
> Quote $USERPROFILE.  Loose the '\'s around $homedir.  Make sure that there
> is only 1 quote preceding $homedir.
> 

since the homedir does have spaces in it, you need to enclose it in quotes
to prevent mount for assuming that each separate word in the path is a new
mount point. There is a sample of it at
http://comments.gmane.org/gmane.os.cygwin/54674

the \" escapes the " so that it is passed through to the command line the
script generates.

when I leave out the quotes -- I get multiple lines and multiple errors from
the script.

-- 
--
David Bear
College of Public Programs at Arizona State University


--
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: "cscope -d" can't find trailer offset if path contains space

2007-01-10 Thread Dave & Diane

Hi Fred,

Sorry for the delay - let me take a look at this in more detail. Given 
the sleuthing you've done I'll probably have to go back to the cscope 
owner at Bell-Labs.


Will keep you posted.

Dave
[mlcscope maintainer for cygwin]
Fred Ma wrote:


Bug fix request submitted for cscope via sourceforge:

This problem arose when using vim, but also appears when using "cscope
-d".  I get the error "cannot read trailer offset from file
cscope.out".  I browsed build.c to find that it is caused when reading
in a single number with fscanf.  To see what could be confusing
fscanf, I found the context of the "trailer offset" from
http://www1.bell-labs.com/project/wwexptools/cscope/cscope.html, which
shows that the number to be read occupies a single line along with
other space-delimited data, including the specification of the current
directory.  The space delimiting will get messed up if the current
directory contains spaces, which is often the case in Windows and
Cygwin (though it can also be the case in *nix).  P.S.: It also
happens with mlcscope.

--
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/





--

Diane & Dave
http://www.velvetstarbears.com/  http://www.kringlecottage.com/
Fortune: The difference between America and England is that the
English think 100 miles is a long distance and the Americans
think 100 years is a long time.


--
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: activestate perl on cygwin

2007-01-10 Thread Andrew DeFaria

[EMAIL PROTECTED] wrote:

Andrew DeFaria wrote:
...
I don't actually install through cygwin, but use the ppm installer 
from Activestate.
Why people would want to use a proprietary Perl with a proprietary 
installer is beyond me. Let me ask you a question, what happens when 
you call setsid in this ActiveState Perl? Anyways...
Well, in my case when I make the call I run perl on Linux. Here I had 
to write a scripton a windows machine and before checking cygwin I 
checked activestate. Then I needed some modules, DBD:Orcale to be exact.

Maybe you should have looked for DBD::Oracle instead? :-)

There's another thing. Why spend all kinds of $$$ on Oracle when one can 
use a fine database like MySQL for free?

This was a HUGE pain to get it to work, as Activestate has no binary.
Well I've never tried to get Oracle working through Cygwin (again I 
would just use MySQL) but you say it was a pain to get to work under 
ActiveState. Did you try to get it to work under Cygwin?
After having gone through this I got a further request: "can your 
script do some graphs to?" Then I thought of grace which does not work 
under windows, hence cygwin. But then I remembered the Oracle pains 
and though" what it Oracle has a problem with cygwin or is a similar 
pain(I had some equally bad experience installing an oracle client on 
Linux), so since I'm no Oracle expert
and would not have much help I decided not to mess with the 
perl+oracle DBD, hence installed the cygwin modules except perl. Ugly, 
but seems to work...
Aside from the grammatical errors my point still stands. AFAIK ppm, 
ActiveState's module installer, only works in ActiveState and I don't 
believe that ActiveState works on Linux, Unix and Macs, whereas the 
standard perl -MCPAN thing works on all of those and Windows too, under 
Cygwin of course. And to me Cygwin is precisely that bit of great glue 
that can make all of these platforms relatively the same and portable. 
As such, insisting on a product that only works on one platform and 
works differently than all other platforms just doesn't seem the right 
way to go. And yes I know many clients (I'm a contractor and have 
clients too - I'm not without experience here) don't, for some reason or 
another, trust or rely on Cygwin in this fashion to help "normalize" the 
environment so that many applications can be written and shared between 
the various platforms that these clients have. However that doesn't mean 
that this is not the best way to go, IMHO. YMMV, and all that.


--

Andrew DeFaria 
That's a hell of an ambition, to be mellow. It's like wanting to be 
senile. - Randy Newman



--
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: activestate perl on cygwin

2007-01-10 Thread DePriest, Jason R.

On 1/10/07, Kevin T Cella  wrote:

Offer an alternative. As I mentioned in my original post, I got this script
online. In using it I found it was not sufficient, I started this thread in
the hopes that someone would provide me with a better wrapper script.
Instead I got a bunch of replies about how it is a bad idea to use
Activestate with cygwin. My scripts are written to make my life on Windows
easier, so that means using Windows specific code to automate common tasks.
Ideally I'd prefer to stay in a pure Linux environment, but for reasons I do
not need to go into, I am stuck with Windows. It was my understanding that
the intent of this mailing list was to offer a place to discuss issues
involving cygwin and develop solutions to those problems. Seeing as I do not
have a whole lot of free time to research a better solution, I hoped a quick
answer would be provided via this medium. While I appreciate the suggestions
that have been made on this thread, I want to install two copies of the perl
interpreter or port my existing scripts to cygwin as that appears to be the
compromise. Are there any other ideas?


I use both ActiveState Perl (I purchase a Perl Developer's Kit license
from them every year actually) and the perl in cygwin.

I use them each in their appropriate environment, which means I don't
run Windows specific scripts under cygwin.

I never bothered asking anyone on this list to help me overcome that
limitation because cygwin isn't Windows and the ActiveState Perl
distribution I use is designed to work with Windows and supports
modules precompiled for Windows.

CPAN is awesome and can download and compile modules for me in cygwin
(as long as I am not behind a proxy server), but, yes, there are some
modules that will not compile under cygwin because it is listed as not
supported.

You can get the Win32 module and Win32::GUI for cygwin perl and that
is about it.

I'm guessing if you want other modules to work under cygwin, someone
will eventually suggest you see how those were made to work and do it
yourself.

That's cruel and sort of mean, but that is the way things are in this
particular volunteer-based project.

I miss the Windows-specific modules that make things in ActiveState
Perl super-easy when I am in cygwin.  One of the reasons I buy a PDK
membership every year is so I can use ActiveStates perlapp tool.  I
tweak my scripts under native Windows, use perlapp to exe'ify them,
and then I can run them from wherever.

As long as I refer to paths using the forward slash notation (perl
will accept forward or backward slashes and translate as appropriate),
I don't have problems.

I think the wrapper script idea is neat, but prone to errors and
complications that would make any of your work more difficult to
debug.  But if that is the route you want to go, fantastic.  The ideas
that have been presented in this thread should be enough to get you
started in the right direction.

Have you posted anything to the ActiveState mailing lists?  They have
a perl-win32 users list that might have some experienced users.

Or if you are truly seeking perl enlightenment, try perlmonks.org.
They have transcended beyond WJM over there and take to challenges
like flies on... well something flies would like a lot.

Good luck anyway, but this has severely grown off topic (from a cygwin
standpoint) and, though I haven't heard this one in a while, you may
be asked to TITTTL.

-Jason

--
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: dealing with spaces in paths

2007-01-10 Thread Morgan Gangwere
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


David Bear wrote:
> > I'm attempting to script building mount points in order to handle
spaces in
> > file names. So I do something like this:
> >
> > homedir=`cygpath -w $USERPROFILE`
> > mount -buf "\"$homedir\" $HOME/myh
> >
> > When I echo the mount command to the syntax looks correct.
> >
> > However, when I actually run the mount command via the script I get the
> > message there are not enough parameters, like mount is not getting
what it
> > needs.
> >
> > Dealing with spaces is a huge pain... but this seems be one way to
handle
> > them. Any idea why mount is unhappy when scripted as shown above?
> >
because you are feeding mount a path like /boo/some stuff/ like mount
/boo/some stuff. unfortunately this is because you need quotes around
that path.
here's what i think your trying to run:
mount /cygdrive/c/documents and settings/$UNAME/
this will cause mount to think its bring run with the hooks
?/cygdrive/c/documents
?and
?settings/$UNAME/

run something like mount "/cygdrive/c/documents and settings/"$UNAME"/"
and it should work...
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (MingW32)

iD8DBQFFpb8GXIyDjlIx4voRAsmOAJoD3MTTSMozlvCxNZLjLm1Ne7wR5QCgmJs5
fthMBl+mfxyWtjX1tdfZiS4=
=rHkF
-END PGP SIGNATURE-

--
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: dealing with spaces in paths

2007-01-10 Thread David Bear


David Bear wrote:

> I'm attempting to script building mount points in order to handle spaces
> in file names. So I do something like this:
> 
> homedir=`cygpath -w $USERPROFILE`
> mount -buf "\"$homedir\" $HOME/myh
> 
> When I echo the mount command to the syntax looks correct.
> 
> However, when I actually run the mount command via the script I get the
> message there are not enough parameters, like mount is not getting what it
> needs.
> 
> Dealing with spaces is a huge pain... but this seems be one way to handle
> them. Any idea why mount is unhappy when scripted as shown above?
> 
!!! reposting an email sent by 0.Fractalus -- Thanks !!!
> because you are feeding mount a path like /boo/some stuff/ like mount
> /boo/some stuff. unfortunately this is because you need quotes around
> that path.
> here's what i think your trying to run:
> mount /cygdrive/c/documents and settings/$UNAME/
> this will cause mount to think its bring run with the hooks
> ?/cygdrive/c/documents
> ?and
> ?settings/$UNAME/
>
> run something like mount "/cygdrive/c/documents and settings/"$UNAME"/"
> and it should work...

!!! and my email response to him !!!

thanks for the suggestion.

in the script I use escaped quotes within mount line as I show above.
When I leave out the escaped quotes, I get what you show with multiple
lines of
/cygdrive/c/documents
and
settings/blahhh

The escaped quotes should cause the script to pass the quotes on
through to the command line it generates. You can verify exactly what
the script generates by putting single quotes around the mount -buf
part of the string. so try this and see what your cygwin tells you..

#!/bin/sh
homedir=`cygpath -w $USERPROFILE`
echo 'mount -buf '"\"$homedir\" $HOME/mountpoint

It should be a complete runable bash snippet. It generates what looks
like a syntactically correct mount command.

What do you think?


--
David Bear
College of Public Programs at Arizona State University


--
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: dealing with spaces in paths

2007-01-10 Thread Morgan Gangwere
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

David Bear wrote:
> On Wed, Jan 10, 2007 at 07:26:44PM -0700, Morgan Gangwere wrote:
> David Bear wrote:
 I'm attempting to script building mount points in order to handle spaces in
 file names. So I do something like this:

 homedir=`cygpath -w $USERPROFILE`
 mount -buf "\"$homedir\" $HOME/myh

 When I echo the mount command to the syntax looks correct.

 However, when I actually run the mount command via the script I get the
 message there are not enough parameters, like mount is not getting what it
 needs.

 Dealing with spaces is a huge pain... but this seems be one way to handle
 them. Any idea why mount is unhappy when scripted as shown above?

> because you are feeding mount a path like /boo/some stuff/ like mount
> /boo/some stuff. unfortunately this is because you need quotes around
> that path.
> here's what i think your trying to run:
> mount /cygdrive/c/documents and settings/$UNAME/
> this will cause mount to think its bring run with the hooks
> ?/cygdrive/c/documents
> ?and
> ?settings/$UNAME/
> 
> run something like mount "/cygdrive/c/documents and settings/"$UNAME"/"
> and it should work...
> 
>> thanks for the suggestion.
> 
>> in the script I use escaped quotes within mount line as I show above.
>> When I leave out the escaped quotes, I get what you show with multiple
>> lines of 
>> /cygdrive/c/documents
>> and
>> settings/blahhh
> 
>> The escaped quotes should cause the script to pass the quotes on
>> through to the command line it generates. You can verify exactly what
>> the script generates by putting single quotes around the mount -buf
>> part of the string. so try this and see what your cygwin tells you..
> 
>> #!/bin/sh
>> homedir=`cygpath -w $USERPROFILE`
>> echo 'mount -buf '"\"$homedir\" $HOME/mountpoint
> 
>> It should be a complete runable bash snippet. It generates what looks
>> like a syntactically correct mount command.
> 
>> What do you think?
> 
it _should_ (note that i am _not_ a bash person.. id rather do python)
run...
the only caveat i see is that you'll have to escape the '"' char to pass
it to mount.

this should be the only caveat but thats just my way of thinking

PS: sorry for any repeat postings.. thunderbird isnt doing reply-to well...
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (MingW32)

iD8DBQFFpb/qXIyDjlIx4voRAiVPAJ4he8+8WuTY885XkLxRSBB/V0NwBQCfQSfU
fl242pnmMBv/6ICunDmeEuA=
=kAWb
-END PGP SIGNATURE-

--
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: activestate perl on cygwin

2007-01-10 Thread DePriest, Jason R.

On 1/10/07, Andrew DeFaria  wrote:

some dude wrote:
> Andrew DeFaria wrote:
> ...
>>> I don't actually install through cygwin, but use the ppm installer
>>> from Activestate.
>> Why people would want to use a proprietary Perl with a proprietary
>> installer is beyond me. Let me ask you a question, what happens when
>> you call setsid in this ActiveState Perl? Anyways...
> Well, in my case when I make the call I run perl on Linux. Here I had
> to write a scripton a windows machine and before checking cygwin I
> checked activestate. Then I needed some modules, DBD:Orcale to be exact.
Maybe you should have looked for DBD::Oracle instead? :-)


According to ActiveState's website
(http://aspn.activestate.com/ASPN/docs/ActivePerl/5.8/faq/ActivePerl-faq2.html)

DBD::Oracle Oracle no longer provides the Oracle client libraries for
free, so we can no longer provide DBD Oracle as a PPM/PPM3 module. The
DBD-Oracle package for ActivePerl 5.6 is the last package compiled
before the licensing changed that is still available on our site. If
you wish to compile this module locally, the source may be obtained
from www.cpan.org. Instructions on using CPAN are at:
http://aspn.activestate.com/ASPN/Reference/Products/ActivePerl/lib/CPAN.html.
If you are using Windows, an easy workaround for you might be just to
use DBD-ODBC instead.


Aside from the grammatical errors my point still stands. AFAIK ppm,
ActiveState's module installer, only works in ActiveState and I don't
believe that ActiveState works on Linux, Unix and Macs, whereas the

- - - - - cut - - - - - - -

It looks like PPM3 works with all the OSes that ActiveState releases
perl for which include Windows, Linux, MacOS X, Solaris, and HP-UX.

I am not so sure about PPM2.  It only has instructions for Windows.

Again, we have moved way out of the realm of relevance to cygwin at this point.

-Jason

--
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: activestate perl on cygwin

2007-01-10 Thread Andrew DeFaria

Kevin T Cella wrote:
Offer an alternative. As I mentioned in my original post, I got this 
script online. In using it I found it was not sufficient, I started 
this thread in the hopes that someone would provide me with a better 
wrapper script. Instead I got a bunch of replies about how it is a bad 
idea to use Activestate with cygwin.
But it is a bad idea to use ActiveState under Cygwin. Would you prefer 
if we lied to you?
My scripts are written to make my life on Windows easier, so that 
means using Windows specific code to automate common tasks.
But you really don't need to do such things in a "Windows specific" way! 
I used to run my whole domain under Cygwin. Apache for my web server, 
exim for a mail server, Cygwin's own inetutils for ftp, ssh, etc. 
Everything ran fine albeit a bit slower due to the fact that Cygwin is 
an emulation environment.


Eventually I got another box and initially installed SuSE on it and 
moved over all my scripts and processes. Porting was minimal at best 
because I grew up on HP-UX actually in a Unix environment and just 
thought that way. Later I moved to Fedora Core 3 which is what I have 
today.


But again, the point is that I use scripts to make my life easier too. 
And my scripts were written with a Unix mentality to start with and 
leaned on Cygwin to provide that Unix/Linux/Posix style environment. My 
scripts are useful and work well and ported with minimal effort.


Just because you're one a Windows box doesn't mean you have to code like 
Microsoft!
Ideally I'd prefer to stay in a pure Linux environment, but for 
reasons I do not need to go into, I am stuck with Windows. 
Again, that's the whole point of Cygwin at least to me. You can be 
"stuck with Windows" and still think with a Unix/Linux mindset and get 
even more useful work done with less effort.
It was my understanding that the intent of this mailing list was to 
offer a place to discuss issues involving cygwin and develop solutions 
to those problems.
And if the real, long term, more portable solution is to use a Cygwin 
based, thus more normal Perl...


BTW you never told me what setsid does under ActiveState Perl...
Seeing as I do not have a whole lot of free time to research a better 
solution, I hoped a quick answer would be provided via this medium. 
Answers were provided to you. Apparently they don't tickle your fancy. 
People have commented on that wrapper script that you posted. I still 
don't see what your problem is. If your Perl script expects 
C:\mydir\foo.dat then give it C:\mydir\foo.dat. Of course you'll need to 
do that under a cmd shell or, for Cygwin's bash shell you'll need to 
double the backslashes (C:\\mydir\\foo.dat) or use forward slashes 
(C:/mydir/foo.dat). If you insist on giving your Perl script 
/cygdrive/c/mydir/foo.dat then perhaps your Perl script should expect 
that and translate it. A quick Perl subroutine to do that shouldn't be 
that hard to code.
While I appreciate the suggestions that have been made on this thread, 
I want to install two copies of the perl interpreter or port my 
existing scripts to cygwin as that appears to be the compromise. Are 
there any other ideas?
I don't think there is anything stopping an ActiveState Perl script to 
call a simple Perl subroutine that translates any Cygwin style paths to 
paths that ActiveState likes seeing.


--

Andrew DeFaria 
I want to die peacefully in my sleep like my grandfather... Not 
screaming and yelling like the passengers in his car.



--
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: activestate perl on cygwin

2007-01-10 Thread Andrew DeFaria

Kevin T Cella wrote:
... there is nothing Cygwin-specific about writing such a wrapper 
script. As I said, any good bash tutorial would have contained enough 
information for you to write one. Since this is not a bash support 
list, discussion of techniques for making such scripts work is off-topic.

That's debatable, the distinction is vague at best.
Not to anybody here. There are various solutions to your "problem", some 
involving a wrapper script in a shell such as bash or handling the 
situation in Perl itself. Being as this list is about Cygwin the 
emulation environment itself, it's clear that "how to write a bash 
wrapper script to call some thing outside of Cygwin's purvey" or similar 
in Perl is definitely off topic by definition. If you cannot see that 
distinction then I don't know what to tell ya. Cygwin is made to work 
with Cygwin, not . That part's 
up to you to implement with the tools provided.


--

Andrew DeFaria 
Sped up my XT; ran it on 220v! Works greO?_~"


--
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: activestate perl on cygwin

2007-01-10 Thread Andrew DeFaria

DePriest, Jason R. wrote:
> checked activestate. Then I needed some modules, DBD:Orcale to be 
exact.

Maybe you should have looked for DBD::Oracle instead? :-)

According to ActiveState's website
(http://aspn.activestate.com/ASPN/docs/ActivePerl/5.8/faq/ActivePerl-faq2.html) 



DBD::Oracle Oracle no longer provides the Oracle client libraries for
Apparently somebody didn't get the joke/prod that I was doing based on 
the fact that the OP misspelled Oracle as Orcale and mistyped the "::" 
as ":"...


And damn I included a smiley...
Aside from the grammatical errors my point still stands. AFAIK ppm, 
ActiveState's module installer, only works in ActiveState and I don't 
believe that ActiveState works on Linux, Unix and Macs, whereas the

- - - - - cut - - - - - - -

It looks like PPM3 works with all the OSes that ActiveState releases 
perl for which include Windows, Linux, MacOS X, Solaris, and HP-UX.
Apparently ActiveState has been ported to more platforms than I was 
aware of. Still, authors on CPAN, in general, don't know or think about 
PPM (AFAICT) and just do things in what they consider the "standard" way 
(perl -MCPAN). I guess my point can be boiled down to "Why fight the 
trend?". YMMV


That plus that annual subscription fee is way out of my $0.00 software 
budget! ;-)

I am not so sure about PPM2.  It only has instructions for Windows.

Again, we have moved way out of the realm of relevance to cygwin at 
this point.

Yes but it is fun isn't it?

--

Andrew DeFaria 
Doesn't "expecting the unexpected" make the unexpected the expected.


--
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: Exclude cygwin folder from malware scans?

2007-01-10 Thread Gmane User
Fred Ma wrote:
> After some surfing, I haven't found any evidence of malware targetting
> cygwin.  I'm considering excluding the massive file tree from scans
> (AV, SpyBot, AdAware).  I'd be interested in more experienced opinions
> about this.  Thanks.

Thanks for your response.  In summary, the likelihood of malware targeting
cygwin explicitly is low, but there are occassional precedents for
continuing to scan the sizable cygwin directory tree.  I guess I'll be
disciplined and do a 3-day rotational schedule, launching each of the 3
malware scanners at the end of the day.  Thanks, all.

Fred


--
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: "cscope -d" can't find trailer offset if path contains space

2007-01-10 Thread Fred Ma
Thanks.  Here's some further info:
http://groups.google.ca/group/comp.editors/msg/7ffc56871c614f4b

Fred


Dave & Diane wrote:
> 
> Sorry for the delay - let me take a look at this in more detail. Given 
> the sleuthing you've done I'll probably have to go back to the cscope 
> owner at Bell-Labs.
> 
> Will keep you posted.
> 
> Dave
> [mlcscope maintainer for cygwin]
>
>
> Fred Ma wrote:
> 
>> Bug fix request submitted for cscope via sourceforge:
>>
>> This problem arose when using vim, but also appears when using "cscope
>> -d".  I get the error "cannot read trailer offset from file
>> cscope.out".  I browsed build.c to find that it is caused when reading
>> in a single number with fscanf.  To see what could be confusing
>> fscanf, I found the context of the "trailer offset" from
>> http://www1.bell-labs.com/project/wwexptools/cscope/cscope.html, which
>> shows that the number to be read occupies a single line along with
>> other space-delimited data, including the specification of the current
>> directory.  The space delimiting will get messed up if the current
>> directory contains spaces, which is often the case in Windows and
>> Cygwin (though it can also be the case in *nix).  P.S.: It also
>> happens with mlcscope.

--
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: [ANNOUNCEMENT] Updated: git-1.4.4.4-1

2007-01-10 Thread Yaakov (Cygwin Ports)
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Eric Blake wrote:
> You've got me.  I suspect it may be a (harmless) upstream bug in the way
> that git is using perl's makefile-making facilities.  Or there may be a
> cygport issue when using 'inherit perl'.

It's not just git; the same happened with a CPAN module.  For some
reason, the filelist is doubled in .packlist, the first time without
DESTDIR and the second time with.  cygport just sed the DESTDIR, leaving
two identical lists.

So this looks like a perl bug.


Yaakov
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFpcnGpiWmPGlmQSMRCFDyAJ44zBFDjtwVRDRxawOlZfrIvPLv6QCg/mSa
0QbJnkmNyixeAaGKV6Hr5Bg=
=1nRm
-END PGP SIGNATURE-

--
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.7.0 CVS mmap failure

2007-01-10 Thread Christopher Layne
> Since overmapping doesn't work on Windows, unfortunately, I implemented
> the above mentioned technique, which isn't much code anyway.  It
> reserves a memory lot big enough to fit in the whole mapping, memorizes
> the address, free's the memory again and then uses the new address in
> the subsequent real mappings.
> 
> This should work (knock on wood) on all systems now.  My testcases still
> work on my 512 MB machine, so I'd appreciate if you could give the latest
> snapshot a try on /3GB enabled machines.

This works on my machine now. So previously why was the former method
failing, do you think?

-cl

--
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.7.0 CVS mmap failure

2007-01-10 Thread Christopher Layne
> On Jan 10 09:37, Brian Ford wrote:
> > Yes, this fixes my STC and the application from which it was derived.
> > Thanks.

BTW: a couple of things:

1. Is there a possibility of another application or thread reserving that
just alloc/free'd area right after using it to obtain (at that time) a
valid address?

2. What exactly is the difference between using CreateFileMapping and
MapViewOfFile vs what we're doing now which seems to use NtMapViewOfSection?

-cl

--
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/



cygwin support for shared objects (modules)

2007-01-10 Thread Casey

I am wanting to use InspIRCd IRC Server for Windows (C++ Modular IRCd).

InspIRCd has stopped coming out with new versions of InspIRCd for 
Windows as it does not support shared objects (modules).


Will cygwin have support for shared objects later on with new releases?


Thank You

Casey

--
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/