Re: Problem with execution

2005-06-24 Thread Alexander Gottwald
On Fri, 24 Jun 2005, Romain Michard wrote:

 Hello,
 
 I've updated cygwin and since last week, I can't start xfree.
 I send you a snapshot of the messages I get typing startx.
 I've try to reinstall xorg but it's the same.
 
 When I type startx, I got the messages I've send you then nothing happens,
 my cygwin terminal stops working, but I can see the xinit.exe and 
 XWin.exe running in windows.

http://x.cygwin.com/docs/faq/cygwin-x-faq.html#freeze-at-startup

bye
ago
-- 
 [EMAIL PROTECTED] 
 http://www.gotti.org   ICQ: 126018723


Changing colours of XTerm

2005-06-24 Thread mrdna

Hello,

I have begun to use Cygwin on Windows and I have tried every technique I could 
find on the web for changing from the default black-on-white colours of Xterm 
(and perhaps other X applications) to something that's easier to look at. None 
of the techniques worked.

I tried, among other things, changing XResources and uncommenting the lines in 
XTerm-color that XTerm-color told me to uncomment if I wanted to change 
colours. Does anyone know for sure how to change colours IN CYGWIN, because the 
general UNIX techniques don't seem to be working?

Thanks in advance,
Liam.


_
eircom broadband is now up to four times faster than before.
Phone 1850 73 00 73 or visit http://home.eircom.net/broadbandoffer




signal.h: sa_handler not usable when compiling with `gcc -ansi'

2005-06-24 Thread Anschuetz, Andreas
cygwin: cygwin-1.5.17-1
Win OS tested: Windows 2000

The sa_handler entry of the sigaction structure is not accessible
when I compile with `gcc -ansi' (Makefile and example `signal-test.c'
attached):

gcc -ansi -o signal-ansi signal.c
signal.c: In function `main':
signal.c:13: error: structure has no member named `sa_handler'

The following line caused the error:
   sa_on.sa_handler = sighandler;

The same program is compilable with `gcc -std=gnu89'. I assume that
the anonymous union in `struct sigaction' in /usr/include/cygwin/signal.h
is not iso9899:1990 conform. 

Is compiling with the `-ansi' option not supported by cygwin or is this
a bug?

In case of it is a bug in cygwin I've also included an example patch
which fixes the problem, the code which fixes the problem is taken from
/usr/include/signal.h.

Regards,
   Andreas Anschuetz
--- signal.h.orig   2005-06-23 20:42:25.828859000 +0200

+++ signal.h2005-06-23 20:58:53.769448000 +0200

@@ -150,11 +150,16 @@

   {

 _sig_func_ptr sa_handler;  /* SIG_DFL, SIG_IGN, or pointer 
to a function */

 void  (*sa_sigaction) ( int, siginfo_t *, void * );

-  };

+  } _signal_handlers;

   sigset_t sa_mask;

   int sa_flags;

 };

 

+#define sa_handler_signal_handlers.sa_handler

+#if defined(_POSIX_REALTIME_SIGNALS)

+#define sa_sigaction  _signal_handlers.sa_sigaction

+#endif

+

 #define SA_NOCLDSTOP 1 /* Do not generate SIGCHLD when children

   stop */

 #define SA_SIGINFO   2 /* Invoke the signal catching function

#include signal.h



void sighandler(int sig)

{

}



int

main(int argc, char* argv[])

{

   static  struct sigactionsa_on;

   sa_on.sa_flags = 0;

   sa_on.sa_mask = (sigset_t)(0);

   sa_on.sa_handler = sighandler;

}



signal-ansi:

gcc -ansi -o signal-ansi signal-test.c



signal-gnu89:

gcc -std=gnu89 -o signal-gnu89 signal-test.c



GPC Error

2005-06-24 Thread Daniel Zingaro

Hi all,

I have been using Cygwin on this Windows XP machine for about a year without 
a problem. Specifically, I've been using GNU Pascal to compile my Pascal 
source. Since I hadn't updated Cygwin in a while, I did so, and now I 
receive the following error when I try to compile anything with GPC:


~gpc --automake compiler.pas
/usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/../../../../i686-pc-cygwin/bin/ld: 
crtbegi

n.o: No such file: No such file or directory

A gpc --version gives me:
gpc 20040516, based on gcc-3.3.3 (cygwin special)

I've uninstalled everything Cygwin-related, and reinstalled, and still 
receive this error. Is there a resolution for this one?


Thanks for any assistance,
Dan


--
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: GPC Error

2005-06-24 Thread Brian Dessent
Daniel Zingaro wrote:

 I have been using Cygwin on this Windows XP machine for about a year without
 a problem. Specifically, I've been using GNU Pascal to compile my Pascal
 source. Since I hadn't updated Cygwin in a while, I did so, and now I
 receive the following error when I try to compile anything with GPC:

I don't know anything about gpc but it seems to me that the pascal
front-end has been moved out of the main gcc tree into its own project. 
The current packaged version of gcc for Cygwin is 3.4.x which does not
include the pascal compiler.  Thus I think you are running into problems
because you have gcc-gpc 3.3.3-3 and the rest of the gcc-* packages at
3.4.4-1 (though you did not include cygcheck output as requested so this
is just a wild guess.)

In any case, I don't know if the old 3.3 version of gcc-gpc is intended
to function correctly alongside the newer 3.4 packages, or whether gpc
is just unsupported now.  You'd have to ask Gerrit about that.  In your
case the safest thing to do would probably be to stick with the same
version of all the gcc packages, so downgrade gcc back to 3.3.

Brian

--
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: [spam] Re: Windows rights

2005-06-24 Thread Igor Pechtchanski
On Thu, 23 Jun 2005, Corinna Vinschen wrote:

 On Jun 23 12:02, Igor Pechtchanski wrote:
  No, SYSTEM and LocalSystem are two names for the same user.  It's known as
  SYSTEM in Cygwin, but Windows calls it LocalSystem.  Perhaps the above
  link should be amended to clarify this.

 No, it's know in Windows as SYSTEM.  The string LocalSystem only
 shows up in the Services MMC snap-in.  The actual username is SYSTEM.
 Have a look into the task manager.

So it is.  Sorry for the confusion.
Igor
-- 
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!

The Sun will pass between the Earth and the Moon tonight for a total
Lunar eclipse... -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT

--
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: GPC Error

2005-06-24 Thread Brian Dessent
Daniel Zingaro wrote:

 (A personal message.. didn't want to clutter up the list with my easy
 question).

Please do not do that.  http://cygwin.com/acronyms/#PPIOSPE

 Thanks. My new Cygwin installation did update GCC as you guessed, so this
 could definitely be the problem. Is there an easy way to get back my GCC 3.3
 binaries? =)

Run setup again and select the 3.3 version for the gcc-* packages.

Brian

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



/usr/man before /usr/share/man in MANPATH (Attn: man maintainer)

2005-06-24 Thread Igor Pechtchanski
Hi,

Since the FHS mandates that man pages go into /usr/share/man, shouldn't it
precede /usr/man in the MANPATH?  I ran into this issue because I had kept
a backup copy of the old rxvt man page (the one with YODLTAGSTART, etc),
and, since it was in /usr/man and the new rxvt man page is in
/usr/share/man, the old backup was found first.
Igor
-- 
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!

The Sun will pass between the Earth and the Moon tonight for a total
Lunar eclipse... -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT

--
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: Connection closed message when trying to connect with sftp using public key authentication to OpenSSH 3.7.1p2 on Windows 2003 Server

2005-06-24 Thread Des Atkinson
I have downloaded and tested 4.1p1-1 and all is now working just fine.
The key lessons for me were:

1. Yes, use privilege separation as that seems to work just fine. It
creates a user called sshd to run the non-privileged operations.
2. If you want to use a pre-existing user to own the sshd service,
ensure that it has the following privileges:

* Adjust memory quotas for a process
* Create a token object
* Logon as a service
* Replace a process level token

These privileges should be set using the Domain Controller Security
Settings utility (go to Local Policies - User Rights Assignment). 

The user must also have Administrator rights on the server. It should
also have ownership of the following files:

/etc/ssh_host*
/var/empty

Many thanks for your help.


-Original Message-
From: Larry Hall [mailto:[EMAIL PROTECTED] 
Sent: 15 June 2005 15:51
To: Cygwin List; Des Atkinson; cygwin@cygwin.com
Subject: Re: Connection closed message when trying to connect with sftp
using public key authentication to OpenSSH 3.7.1p2 on Windows 2003
Server

At 10:39 AM 6/15/2005, you wrote:
At 10:14 AM 6/15/2005, you wrote:
I have been trying to connect to OpenSSH on my Windows 2003 Server
system using public key authentication. I have tried using both sftp and
ssh. In both cases the verbose output shows that the authentication
succeeded okay, but the session itself just seems to die with an Exit
status 255 message (followed by Connection closed for sftp).



snip


Is there some additional configuration I need to attempt on my server
to make this all work? I am running the CYGWIN sshd service under the
Local System account on the server. 


The Local System account does not have the permissions necessary to
permit
pubkey authentication to work on W2K3.  Did you install with
ssh-host-config
and ssh-user-config?  ssh-host-config will ask you if you want to
create the 
sshd_server user that will have the proper permissions to permit
pubkey 
authentication.  See 'usr/share/doc/Cygwin/openssh.README' for more
details.

I should also point out that OpenSSH 3.7.1p2 is very old now.  The
current 
version is 4.1p1-1.  It may be that ssh-host-config doesn't have the
option 
to create the sshd_server user in that version.  I don't remember.  If
it
does not, all the more reason to upgrade. ;-)

 

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


__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/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: More robust color terminal

2005-06-24 Thread Igor Pechtchanski
On Thu, 23 Jun 2005, Laran Evans wrote:

 So, I'm working with 8 colors in my rxvt terminal. It seems that's all
 that's available. Where this really becomes a drag is when trying to
 apply different color themes in Vim. Most light colored themes all look
 the same, with colors reducing to the 8 available.

 So, my question is this: Can I use some different option to get a more
 robust color terminal?

 My Cygwin.bat currently looks like this:

 @echo off
 C:
 chdir C:\Cygwin\bin
 C:\Cygwin\bin\rxvt.exe -e bash --login -i

 Any suggestions?

Both rxvt and the cmd.exe window only support 16 colors.  I guess you
could run X and use an xterm (which should support 256 colors, IIRC).

Alternatively, you could compile (and, hopefully, contribute) gvim. :-)
Igor
-- 
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!

The Sun will pass between the Earth and the Moon tonight for a total
Lunar eclipse... -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT

--
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: Connection closed message when trying to connect with sftp using public key authentication to OpenSSH 3.7.1p2 on Windows 2003 Server

2005-06-24 Thread Igor Pechtchanski
On Fri, 24 Jun 2005, Des Atkinson wrote:

 I have downloaded and tested 4.1p1-1 and all is now working just fine.
 The key lessons for me were:
 [snip]
 2. If you want to use a pre-existing user to own the sshd service,
 ensure that it has the following privileges:

 * Adjust memory quotas for a process
 * Create a token object
 * Logon as a service
 * Replace a process level token

 These privileges should be set using the Domain Controller Security
 Settings utility (go to Local Policies - User Rights Assignment).

Or using the editrights Cygwin program -- see /usr/bin/ssh-host-config.

 [snip]
 -Original Message-
 From: Larry Hall [mailto:[EMAIL PROTECTED]
 Sent: 15 June 2005 15:51
 To: Cygwin List; Des Atkinson; [EMAIL PROTECTED]
 Subject: Re: Connection closed message when trying to connect with sftp
 using public key authentication to OpenSSH 3.7.1p2 on Windows 2003
 Server

http://cygwin.com/acronyms/#PCYMTNQREAIYR.  And please don't make
http://cygwin.com/acronyms/#TOFU.  Thanks.
Igor
-- 
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!

The Sun will pass between the Earth and the Moon tonight for a total
Lunar eclipse... -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT

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

2005-06-24 Thread Christophe Delarue
Sorry for formatting I'm not familiar with outlook ... I prefer
emacs-vm.

Having a inetd for my account on the server is may be a solution. As
various user could do this remote compilation, I have to install various
inetd service, one per user ... 

I tried sshd.
The ssh-agent refuses to take the sshd files ~/.ssh/id_rsa since they
are world readable -rw-r--r--. 
Any chmod on this network files does not work. My Home is on the network
as generated with mkpasswd.
The use of ssh force me to use local /home/login directory.

With this settings I loose all initialization done in the network HOME
directory.

I think I'll use the inetd per user ... 

I'll send what I definitely will use.

Thank's for help. 

-Original Message-
From: Igor Pechtchanski [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 23, 2005 18:03
To: Christophe Delarue
Cc: cygwin@cygwin.com
Subject: Re: Windows rights

Ugh.  Top-posting.  Reformatted.  BTW, there was no need to Cc: me, I
read the list.  Please make sure your mailer respects the Reply-To:
header.

On Thu, 23 Jun 2005, Christophe Delarue wrote:

 -Original Message-
 From: [EMAIL PROTECTED] On Behalf Of Igor Pechtchanski
 Sent: Thursday, June 23, 2005 15:14
 To: Christophe Delarue
 Cc: [EMAIL PROTECTED]

http://cygwin.com/acronyms/#PCYMTNQREAIYR.  Thanks.

 Subject: [spam] Re: Windows rights

  Same problem in both cases.  Read all of 
  http://cygwin.com/cygwin-ug-net/ntsec.html, especially the part 
  titled Switching User Context, carefully.

 Thank's for your answer

 My server is Ms 2000.

 I read the url you gave me (I have allready read). I do not well 
 understand the section switching user context

 Does the second paragraph On NT and Windows 2000 the SYSTEM user has 
 these privileges and can run services such as sshd. says that I 
 should run the services as SYSTEM and not LocalSystem ?

No, SYSTEM and LocalSystem are two names for the same user.  It's known
as SYSTEM in Cygwin, but Windows calls it LocalSystem.  Perhaps the
above link should be amended to clarify this.

 Do the third paragraph

  An important restriction of this method is that a process started 
 without a password cannot access network shares which require 
 authentication. This also applies to subprocesses which switched user 
 context without a password. Therefore, when using ssh or rsh without a

 password, it is typically not possible to access network drives

 Means it is impossible to access any network drives without explicit 
 login ?

Sort of.  It is impossible to access network drives that require
authentication without an explicit login.

 Is there a method to rsh on a windows machine without password and 
 access network drives ?

If you use rsh, you might as well do what's suggested in the FAQ entry
that Larry pointed you to and make your shares world-readable, since
security is completely shot anyway.

If you decide to switch to ssh, I think you can use ssh-agent to
password-authenticate without having to type in your password every
time.
I haven't used ssh-agent much, so I don't recall the exact recipe for
starting it.  Read the documentation or ask for help somewhere else (I
doubt any usage questions will be Cygwin-specific).
Igor
-- 
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!

The Sun will pass between the Earth and the Moon tonight for a total
Lunar eclipse... -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT


--- -
Visit our Internet site at http://www.reuters.com

To find out more about Reuters Products and Services visit 
http://www.reuters.com/productinfo 

Any views expressed in this message are those of  the  individual
sender,  except  where  the sender specifically states them to be
the views of Reuters Ltd.


--
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: /usr/man before /usr/share/man in MANPATH (Attn: man maintainer)

2005-06-24 Thread John Morrison
On Fri, June 24, 2005 3:41 pm, Igor Pechtchanski said:
 Hi,

 Since the FHS mandates that man pages go into /usr/share/man, shouldn't it
 precede /usr/man in the MANPATH?  I ran into this issue because I had kept
 a backup copy of the old rxvt man page (the one with YODLTAGSTART, etc),
 and, since it was in /usr/man and the new rxvt man page is in
 /usr/share/man, the old backup was found first.

My fault I think, /etc/profile also has the wrong order...

MANPATH=/usr/local/man:/usr/man:/usr/share/man:/usr/autotool/devel/man:$MANPATH

will change to...

MANPATH=/usr/local/man:/usr/share/man:/usr/man:/usr/autotool/devel/man:$MANPATH

OK?  Should /usr/local/man be first and should autotool be last?

J.


--
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: /usr/man before /usr/share/man in MANPATH (Attn: man maintainer)

2005-06-24 Thread Brian Dessent
John Morrison wrote:

MANPATH=/usr/local/man:/usr/share/man:/usr/man:/usr/autotool/devel/man:$MANPATH
 
 OK?  Should /usr/local/man be first and should autotool be last?

That autotool path looks suspect.  I don't think any of the autotools
use that directory any more, after the package reorganization.  Though I
guess the old packages might need it.  IMHO if a package needs something
added to the MANPATH it should do it itself, it shouldn't be part of the
base /etc/profile.  Though you really should coordinate this with
Charles Wilson to see what he thinks.

Brian

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



libSDL

2005-06-24 Thread Patrick Graebel
I want to port an application that uses libSDL. Is libSDL available for
Cygwin? Any chance to get it work?

-Patrick


--
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: /usr/man before /usr/share/man in MANPATH (Attn: man maintainer)

2005-06-24 Thread Igor Pechtchanski
On Fri, 24 Jun 2005, John Morrison wrote:

 On Fri, June 24, 2005 3:41 pm, Igor Pechtchanski said:
  Hi,
 
  Since the FHS mandates that man pages go into /usr/share/man,
  shouldn't it precede /usr/man in the MANPATH?  I ran into this issue
  because I had kept a backup copy of the old rxvt man page (the one
  with YODLTAGSTART, etc), and, since it was in /usr/man and the new
  rxvt man page is in /usr/share/man, the old backup was found first.

 My fault I think, /etc/profile also has the wrong order...

Ah.  You're right.  This does come from /etc/profile -- man.conf has it in
correct order.

 MANPATH=/usr/local/man:/usr/man:/usr/share/man:/usr/autotool/devel/man:$MANPATH

 will change to...

 MANPATH=/usr/local/man:/usr/share/man:/usr/man:/usr/autotool/devel/man:$MANPATH

 OK?

Yep.  Looks good.

 Should /usr/local/man be first

I think so.  User-installed man pages should override the system man pages
(especially since /usr/local/bin precedes /usr/bin in the PATH).

 and should autotool be last?

FWICS, man directories added by various packages get appended to the
MANPATH, so the autotool stuff should really go to the very end.  In fact,
perhaps it would be better to add a /etc/profile.d script that adds the
autotool man directory to MANPATH, instead of cluttering up /etc/profile
with it.  Chuck?
Igor
-- 
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!

The Sun will pass between the Earth and the Moon tonight for a total
Lunar eclipse... -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT

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

2005-06-24 Thread Igor Pechtchanski
Top-posting again.  Reformatted, again.

On Fri, 24 Jun 2005, Christophe Delarue wrote:

 -Original Message-
 From: Igor Pechtchanski [mailto:[EMAIL PROTECTED]
 Sent: Thursday, June 23, 2005 18:03
 To: Christophe Delarue
 Cc: [EMAIL PROTECTED]
 Subject: Re: Windows rights

And again, http://cygwin.com/acronyms/#PCYMTNQREAIYR.  If you don't know
how, Google for PCYMTNQREAIYR Outlook.

  Ugh.  Top-posting.  Reformatted.  BTW, there was no need to Cc: me, I
  read the list.  Please make sure your mailer respects the Reply-To:
  header.
 
  On Thu, 23 Jun 2005, Christophe Delarue wrote:
 
   -Original Message-
   From: [EMAIL PROTECTED] On Behalf Of Igor Pechtchanski
   Sent: Thursday, June 23, 2005 15:14
   To: Christophe Delarue
   Cc: [EMAIL PROTECTED]
 
  http://cygwin.com/acronyms/#PCYMTNQREAIYR.  Thanks.
 
   Subject: [spam] Re: Windows rights
  
Same problem in both cases.  Read all of
http://cygwin.com/cygwin-ug-net/ntsec.html, especially the part
titled Switching User Context, carefully.
  
   Thank's for your answer
  
   My server is Ms 2000.
  
   I read the url you gave me (I have allready read). I do not well
   understand the section switching user context
  
   Does the second paragraph On NT and Windows 2000 the SYSTEM user has
   these privileges and can run services such as sshd. says that I
   should run the services as SYSTEM and not LocalSystem ?
 
  No, SYSTEM and LocalSystem are two names for the same user.  It's known
  as SYSTEM in Cygwin, but Windows calls it LocalSystem.  Perhaps the
  above link should be amended to clarify this.
 
   Do the third paragraph
  
An important restriction of this method is that a process started
   without a password cannot access network shares which require
   authentication. This also applies to subprocesses which switched user
   context without a password. Therefore, when using ssh or rsh without a
 
   password, it is typically not possible to access network drives
  
   Means it is impossible to access any network drives without explicit
   login ?
 
  Sort of.  It is impossible to access network drives that require
  authentication without an explicit login.
 
   Is there a method to rsh on a windows machine without password and
   access network drives ?
 
  If you use rsh, you might as well do what's suggested in the FAQ entry
  that Larry pointed you to and make your shares world-readable, since
  security is completely shot anyway.
 
  If you decide to switch to ssh, I think you can use ssh-agent to
  password-authenticate without having to type in your password every
  time.
  I haven't used ssh-agent much, so I don't recall the exact recipe for
  starting it.  Read the documentation or ask for help somewhere else (I
  doubt any usage questions will be Cygwin-specific).
  Igor

 Sorry for formatting I'm not familiar with outlook ... I prefer
 emacs-vm.

You can press Ctrl-End in Outlook before replying -- that should put you
after the quoted message.  FWIW, the abovementioned solution may work for
this as well.

 Having a inetd for my account on the server is may be a solution. As
 various user could do this remote compilation, I have to install various
 inetd service, one per user ...

That's pretty ugly.  Again, if you use rsh, you might as well open up the
network shares.

 I tried sshd.
 The ssh-agent refuses to take the sshd files ~/.ssh/id_rsa since they
 are world readable -rw-r--r--.

Oh, and why are they?  ~/.ssh should have permissions 700 (and the files
in it should be 600).  Besides, if you use password authentication,
ssh-agent shouldn't even look at those files, unless I'm mistaken.

 Any chmod on this network files does not work. My Home is on the network
 as generated with mkpasswd.
 The use of ssh force me to use local /home/login directory.

Hmm, if you use password authentication, you should have no problem
accessing the share, unless there are other issues here that I'm not aware
of.  If you use public key authentication, you'd have the same problem on
Unix with something like DFS, or any other filesystem that requires full
authentication tokens to access.

 With this settings I loose all initialization done in the network HOME
 directory.

There are various people around on this list who have their $HOME on a
network share, and many have no problems using ssh.  You need to find out
whether it's possible to use ssh-agent with password authentication, but
as that's not Cygwin-specific information, you'll have to use another
forum.

 I think I'll use the inetd per user ...
 I'll send what I definitely will use.
 Thank's for help.

Sure, it's your choice.
Igor
-- 
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!

The Sun 

stat file -- cygwin vs. Windows size?

2005-06-24 Thread Herb Martin
Is it likely that stat on a text file in cygwin would return
a   .st_size large than the file size as used by cygwin
that is HIGHER than the physical number of characters once
the file is process character by character?

I am thinking \n: cr-lf vs. lf, and I am brand new to 
cygwin programming (only trying to debug a problem in
Exim email servers new content scan feature.)

This buffer is being built for SpamAssassin which later
gives an error saying (to the effect) 

Content-Length mismatch: Expected 818 bytes, got 798 bytes

My suspicion is that stat is counting cr-lf as two characters
but the input routines are treating these as one.

If the file has about 20 lines, then that's 20 missing
characters???


Herb Martin
[EMAIL PROTECTED] http://LearnQuick.Com
512 388 7339   -or-   1 800 MCSE PRO
Accelerated MCSE in a Week Seminars


--
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: More robust color terminal

2005-06-24 Thread Reid Thompson

 Alternatively, you could compile (and, hopefully, contribute) gvim.
   :-) Igor
 --
   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!
 
 The Sun will pass between the Earth and the Moon tonight for a total
 Lunar eclipse... -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT

vim6.3 compiles ootb for X.

$ ls -lrt /usr/local/bin/*vim*
lrwxrwxrwx  1 Reid.Thompson Domain Users   7 Dec 16  2004
/usr/local/bin/gvim - vim.exe
lrwxrwxrwx  1 Reid.Thompson Domain Users   7 Dec 16  2004
/usr/local/bin/evim - vim.exe
lrwxrwxrwx  1 Reid.Thompson Domain Users   7 Dec 16  2004
/usr/local/bin/gvimdiff - vim.exe
lrwxrwxrwx  1 Reid.Thompson Domain Users   7 Mar  3 08:27
/usr/local/bin/vimdiff - vim.exe
-rwxr-xr-x  1 Reid.Thompson Domain Users 1273856 Jun 13 12:01
/usr/local/bin/vim.exe
-rwxr-xr-x  1 Reid.Thompson Domain Users1600 Jun 13 12:02
/usr/local/bin/vimtutor

not the cleanest way to handle it i'm sure, but. in .bashrc ( i have
both cygwin compiled *vim and native *vim on my machine, if X is
running, use cygwin gvim, else use native gvim, or use 'vim' instead of
'vi' from command line to get non-gui)

HAVEX=`ps -ef | grep XWin`
if [ $HAVEX !=  ]
then
HAVEX=1
export HAVEX
fi

alias vi='dovi'
function dovi {
 if [ ! $HAVEX ]
 then
 if [ $1 !=  ]
 then
 value=`cygpath -w $*`
 /C/Vim/vim62/gvim $value
 else
 /C/Vim/vim62/gvim $*
 fi
 else
 if [ $1 !=  ]
 then
 value=`cygpath -w $*`
 /usr/local/bin/gvim $value
 else
 /usr/local/bin/gvim $*
 fi
 fi 
}


reid


--
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: stat file -- cygwin vs. Windows size?

2005-06-24 Thread Larry Hall
At 01:06 PM 6/24/2005, you wrote:
This buffer is being built for SpamAssassin which later
gives an error saying (to the effect) 

Content-Length mismatch: Expected 818 bytes, got 798 bytes

My suspicion is that stat is counting cr-lf as two characters
but the input routines are treating these as one.

If the file has about 20 lines, then that's 20 missing
characters??? 


Yes, this is right.  And yes, this could be the cause of the 
situation you're noticing.


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


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



NFS errors

2005-06-24 Thread Will Parsons
After an abortive attempt a few months back, I am trying once more to get
NFS working (Windows XP, cygwin 1.5.15).  The daemons (portmap, mountd, and
nfsd) start up without error.  I have a /etc/exports file that contains:

/exports/c  rowan(rw)

The remote NFS client (rowan) is running FreeBSD and has a line in its
/etc/fstab:

l1422169:/exports/c   /xp nfsrw,noauto,intr  0

The mount command succeeds and /xp shows up in the output of df, but
running a ls /xp on the NFS mounted directory hangs, and cannot be
killed.

On the Cygwin side, the /var/log/nfsd.log, shows messages:

nfsd[3028] 06/24/105 12:31 auth_clnt.c 332 : Unable to setgroups: Invalid 
argument

Presumably this indicates the source of the problem, but what does it
indicate?  Any ideas on what I have to do to fix this?

cygcheck output is enclosed.

- Will

begin 644 cygcheck.out
M#0I#6=W:[EMAIL PROTECTED])A=EO;B!$:6%G;F]S=ECPT*0W5RF5N=!3
M[EMAIL PROTECTED][EMAIL PROTECTED])I($IU;B`R-`Q,SHR-SHR.2`R,#`U#0H-E=I;F1O
M=W,@[EMAIL PROTECTED]')O9F5SVEO;F%L(%9E[EMAIL PROTECTED];0@,C8P,!397)V:6-E
M(%!A8VL@,[EMAIL PROTECTED]6=W:6Y=7-R7%U=]T;V]L7'-T86)L
M95QB:6X-@E#.EQC6=W:6Y=7-R7QO8V%L7)I;@T*4,Z7-Y9W=I;EQB
M:6X-@E#.EQC6=W:6Y8FEN#0H)0SI8WEG=VEN7'5SEQS8FEN#0H)0SI
M8WEG=VEN7'5SEQ8,3%2-EQB:6X-@EC.EQ724Y$3U=37'-YW1E;3,R#0H)
M8SI5TE.1$]74PT*6,Z7%=)3D1/5U-4WES=5M,S)5V)E;0T*6XZ7$)A
M=`T*6XZ7$QO861S971S7$)A=-H7%=EV5C;VUP7$5X90T*6,Z7%!23T=2
M07XQ7$1/0U5-17XQ7%-H87)E9`T*6,Z7%!R;[EMAIL PROTECTED]2'5M;6EN
M9V)IF10V]N;F5C=EV:[EMAIL PROTECTED],#!06-C97-S;W)I97-#0H)8SI4')O
M9W)A;2!:6QEUQ(=6UM:6YG8FER9%Q#;VYN96-T:79I='E.XP,%Q.1E-#
M;EE;G0-@E#.EQC6=W:6Y8FEN#0H)8SI0D,U7$))[EMAIL PROTECTED]6,Z7'=B%QB
M:6X-@EC7'-LFX-@EC.EQ0S50DE.#0H)+EP-@EP.EQB:6X-@T*3W5T
M'5T(9R;[EMAIL PROTECTED]8WEG=VEN7)I;EQI9YE[EMAIL 
PROTECTED]YO;G1S96,I#0I5240Z
M(#(X.#`S*'=BD@(`@(`@(`@([EMAIL PROTECTED],#4Q,RA$;VUA:[EMAIL PROTECTED]
MG,I#0HP*')O;W0I(`@(`@(`@(`@(`@(`@([EMAIL PROTECTED];6EN:7-T
MF%T;W)S*0T*-30W*%!O=V5R(%5S97)S*2`@(`@(`@(`@(#4T-2A5V5R
MRD-C$P-3$S*$1O;6%I;B!5V5RRD@(`@(`@(`R.3$Q.AS=U]$0E!O
M=V5R*0T*,[EMAIL PROTECTED];F=E*2`@(`@(#$X.3DQ*%=I;D%U
M=%]3:%R961#:%N9V4I#0HR,S$U,BAW:6Y!=71?4W5PQY36=M=%-P;D@
M,[EMAIL PROTECTED],H=VEN075T1%!04T-H86YG92D-C$X.3DT*%=I;D%U=%5S97)S*2`@
M(`@(`@(`Q.#DY.2A7:6Y.4%!?4%53$E#0VAA;F=E*0T*,CDQ-C8H5VEN
M3E!057-EG,I(`@(`@(`@(#$Y,#`X*%=I;E!R:79#3TU10VAA;F=E*0T*
M#0I/[EMAIL PROTECTED])O;2!#.EQC6=W:6Y8FEN7ED+F5X92`H;G1S96,I#0I5
M240Z(#(X.#`S*'=BD@(`@(`@(`@([EMAIL PROTECTED],#4Q,RA$;VUA:6X@
M57-EG,I#0HP*')O;W0I(`@(`@(`@(`@(`@(`@([EMAIL PROTECTED];6EN
M:7-TF%T;W)S*0T*-30W*%!O=V5R(%5S97)S*2`@(`@(`@(`@(#4T-2A5
MV5RRD-C$P-3$S*$1O;6%I;B!5V5RRD@(`@(`@(`R.3$Q.AS=U]$
M0E!O=V5R*0T*,[EMAIL PROTECTED];F=E*2`@(`@(#$X.3DQ*%=I
M;D%U=%]3:%R961#:%N9V4I#0HR,S$U,BAW:6Y!=71?4W5PQY36=M=%-P
M;D@,[EMAIL PROTECTED],H=VEN075T1%!04T-H86YG92D-C$X.3DT*%=I;D%U=%5S97)S
M*2`@(`@(`@(`Q.#DY.2A7:6Y.4%!?4%53$E#0VAA;F=E*0T*,CDQ-C8H
M5VEN3E!057-EG,I(`@(`@(`@(#$Y,#`X*%=I;E!R:79#3TU10VAA;F=E
M*0T*#0I37-$:7(Z($,Z7%=)3D1/5U-4WES=5M,S(-E=I;D1I[EMAIL PROTECTED]
M5TE.1$]74PT*#0I#64=724X@/2!@V5R=F5R)PT*2$]-12`](!C.EQW8G`G
M#0I05T0@/[EMAIL PROTECTED]9EB-@T*04Q,55-%4E-04D]24Q%([EMAIL 
PROTECTED],Z7$1O
M8W5M96YTR!A;[EMAIL PROTECTED]EN9W-06QL(%5S97)S)PT*05!01$%402`](!#
M.EQ$;V-U;65N=',@86YD(%-E='1I;F=S7'!AG-O;G=07!P;EC871I;VX@
M1%T82-D-,245.5$Y!344@/[EMAIL PROTECTED]V]L92-D-/34U/3E!23T=204U
M24Q%4R`](!#.EQ0F]GF%M($9I;5S7$-O;6UO;B!:6QER-D-/35!5
M5$523D%-12`](!,,30R,C$V.2-D-/35-014,@/[EMAIL PROTECTED]5TE.1$]74UQS
M7-T96TS,EQC;60N97AE)PT*1E!$7T1([EMAIL PROTECTED]]C+W=B]D871A+W!V;F=F
M1B+F1A=-DA/345$4DE612`](!0.B-DA/3450051(([EMAIL PROTECTED](
M3TU%4TA!4D4@/[EMAIL PROTECTED]VMY7'5S97)S7'!AG-O;GG#0I,3T=/3E-%
M4E9%4B`](!7%-724XQ-#`P)PT*3DY44%-%4E9%4B`](!I;FXN6YX+F-O
M;2-DY534)%4E]/1E]04D]#15-33U)3([EMAIL PROTECTED](G#0I/3$105T0@/[EMAIL 
PROTECTED],O
M=V)P)PT*3U!605)?4T%612`](`O8R]W8G`O9%T82]O'9ABYD870G#0I/
M4R`](!7:6YD;W=S7TY4)PT*4$%42$585`](`N0T]-.RY%6$4[+D)!5#LN
M0TU$.RY60E,[+E913LN2E,[+DI313LN5U-[EMAIL PROTECTED],@/[EMAIL PROTECTED],O
M=V)P+W!PR-E!23T-%4U-/4E]!4D-(251%0U154D4@/2!@[EMAIL PROTECTED])PT*4%)/
M0T534T]27TE$14Y4249)15(@/2!@[EMAIL PROTECTED]($9A;6EL2`Q-2!-;V1E;`S(%-T
M97!P:6YG(#0L($=E;G5I;F5);G1E;-E!23T-%4U-/4E],159%3`](`Q
M-2-E!23T-%4U-/4E]2159)4TE/3B`](`P,S`T)PT*4%)/1U)!349)3$53
M([EMAIL PROTECTED],Z7%!R;[EMAIL PROTECTED],G#0I20U-)3DE4([EMAIL 
PROTECTED]UX+'8G#0I315-3
M24].3D%-12`](!#;VYS;VQE)PT*4TA,5DP@/2!@,2-E-94U1%3412259%
M([EMAIL PROTECTED],Z)PT*4UE35$5-4D]/5`](!#.EQ724Y$3U=3)PT*5$5-4`](!#
M.EQ414U0)PT*5$5232`](!C6=W:6XG#0I435`@/[EMAIL PROTECTED]5$5-4-E1:
M([EMAIL PROTECTED]([EMAIL PROTECTED]M24Y44D$N3D54)PT*
M55-%4D1/34%)3B`](!7+4E.5%)!)PT*55-%4DY!344@/2!@%RV]N=R-
ME5315)04D]24Q%([EMAIL PROTECTED],Z7$1O8W5M96YTR!A;[EMAIL 
PROTECTED]EN9W-%R
MV]N=R-E=)3D1)4B`](!#.EQ724Y$3U=3)PT*7R`](`O=7-R+V)I;B]C
M6=C:5C:R-E!/4TE83%E?0T]24D5#5`](`Q)PT*#0I(2T597T-54E)%
M3E1?55-%4EQ3;V9T=V%R95Q#6=N=7,@4V]L=71I;VYS#0I(2T597T-54E)%
M3E1?55-%4EQ3;V9T=V%R95Q#6=N=7,@4V]L=71I;VYS7$-Y9W=I;@T*2$M%

RE: stat file -- cygwin vs. Windows size?

2005-06-24 Thread Herb Martin
 My suspicion is that stat is counting cr-lf as two 
 characters but the 
 input routines are treating these as one.
 
 If the file has about 20 lines, then that's 20 missing characters???
 
 
 Yes, this is right.  And yes, this could be the cause of the 
 situation you're noticing.

Is there a standard Cygwin 'idiom' or function for
dealing with this mismatch, or should I just re-invent
the wheel.

Seems like I read (skimmed) something related to this
in the Cygwin manual, probably near the back in the 
programming introduction

I know I picked up the concept somewhere (somewhere 
recent that is, as I have dealt with this across at
least five different OS conventions but not recently
and specifically on Cygwin.)

--
Thanks,
Herb


--
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: stat file -- cygwin vs. Windows size?

2005-06-24 Thread Igor Pechtchanski
On Fri, 24 Jun 2005, Herb Martin wrote:

  My suspicion is that stat is counting cr-lf as two characters but the
  input routines are treating these as one.
  
  If the file has about 20 lines, then that's 20 missing characters???
 
  Yes, this is right.  And yes, this could be the cause of the
  situation you're noticing.

 Is there a standard Cygwin 'idiom' or function for dealing with this
 mismatch, or should I just re-invent the wheel.

Sure -- just force binary mode on the file (i.e., open it using O_BINARY
for the open() call, or the rb mode for the fopen() call).  The mount
type only applies if the mode is unspecified.

 Seems like I read (skimmed) something related to this in the Cygwin
 manual, probably near the back in the programming introduction

 I know I picked up the concept somewhere (somewhere recent that is, as I
 have dealt with this across at least five different OS conventions but
 not recently and specifically on Cygwin.)

HTH,
Igor
-- 
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!

The Sun will pass between the Earth and the Moon tonight for a total
Lunar eclipse... -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT

--
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: stat file -- cygwin vs. Windows size?

2005-06-24 Thread Igor Pechtchanski
On Fri, 24 Jun 2005, Igor Pechtchanski wrote:

 On Fri, 24 Jun 2005, Herb Martin wrote:

   My suspicion is that stat is counting cr-lf as two characters but the
   input routines are treating these as one.
   
   If the file has about 20 lines, then that's 20 missing characters???
  
   Yes, this is right.  And yes, this could be the cause of the
   situation you're noticing.
 
  Is there a standard Cygwin 'idiom' or function for dealing with this
  mismatch, or should I just re-invent the wheel.

 Sure -- just force binary mode on the file (i.e., open it using O_BINARY
 for the open() call, or the rb mode for the fopen() call).  The mount
 type only applies if the mode is unspecified.

A clarification: force binary mode on the opened file in your program, not
the actual on-disk data.

Note that if you do that, you'd also need to handle the CR ('\r', or 0x0d)
characters explicitly in your program.

HTH,
Igor

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

The Sun will pass between the Earth and the Moon tonight for a total
Lunar eclipse... -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT

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



strptime error when setting a different TimeZone with export TZ=UTC

2005-06-24 Thread Luca Wullschleger
Hi everybody. I have a very specific problem and I'm looking for someone
giving me a solution.
 
When I set the TZ environment varialbe TZ to UTC and try to execute date
I get the right date in UTC format:

 begin
$ date
Fri Jun 24 20:13:05 WEDT 2005
$ export TZ=UTC
$ date
Fri Jun 24 18:03:00 UTC 2005
 end
 
But if I try to execute the peace of code written in C here below, I have a
very strange behaviour.

 begin
$ ./test_time
Timezone:   WEST-1WEDT-2,M3.5.0/2,M10.5.0/3

TS =1097712000
LOCAL : Thu Oct 14 02:00:00 2004
UTC :   Thu Oct 14 00:00:00 2004

Trying with '13/Oct/2004:17:00:00 -0700' - 1097712000
ts =1097704800
LOCAL : Thu Oct 14 00:00:00 2004
UTC :   Wed Oct 13 22:00:00 2004

$ export TZ=UTC
$ ./test_time
Timezone:   UTC

TS =1097712000
LOCAL : Thu Oct 14 00:00:00 2004
UTC :   Thu Oct 14 00:00:00 2004

Trying with '13/Oct/2004:17:00:00 -0700' - 1097712000
ts =25199
LOCAL : Thu Jan  1 06:59:59 1970   -- problem
UTC :   Thu Jan  1 06:59:59 1970   -- problem
 end

As you can see the problem is in in the last 2 lines..
I would like to be able to parse the date in UTC, but it seams that either
the strptime or the mktime function do not like the modification of the TZ
environment variable.

I also tried to printout the broken-down date structure try and it seams to
be correct, so I suppose that the problem is with the mktime() function. I
know this mktime() function uses some timezone settings from somewhere.

I executed this peace of code on a Linux machine and the behaviour is right.
It seams that the problem only occurs within Cygwin.

I tried everything, google searched it, but I found nothing interesting.

Any idea?

Thanks a lot for the help... 

Luca

Email: [EMAIL PROTECTED]



 file test_time.c

#include stdlib.h
#include stdio.h
#include zlib.h
#include time.h

/** Main method.
 */
int main(int argc, char **argv) {

tzset();
printf(Timezone:   %s\n\n,getenv(TZ));

time_t ts = 1097712000;  /* 13/Oct/2004:17:30:00 */
printf(TS =%i\n,(int)ts);
printf(LOCAL : %s, asctime(localtime(ts)));
printf(UTC :   %s, asctime(gmtime(ts)));

printf(\nTrying with '13/Oct/2004:17:00:00 -0700' -
1097712000\n);
struct tm try;
time_t ts2;
char date[30] = 13/Oct/2004:17:30:00;
char timezone[4] = -07;

if ((char *)strptime(date,%d/%b/%Y:%T,try) == NULL) {
printf(Error with strptime\n);
return 1;
}
ts2 = mktime(try) - atoi(timezone)*3600;
printf(ts =%i\n,(int)ts2);
printf(LOCAL : %s, asctime(localtime(ts2))); 
printf(UTC :   %s, asctime(gmtime(ts2)));

return (0);
}




--
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: stat file -- cygwin vs. Windows size?

2005-06-24 Thread Brian Dessent
Herb Martin wrote:

 Is there a standard Cygwin 'idiom' or function for
 dealing with this mismatch, or should I just re-invent
 the wheel.

Sure.  Don't use text mode.  Open the file in binary mode (O_BINARY with
open(), b with fopen()), or call setmode(fd, O_BINARY) once open, or
link against binmode.o.  Or just don't use text mode mounts.

Brian

--
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: stat file -- cygwin vs. Windows size?

2005-06-24 Thread Larry Hall
At 02:08 PM 6/24/2005, you wrote:
 My suspicion is that stat is counting cr-lf as two 
 characters but the 
 input routines are treating these as one.
 
 If the file has about 20 lines, then that's 20 missing characters???
 
 
 Yes, this is right.  And yes, this could be the cause of the 
 situation you're noticing.

Is there a standard Cygwin 'idiom' or function for
dealing with this mismatch, or should I just re-invent
the wheel.


If you actually believe that you want the file without cr/nl conversion
during a read, then you want to open it in binary mode (fopen() with rb
instead of r or open() with '| O_BINARY' appended).  This *may* be the 
solution in this case.  Since the default mode for opening files is 
always text but there is no difference in format/behavior between 
text and binary on UNIX/Linux, you wouldn't see an issue there.




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


--
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: NFS errors

2005-06-24 Thread Larry Hall
At 01:59 PM 6/24/2005, you wrote:
After an abortive attempt a few months back, I am trying once more to get
NFS working (Windows XP, cygwin 1.5.15).  The daemons (portmap, mountd, and


Maybe you want to update to current (or snapshot) Cygwin (at least)?


nfsd) start up without error.  I have a /etc/exports file that contains:

/exports/c  rowan(rw)


Don't you need something like squash_uids here to handle your Windows to
*nix user ID mapping?


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


--
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: stat file -- cygwin vs. Windows size?

2005-06-24 Thread Gary R. Van Sickle
 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of Herb Martin
 Sent: Friday, June 24, 2005 1:08 PM
 To: 'Cygwin List'
 Subject: RE: stat file -- cygwin vs. Windows size?
 
  My suspicion is that stat is counting cr-lf as two
  characters but the
  input routines are treating these as one.
  
  If the file has about 20 lines, then that's 20 missing 
 characters???
  
  
  Yes, this is right.  And yes, this could be the cause of 
 the situation 
  you're noticing.
 
 Is there a standard Cygwin 'idiom' or function for dealing 
 with this mismatch, or should I just re-invent the wheel.
 

As to the former, no, not Cygwin specifically.  The problem appears to be
that SpamAssassin is making the incorrect but all-too-common assumption that
text file == file of 8-bit ASCII characters with '\n' EOL characters.
This is as incorrect as thinking picture file == JPEG file.

Cygwin does have a number of fetures to bandaid many such broken Unix
codes, primarily the text mode mount feature, but these are just that, a
band-aid, not a fix of the root problem (and in your case (and in fact in a
similar case in mutt), it can't solve the problem).  As others have
indicated, the real and true solution here is to open the file in binary
mode and handle the various EOL chachter combinations in the SpamAssasin
code.  Which, yeah, is unfortunately reinventing a wheel which should have
been permanently reinvented in the last century.  But hey, it's only the
first few years of the 21st century, maybe by the 22nd we'll have this whole
CRLF/LF/CR/LFCR thing sorted out.

-- 
Gary R. Van Sickle


--
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: More robust color terminal

2005-06-24 Thread Gary R. Van Sickle
 Both rxvt and the cmd.exe window only support 16 colors.

Welcome to 1983.  I at least hope they include those horrid CGA colors.

-- 
Gary R. Van Sickle


--
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: stat file -- cygwin vs. Windows size?

2005-06-24 Thread Larry Hall
At 02:46 PM 6/24/2005, Gary R. Van Sickle wrote:

But hey, it's only the
first few years of the 21st century, maybe by the 22nd we'll have this whole
CRLF/LF/CR/LFCR thing sorted out.

Yeah, I'm guessing this will be solved just after the advent of practical 
fusion reactors and the development of warp drive.  So we have a ways to 
go yet. ;-)


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


--
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: stat file -- cygwin vs. Windows size?

2005-06-24 Thread Herb Martin
 Is there a standard Cygwin 'idiom' or function for dealing with this 
 mismatch, or should I just re-invent the wheel.
 
 
 If you actually believe that you want the file without cr/nl 
 conversion during a read, then you want to open it in binary 
 mode (fopen() with rb
 instead of r or open() with '| O_BINARY' appended).  This 
 *may* be the solution in this case.  Since the default mode 
 for opening files is always text but there is no difference 
 in format/behavior between text and binary on UNIX/Linux, 
 you wouldn't see an issue there.


Actually I am between a rock and hard place -- 
email server on one side and SpamD on the
other.

Apparently the SpamD 'protocol' requires passing the
size to SpamD.

I don't want to start re-writing code all over either
program -- I just want to talk the source email system
into telling spamd whatever it needs to know to be happy.

Currently, I am accumulating bytes, and will use that,
but I am missing something and not getting the write count
(YET.)


--
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: strptime error when setting a different TimeZone with export TZ=UTC

2005-06-24 Thread Eric Blake
 I would like to be able to parse the date in UTC, but it seams that either
 the strptime or the mktime function do not like the modification of the TZ
 environment variable.
 
 I also tried to printout the broken-down date structure try and it seams to
 be correct, so I suppose that the problem is with the mktime() function. I
 know this mktime() function uses some timezone settings from somewhere.
 
 I executed this peace of code on a Linux machine and the behaviour is right.
 It seams that the problem only occurs within Cygwin.
 
 I tried everything, google searched it, but I found nothing interesting.

There is a known problem in the interaction of newlib and cygwin, such
that functions that are required by POSIX to behave as though they call
tzset() haven't yet been implemented to do so.  The workaround is to
manually call tzset() yourself any time (pun not intended) you want to
change the TZ environment variable in your C program (or better yet,
to submit a patch to cygwin and/or newlib to fix ctime() , localtime() ,
mktime() , and strftime() to all call tzset() properly).

http://cygwin.com/faq/faq_3.html#SEC85

--
Eric Blake



--
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] New package: apache2-2.0.54-1 (and subpackages apache2-devel, apache2-manual)

2005-06-24 Thread Henry Katz
Max Bowsher maxb at ukf.net writes:
 
 Apache httpd version 2.0, the popular web server, is now packaged for the
Cygwin distribution, and
 arriving soon to a mirror near 
 you.
 
 Apache is compiled with --enable-mods-shared=all, so a fairly large selection
of modules is included. I
 will take requests for 
 additional modules contained within the Apache httpd distribution itself -
please ask on cygwin (at)
 cygwin (dot) com.
 
 I do not, at present, have plans to package PHP or mod_perl, though I'm happy
to work with anyone wishing to do so.
 
 I will consider packaging additional modules not within the Apache http
distribution on request,
 provided their build system isn't 
 too complicated.
 
 I do intend to package the Subversion Apache modules soon.
 
 Max Bowsher.
 

Max,

How do we incorporate additional shared objects into this such as the
subversion mod_dav_svn.so? I've had terrible luck following the cookbook
at apache (http://httpd.apache.org/docs-2.0/dso.html) or that at
cygwin (http://cygwin.com/cygwin-ug-net/dll.html). I tried a shortcut 
which was copying over the svn module packaged in subversion on cygwin

cygcheck -l subversion | grep dav | grep dll
/usr/bin/cygsvn_ra_dav-1-0.dll

and copying it to the modules dir as 

-rwxr-x---  1 W014786 None 85K Jun 24 14:42 /cygdrive/c/Program Files/Apache
Group/Apache2/modules/mod_dav_svn.so*


but the win32 native apache from httpd.apache.org would not start. My concern
is that if I install the new 2.0 pkg you've just released, I shall encounter
the same issue building the .so (.dll - whatever) under cygwin.

Any suggestions?

Thanks,
Henry




--
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: strptime error when setting a different TimeZone with export TZ=UTC

2005-06-24 Thread Brian Dessent
Luca Wullschleger wrote:

 Hi everybody. I have a very specific problem and I'm looking for someone
 giving me a solution.

I'm afriad this is operator error on your part.

 struct tm try;

Here 'try' starts out as a regular automatic variable, with all of its
fields set to arbitrary (undefined) values.

 if ((char *)strptime(date,%d/%b/%Y:%T,try) == NULL) {

Here you call strptime() to fill in the values of 'try', however the
strptime function has the semantics that it will only fill in the
members of struct tm that it is asked to parse.  This means that after
the call, some of the members still have undefined values. 
Specifically, the members tm_wday, tm_yday, and tm_isdst will contain
garbage.

 ts2 = mktime(try) - atoi(timezone)*3600;

And here you pass this value of 'try' that still has uninitialized
values to mktime(), the result of which will be undefined as well.  I
think you were just lucky that it worked in the case where TZ was not
set, but in general once you encounter the situation where you pass
uninitialized data to a function, all bets are off because your program
is invalid C.

If you change the line above to struct tm try = { 0 }; or otherwise
initialize it somehow, then I think you will get the desired
functionality.

Brian

--
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: stat file -- cygwin vs. Windows size?

2005-06-24 Thread Jason Pyeron


The binary size is accurate, text, by its nature may never be correct on 
any operating system, since it is buffered, parsed, etc by the OS in an OS 
dependent way.


If you use a binary mode then you will be fine.


On Fri, 24 Jun 2005, Herb Martin wrote:


Is there a standard Cygwin 'idiom' or function for dealing with this
mismatch, or should I just re-invent the wheel.



If you actually believe that you want the file without cr/nl
conversion during a read, then you want to open it in binary
mode (fopen() with rb
instead of r or open() with '| O_BINARY' appended).  This
*may* be the solution in this case.  Since the default mode
for opening files is always text but there is no difference
in format/behavior between text and binary on UNIX/Linux,
you wouldn't see an issue there.



Actually I am between a rock and hard place --
email server on one side and SpamD on the
other.

Apparently the SpamD 'protocol' requires passing the
size to SpamD.

I don't want to start re-writing code all over either
program -- I just want to talk the source email system
into telling spamd whatever it needs to know to be happy.

Currently, I am accumulating bytes, and will use that,
but I am missing something and not getting the write count
(YET.)


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



--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-   -
- Jason Pyeron  PD Inc. http://www.pdinc.us -
- Partner  Sr. Manager 7 West 24th Street #100 -
- +1 (410) 808-6646 (c) Baltimore, Maryland 21218   -
-   -
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

This message is for the designated recipient only and may contain 
privileged, proprietary, or otherwise private information. If you 
have received it in error, purge the message from your system and 
notify the sender immediately.  Any other use of the email by you 
is prohibited.


--
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: strptime error when setting a different TimeZone with export TZ=UTC

2005-06-24 Thread Luca Wullschleger
Hi Brian, thanks a lot for your answer. In fact it works initializing the
try struct to {0}.

As you said, I was lucky that until now I never found the problem.
Remain the question why setting the TZ variable make this problem coming
out.

By the way, thanks a lot for the support !!!

Luca 



 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of Brian Dessent
 Sent: vendredi, 24. juin 2005 21:37
 To: cygwin@cygwin.com
 Subject: Re: strptime error when setting a different TimeZone 
 with export TZ=UTC
 
 Luca Wullschleger wrote:
 
  Hi everybody. I have a very specific problem and I'm looking for 
  someone giving me a solution.
 
 I'm afriad this is operator error on your part.
 
  struct tm try;
 
 Here 'try' starts out as a regular automatic variable, with 
 all of its fields set to arbitrary (undefined) values.
 
  if ((char *)strptime(date,%d/%b/%Y:%T,try) == NULL) {
 
 Here you call strptime() to fill in the values of 'try', 
 however the strptime function has the semantics that it will 
 only fill in the members of struct tm that it is asked to 
 parse.  This means that after the call, some of the members 
 still have undefined values. 
 Specifically, the members tm_wday, tm_yday, and tm_isdst will 
 contain garbage.
 
  ts2 = mktime(try) - atoi(timezone)*3600;
 
 And here you pass this value of 'try' that still has 
 uninitialized values to mktime(), the result of which will be 
 undefined as well.  I think you were just lucky that it 
 worked in the case where TZ was not set, but in general once 
 you encounter the situation where you pass uninitialized data 
 to a function, all bets are off because your program is invalid C.
 
 If you change the line above to struct tm try = { 0 }; or 
 otherwise initialize it somehow, then I think you will get 
 the desired functionality.
 
 Brian
 
 --
 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: strptime error when setting a different TimeZone with export TZ=UTC

2005-06-24 Thread Eric Blake
 Here you call strptime() to fill in the values of 'try', however the
 strptime function has the semantics that it will only fill in the
 members of struct tm that it is asked to parse.  This means that after
 the call, some of the members still have undefined values. 
 Specifically, the members tm_wday, tm_yday, and tm_isdst will contain
 garbage.
 
  ts2 = mktime(try) - atoi(timezone)*3600;
 
 And here you pass this value of 'try' that still has uninitialized
 values to mktime(), the result of which will be undefined as well.  I
 think you were just lucky that it worked in the case where TZ was not
 set, but in general once you encounter the situation where you pass
 uninitialized data to a function, all bets are off because your program
 is invalid C.

Not necessarily.  According to POSIX, a strptime implementation is allowed
(but not necessarily recommended) to set all fields of try, even the ones
not related to what was parsed:

It is unspecified whether multiple calls to strptime() using the same tm
structure will update the current contents of the structure or overwrite
all contents of the structure. Conforming applications should make a
single call to strptime() with a format and all data needed to completely
specify the date and time being converted. -
http://www.opengroup.org/susv3xsh/strptime.html

But yes, your advice is also relevant - don't call mktime after strptime
unless you are SURE all fields (except tm_wday and tm_yday) have been
initialized properly.  And pre-initializing to all 0s (as in struct tm try = 
{0,};)
does not work, either, since the rules of time.h state that tm_month
must be 1 - 12.  In short, struct tm is a nightmare to use, but we are
stuck with it for standardized backwards compatibility.

--
Eric Blake



--
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: More robust color terminal

2005-06-24 Thread Reid Thompson
Gary R. Van Sickle wrote:
 Both rxvt and the cmd.exe window only support 16 colors.
 
 Welcome to 1983.  I at least hope they include those horrid CGA
 colors. 
 
 --
 Gary R. Van Sickle

recompiling rxvt for 256 colors is not hard.

$ ./rxvt -help |head
Rxvt v2.7.10 - released: 26 MARCH 2003
Options:
XPM,transparent,utmp,menubar,multichar_languages,scrollbars=rxvt+NeXT+xt
erm,frills,linespace,256colour,.Xdefaults

reid

--
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: More robust color terminal

2005-06-24 Thread Igor Pechtchanski
On Fri, 24 Jun 2005, Reid Thompson wrote:

 Gary R. Van Sickle wrote:
  Both rxvt and the cmd.exe window only support 16 colors.
 
  Welcome to 1983.  I at least hope they include those horrid CGA
  colors.
 
  --
  Gary R. Van Sickle

 recompiling rxvt for 256 colors is not hard.

 $ ./rxvt -help |head
 Rxvt v2.7.10 - released: 26 MARCH 2003
 Options:
 XPM,transparent,utmp,menubar,multichar_languages,scrollbars=rxvt+NeXT+xterm,frills,linespace,256colour,.Xdefaults

Ah, I knew I saw something about rxvt supporting 256 colors somewhere.
The man page is misleading, apparently.

Any idea why the current release doesn't use 256 colors?
Igor
P.S. Don't you mean rxvt -help 21 | head?  Rxvt's help goes to stderr.
-- 
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!

The Sun will pass between the Earth and the Moon tonight for a total
Lunar eclipse... -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT

--
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: strptime error when setting a different TimeZone with export TZ=UTC

2005-06-24 Thread Brian Dessent
Eric Blake wrote:

 Not necessarily.  According to POSIX, a strptime implementation is allowed
 (but not necessarily recommended) to set all fields of try, even the ones
 not related to what was parsed:
 
 It is unspecified whether multiple calls to strptime() using the same tm
 structure will update the current contents of the structure or overwrite
 all contents of the structure. Conforming applications should make a
 single call to strptime() with a format and all data needed to completely
 specify the date and time being converted. -
 http://www.opengroup.org/susv3xsh/strptime.html

I guess that could explain why it works on linux then.  Obviously, it's
not portable to rely on that behavior though.

 initialized properly.  And pre-initializing to all 0s (as in struct tm try = 
 {0,};)
 does not work, either, since the rules of time.h state that tm_month
 must be 1 - 12.  In short, struct tm is a nightmare to use, but we are
 stuck with it for standardized backwards compatibility.

Actually tm_mon must be in the range [0,11].  You might have been
thinking of tm_mday which unlike all the others is 1-based, [1,31].  In
this particular example though it's probably sufficient to initialize tm
with { 0 } since both tm_mday and tm_mon should be filled in by strptime
on success.  However, to truly be correct you'd have to check not only
that strptime didn't return NULL, but that it parsed the entire format
string and stopped at the expected point rather than failing early.

Brian

--
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: stat file -- cygwin vs. Windows size?

2005-06-24 Thread Herb Martin
Thanks folks -- the confirmation that I was on the right
path was a big help.

The suggestions to do it right were well intentioned 
but impractical since I didn't want to take over support
for TWO major software packages (or either one for that
matter.)

A small patch seems to work.  (Keep the bytes spooled
and send that number rather than whatever stat was 
showing.)

Since the bytes spooled to the file are what gets sent
to spamd that seems to be an accurate number.

I had a little trouble at first since it seemed the
file was cached (if it was written more than once
it really was only written to disk ONE TIME -- so 
zero'ing the counter in the wrong place was hosing
my first naive attempt.

--
Herb




--
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: NFS errors

2005-06-24 Thread Crump, Michael
When I was trying to get NFS working a few months back I found that if
you have more than one network connection on the server machine all of
the connections have to be enabled and connected to a network.  After I
did this nfs did work.

-Original Message-
From: Larry Hall [mailto:[EMAIL PROTECTED] 
Sent: Friday, June 24, 2005 2:31 PM
To: [EMAIL PROTECTED]; cygwin@cygwin.com
Subject: Re: NFS errors

At 01:59 PM 6/24/2005, you wrote:
After an abortive attempt a few months back, I am trying once more to
get
NFS working (Windows XP, cygwin 1.5.15).  The daemons (portmap, mountd,
and


Maybe you want to update to current (or snapshot) Cygwin (at least)?


nfsd) start up without error.  I have a /etc/exports file that
contains:

/exports/c  rowan(rw)


Don't you need something like squash_uids here to handle your Windows
to
*nix user ID mapping?


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


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



Bash 3.0-2 and kill

2005-06-24 Thread Angelo Graziosi

I have noted that when one uses 

   kill -9 process-PID

in bash 3.0-2 (test), the command kills the process but also bash (even
if one uses /bin/kill...).

In bash 2.05b-17 that command kills only the process.

These things happen with

   cygwin 1.5.16-1
   cygwin 1.5.17-1
   snaps. 20050615
   snaps. 20050617
   snaps. 20050621

(I have listed only the snaps I tried)

Which is the normal behaviour (3.0-2 or 2.05b-17)?

Best regards
angelo



--
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: Bash 3.0-2 and kill

2005-06-24 Thread Igor Pechtchanski
On Fri, 24 Jun 2005, Angelo Graziosi wrote:

 I have noted that when one uses

kill -9 process-PID

 in bash 3.0-2 (test), the command kills the process but also bash (even
 if one uses /bin/kill...).

 In bash 2.05b-17 that command kills only the process.

 These things happen with

cygwin 1.5.16-1
cygwin 1.5.17-1
snaps. 20050615
snaps. 20050617
snaps. 20050621

 (I have listed only the snaps I tried)

 Which is the normal behaviour (3.0-2 or 2.05b-17)?

Unless the process-PID refers to the bash process itself, it seems that
the behavior of 3.0-2 is wrong.  Not sure if it's a bash bug, or a Cygwin
signal handling bug exposed by bash (the behavior of /bin/kill seems to
point toward the latter).

To help debug this, please provide the exact sequence of commands you used
to trigger this behavior, as well as the output of cygcheck -svr on your
system.
Igor
-- 
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!

The Sun will pass between the Earth and the Moon tonight for a total
Lunar eclipse... -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT

--
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: stat file -- cygwin vs. Windows size?

2005-06-24 Thread Gary R. Van Sickle
 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of Jason Pyeron
 Sent: Friday, June 24, 2005 2:40 PM
 To: cygwin@cygwin.com
 Subject: RE: stat file -- cygwin vs. Windows size?
 
 
 The binary size is accurate, text, by its nature may never be 
 correct on any operating system, since it is buffered, 
 parsed, etc by the OS in an OS dependent way.
 

Actually I am not sure that's correct.  I am unaware of any *OS* that does
anything like that (maybe the DOS INT13 stuff did, but we're talking ancient
history there).  The ones I can think of are sane enough to treat files as
what they are, i.e. a string of bytes, at the system call level, and do no
inspection of any kind on the contents (none that you're supposed to have to
care about anyway).

The culprit in this confusion is not the OSes but the C runtimes, and the
fact that on different OSes, some text file formats are more common than
others.  The C runtime essentially assumes that all files are text files,
when of course this is not and has never been the case.  What really should
be done is the deprecation of all texty features of the FILE object (e.g.
stuff like fprintf()), and create a new FILE_TEXT object which inherits
from FILE and adds all the texty operations such as fprintf(), fscanf(),
etc, in addition to being able to handle any of the myriad text file formats
in existence.

But that would make too much sense, so I for one shall not hold my breath.

-- 
Gary R. Van Sickle


--
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: Bash 3.0-2 and kill

2005-06-24 Thread Christopher Faylor
On Fri, Jun 24, 2005 at 05:38:02PM -0400, Igor Pechtchanski wrote:
On Fri, 24 Jun 2005, Angelo Graziosi wrote:

 I have noted that when one uses

kill -9 process-PID

 in bash 3.0-2 (test), the command kills the process but also bash (even
 if one uses /bin/kill...).

 In bash 2.05b-17 that command kills only the process.

 These things happen with

cygwin 1.5.16-1
cygwin 1.5.17-1
snaps. 20050615
snaps. 20050617
snaps. 20050621

 (I have listed only the snaps I tried)

 Which is the normal behaviour (3.0-2 or 2.05b-17)?

Unless the process-PID refers to the bash process itself, it seems that
the behavior of 3.0-2 is wrong.  Not sure if it's a bash bug, or a Cygwin
signal handling bug exposed by bash (the behavior of /bin/kill seems to
point toward the latter).

Given that if cygwin was this broken all sorts of other things would be
broken as well, this is more likely a problem with bash.  Running bash
under zsh and trying a few kill -9's I finally got bash to exit with a
segmentation fault, which is more likely to be a problem with bash
than with cygwin.

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: strptime error when setting a different TimeZone with export TZ=UTC

2005-06-24 Thread Eric Blake
 
 Actually tm_mon must be in the range [0,11].  You might have been
 thinking of tm_mday which unlike all the others is 1-based, [1,31]. 

You got me, and I even had the POSIX spec open in front of me when
I read the wrong line as to which field was 1-based. :)

 In
 this particular example though it's probably sufficient to initialize tm
 with { 0 } since both tm_mday and tm_mon should be filled in by strptime
 on success.  However, to truly be correct you'd have to check not only
 that strptime didn't return NULL, but that it parsed the entire format
 string and stopped at the expected point rather than failing early.

Isn't portable programming fun?

--
Eric Blake



--
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] New package: apache2-2.0.54-1 (and subpackages apache2-devel, apache2-manual)

2005-06-24 Thread Max Bowsher

Henry Katz wrote:

Max Bowsher maxb at ukf.net writes:


Apache httpd version 2.0, the popular web server, is now packaged for the
Cygwin distribution, and arriving soon to a mirror near
you.

Apache is compiled with --enable-mods-shared=all, so a fairly large
selection of modules is included. I will take requests for
additional modules contained within the Apache httpd distribution 
itself -

please ask on cygwin (at) cygwin (dot) com.

I do not, at present, have plans to package PHP or mod_perl, though I'm
happy to work with anyone wishing to do so.

I will consider packaging additional modules not within the Apache http
distribution on request, provided their build system isn't
too complicated.

I do intend to package the Subversion Apache modules soon.

Max Bowsher.


Max,

How do we incorporate additional shared objects into this such as the
subversion mod_dav_svn.so? I've had terrible luck following the cookbook
at apache (http://httpd.apache.org/docs-2.0/dso.html) or that at
cygwin (http://cygwin.com/cygwin-ug-net/dll.html).


Subversion's a bit of a special case, since it's got an apache module 
produced by a complex buildsystem which does lots of other things too.
I've got it working on my system, though, and aim to be tidying it up and 
releasing a cygwin package soon.



I tried a shortcut
which was copying over the svn module packaged in subversion on cygwin

cygcheck -l subversion | grep dav | grep dll
/usr/bin/cygsvn_ra_dav-1-0.dll

and copying it to the modules dir as

-rwxr-x---  1 W014786 None 85K Jun 24 14:42 /cygdrive/c/Program 
Files/Apache

Group/Apache2/modules/mod_dav_svn.so*


Umm. That is wrong in _so_ many ways.

You've taken a random cygwin dll that isn't even an apache module of any 
kind, renamed it to something totally different, and then tried to load it 
into a _native windows_ apache server.


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: GPC Error

2005-06-24 Thread Gerrit P. Haase

Daniel Zingaro wrote:


Hi all,

I have been using Cygwin on this Windows XP machine for about a year 
without a problem. Specifically, I've been using GNU Pascal to compile 
my Pascal source. Since I hadn't updated Cygwin in a while, I did so, 
and now I receive the following error when I try to compile anything 
with GPC:


~gpc --automake compiler.pas
/usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/../../../../i686-pc-cygwin/bin/ld: 
crtbegi

n.o: No such file: No such file or directory

A gpc --version gives me:
gpc 20040516, based on gcc-3.3.3 (cygwin special)

I've uninstalled everything Cygwin-related, and reinstalled, and still 
receive this error. Is there a resolution for this one?


Thanks for any assistance,
Dan


I'm sorry, the Pascal frontend is not yet available for gcc-3.4.x, I 
hope it can be included again soon.  Until then please use gcc-3.3.3.



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: More robust color terminal

2005-06-24 Thread Dave Hughes
On Fri, June 24, 2005 15:45, Igor Pechtchanski said:
 On Thu, 23 Jun 2005, Laran Evans wrote:
[snip]
 Any suggestions?

 Both rxvt and the cmd.exe window only support 16 colors.  I guess you
could run X and use an xterm (which should support 256 colors, IIRC).

 Alternatively, you could compile (and, hopefully, contribute) gvim. :-)

I vaguely recall trying to build gvim on Cygwin some time ago (and
failing) but, as Reid Thompson pointed out elsewhere in this thread, gvim
builds OOTB now. I've just tried this and it works like a charm (no
special configure switches or anything, just a straight pull from CVS of
the latest source, hit make and let it go)! Spent an hour hacking around
some Python in gvim (GTK GUI) under Cygwin and found not one single
problem. Very nice :-)

Hopefully I'm not rushing headlong into this, but I've just skimmed
through the Package Contributor's Guide and I think I might be able to put
together a package for gvim (and, if building it stays this easy, maintain
it). A few thoughts occurred though, and I just wanted to check I'm not
completely mad (which is a distinct possibility at this time of the
morning):

I can understand the rationale behind wanting to package gvim separately
to vim (allows for people who want vim, but don't want X). However,
they're basically the same app. Would it make sense for a gvim package to
include just the gvim binary, and have a dependency on the main vim
package to provide the runtime files (syntax highlighting configs and such
like)?

If that's the case, it also sounds like the gvim package wouldn't include
a src package but would use the external-source directive in the
setup.hint to point at the vim package's sources. Or am I talking crazy talk?

Anyway, I'll have a look at the natty package build-script tomorrow and
see if I can't come up with something ... but right now I've got to catch
up on a week of sleep deprivation :-)

-- 
Dave Hughes



--
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: More robust color terminal

2005-06-24 Thread Igor Pechtchanski
On Sat, 25 Jun 2005, Dave Hughes wrote:

 On Fri, June 24, 2005 15:45, Igor Pechtchanski said:
  On Thu, 23 Jun 2005, Laran Evans wrote:
 [snip]
  Any suggestions?
 
  Both rxvt and the cmd.exe window only support 16 colors.  I guess you
  could run X and use an xterm (which should support 256 colors, IIRC).

This should really say currently only support 16 colors, in light of
Reid's message about recompiling rxvt...

  Alternatively, you could compile (and, hopefully, contribute) gvim. :-)

 I vaguely recall trying to build gvim on Cygwin some time ago (and
 failing) but, as Reid Thompson pointed out elsewhere in this thread, gvim
 builds OOTB now. I've just tried this and it works like a charm (no
 special configure switches or anything, just a straight pull from CVS of
 the latest source, hit make and let it go)! Spent an hour hacking around
 some Python in gvim (GTK GUI) under Cygwin and found not one single
 problem. Very nice :-)

 Hopefully I'm not rushing headlong into this, but I've just skimmed
 through the Package Contributor's Guide and I think I might be able to put
 together a package for gvim (and, if building it stays this easy, maintain
 it).

That's great.

 A few thoughts occurred though, and I just wanted to check I'm not
 completely mad (which is a distinct possibility at this time of the
 morning):

 I can understand the rationale behind wanting to package gvim separately
 to vim (allows for people who want vim, but don't want X).

Well, gvim is kinda special.  You might want to compile it with both the
X11 libraries and W11 libraries from rxvt, to allow people to run windowed
gvim without X.  I don't know how easy or hard it is, just a thought.

 However, they're basically the same app. Would it make sense for a gvim
 package to include just the gvim binary, and have a dependency on the
 main vim package to provide the runtime files (syntax highlighting
 configs and such like)?

Definitely yes.  It would make even more sense to split the vim package
into the base editor and the runtime support files.  Corinna Vinschen,
who, in addition to being the Cygwin project co-leader, also maintains
quite a few packages (including vim), has repeatedly expressed desire to
hand off some of her packages.  Don't know if vim is one of them, but it
doesn't hurt to ask.  If you take over vim (provided Corinna agrees), you
can handle the proper repackaging easily enough.

 If that's the case, it also sounds like the gvim package wouldn't
 include a src package but would use the external-source directive in the
 setup.hint to point at the vim package's sources. Or am I talking crazy
 talk?

No, that sounds about right.  You'd need to coordinate with the vim
maintainer for this, though, since the vim build script won't actually
produce the gvim binary package.  You could also provide the gvim build
script as the sole file in the source package, and simply require the vim
source to be present...

 Anyway, I'll have a look at the natty package build-script tomorrow and
 see if I can't come up with something ... but right now I've got to
 catch up on a week of sleep deprivation :-)

Good luck.  Don't forget, the generic-build-script is designed to be
edited to adjust it for each package.  FWIW, if you find yourself making
changes that would make the g-b-s more configurable, please consider
submitting a patch to the cygwin-apps list.

Incidentally, if you intend to maintain a package, you'll need to
subscribe to the cygwin-apps list.
Igor
-- 
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!

The Sun will pass between the Earth and the Moon tonight for a total
Lunar eclipse... -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT

--
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: Bash 3.0-2 and kill

2005-06-24 Thread Igor Pechtchanski
On Fri, 24 Jun 2005, Christopher Faylor wrote:

 On Fri, Jun 24, 2005 at 05:38:02PM -0400, Igor Pechtchanski wrote:
 On Fri, 24 Jun 2005, Angelo Graziosi wrote:
 
  I have noted that when one uses
 
 kill -9 process-PID
 
  in bash 3.0-2 (test), the command kills the process but also bash (even
  if one uses /bin/kill...).
 
  In bash 2.05b-17 that command kills only the process.
 
  These things happen with
 
 cygwin 1.5.16-1
 cygwin 1.5.17-1
 snaps. 20050615
 snaps. 20050617
 snaps. 20050621
 
  (I have listed only the snaps I tried)
 
  Which is the normal behaviour (3.0-2 or 2.05b-17)?
 
 Unless the process-PID refers to the bash process itself, it seems that
 the behavior of 3.0-2 is wrong.  Not sure if it's a bash bug, or a Cygwin
 signal handling bug exposed by bash (the behavior of /bin/kill seems to
 point toward the latter).

 Given that if cygwin was this broken all sorts of other things would be
 broken as well, this is more likely a problem with bash.

One reason for my guess was that I recalled discussions of bash using
pretty specialized spawn techniques, and it was likely to have some corner
case interaction with signal handling that normal programs wouldn't
encounter.  There may also be something different about the SIGCHLD that
bash is getting when the child is killed with SIGKILL.  But that was no
more than a guess, and yes, it's quite possible that there's a bug in the
bash signal handler.

 Running bash under zsh and trying a few kill -9's I finally got bash to
 exit with a segmentation fault, which is more likely to be a problem
 with bash than with cygwin.

Fair enough.  I did ask the OP for the exact steps to reproduce the
problem, including the exact message he got from bash.  If he responds,
we'll see whether he saw the same symptoms you did.
Igor
-- 
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!

The Sun will pass between the Earth and the Moon tonight for a total
Lunar eclipse... -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT

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