public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* RE: cygwin and GPL
@ 2001-09-04  1:15 Bernard Dautrevaux
  2001-09-04  1:29 ` awk script compile problem hrishy
  0 siblings, 1 reply; 5+ messages in thread
From: Bernard Dautrevaux @ 2001-09-04  1:15 UTC (permalink / raw)
  To: 'Nicolas Grehalle', cygwin

> -----Original Message-----
> From: Nicolas Grehalle [ mailto:ngrehalle@rennes.jouve.fr ]
> Sent: Tuesday, September 04, 2001 8:19 AM
> To: cygwin@cygwin.com
> Subject: cygwin and GPL
> 
> 
> hello,
> 
> I have a law problem.
> I use cygwin on a CDROM to launch Apache and MySQL. This 
> services allow to
> use my application (a CGI program, in C) with a WebBrowser, 
> IE for example,
> on a local machine.
> 
> I can put cygwin sources on my Distribution, but I can't do 
> that with my
> application sources, because this application is a protoype 
> of a commercial
> one.
> 
> Could I distribute cygwin and my application on a commercial 
> CDROM, but
> without the sources of my application (but with all sources 
> and requirements
> of cygwin) ?
> 
> Thank you for help

All depends on your application:

If you just use cygwin because you need a bash shell and some *nix utilities
but compile your application natively for Windows (using mingw or
-mno-cygwin), that is if you own application do *not* reference cygwin1.dll
in any way, the you just need to put the sources for the cygwin packages
that you provide in binary format.

OTOH, if your application uses cygwin1.dll, then your application *is*
GPLed, so you *must* give access to the source code to anybody gets the
binary. The only alternative is to buy a commercial cygwin license to
RedHat.

Best regards,

	Bernard

PS: Of course, as usual, IANAL and I don't talk for RedHat.

--------------------------------------------
Bernard Dautrevaux
Microprocess Ingenierie
97 bis, rue de Colombes
92400 COURBEVOIE
FRANCE
Tel:	+33 (0) 1 47 68 80 80
Fax:	+33 (0) 1 47 88 97 85
e-mail:	dautrevaux@microprocess.com
		b.dautrevaux@usa.net
-------------------------------------------- 

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* awk script compile problem
  2001-09-04  1:15 cygwin and GPL Bernard Dautrevaux
@ 2001-09-04  1:29 ` hrishy
  2001-09-04  4:55   ` Marco Craveiro
  2001-09-04  7:57   ` Keith Seitz
  0 siblings, 2 replies; 5+ messages in thread
From: hrishy @ 2001-09-04  1:29 UTC (permalink / raw)
  To: cygwin

Hello

a few minutes ago i installed cygwin and i tried to
run the following program.

#This is the awk script that will be called by main.sh
#the feild separator is |
#Created by Hrishikesk Samant
#Created on 08-Aug-2001
#BEGIN
{ 
	FS="|" 
}
if  (( $2  ~  /Label/ )  &&  ( $3  ~  /Not found/ )) {
	label=label+1
} 
if  (( $2  ~  /Form/  ) && ( $3 ~  /Not found/ )) {
	form=form+1
}
if  ((  $2  ~  /Report/ ) && ( $3 ~  /Not found/  )){
	report=report+1
}
END { print FILENAME, "\t" label "\t"form "\t" report
>>"result.log"}

this program runs correctly under mkstoolkit and on my
linux box.but fails to under cygwin.

with a parse error ^ if  ((  $2  ~  /Report/ ) && ( $3
~  /Not found/  )){

can somebody tell me whats wrong??

____________________________________________________________
Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: awk script compile problem
  2001-09-04  1:29 ` awk script compile problem hrishy
@ 2001-09-04  4:55   ` Marco Craveiro
  2001-09-04  7:57   ` Keith Seitz
  1 sibling, 0 replies; 5+ messages in thread
From: Marco Craveiro @ 2001-09-04  4:55 UTC (permalink / raw)
  To: hrishy; +Cc: cygwin

On 04 Sep 2001 09:29:45 +0100, hrishy wrote:
> Hello
> 
> a few minutes ago i installed cygwin and i tried to
> run the following program.
> 
> #This is the awk script that will be called by main.sh
> #the feild separator is |
> #Created by Hrishikesk Samant
> #Created on 08-Aug-2001
> #BEGIN
> { 
> 	FS="|" 
> }
> if  (( $2  ~  /Label/ )  &&  ( $3  ~  /Not found/ )) {
> 	label=label+1
> } 
> if  (( $2  ~  /Form/  ) && ( $3 ~  /Not found/ )) {
> 	form=form+1
> }
> if  ((  $2  ~  /Report/ ) && ( $3 ~  /Not found/  )){
> 	report=report+1
> }
> END { print FILENAME, "\t" label "\t"form "\t" report
> >>"result.log"}
> 
> this program runs correctly under mkstoolkit and on my
> linux box.but fails to under cygwin.
> 
> with a parse error ^ if  ((  $2  ~  /Report/ ) && ( $3
> ~  /Not found/  )){
> 
> can somebody tell me whats wrong??
> 
> ____________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
> or your free @yahoo.ie address at http://mail.yahoo.ie
> 
> --
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
> Bug reporting:         http://cygwin.com/bugs.html
> Documentation:         http://cygwin.com/docs.html
> FAQ:                   http://cygwin.com/faq/
> 
> 
IIRC from my gawk days, you dont need the if when defining a rule in
gawk, just the rule itself:

(( $2  ~  /Label/ )  &&  ( $3  ~  /Not found/ )) 
{
        label=label+1
} 

you can still use ifs but they are normally placed in the body of the
rule. if standard awk works diferently, you can always set gawk to
behave like awk doing --compat, i think - but the man page is your
friend. a good place to look for differences is also the info manual,
its very complete.

hope it helps.

-- 
be as one already dead -- tokkotai saying


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: awk script compile problem
  2001-09-04  1:29 ` awk script compile problem hrishy
  2001-09-04  4:55   ` Marco Craveiro
@ 2001-09-04  7:57   ` Keith Seitz
  2001-09-04 21:12     ` hrishy
  1 sibling, 1 reply; 5+ messages in thread
From: Keith Seitz @ 2001-09-04  7:57 UTC (permalink / raw)
  To: hrishy; +Cc: cygwin

On Tue, 4 Sep 2001, [iso-8859-1] hrishy wrote:

> a few minutes ago i installed cygwin and i tried to
> run the following program.

I doubt very much that this worked on anything. This awk program clearly
has an obvious syntax error. On RH7.0:

keiths ~ >awk -f a.awk
awk: a.awk:10: if  (( $2  ~  /Label/ )  &&  ( $3  ~  /Not found/ )) {
awk: a.awk:10: ^ parse error
awk: a.awk:13: if  (( $2  ~  /Form/  ) && ( $3 ~  /Not found/ )) {
awk: a.awk:13: ^ parse error
awk: a.awk:16: if  ((  $2  ~  /Report/ ) && ( $3 ~  /Not found/  )){
awk: a.awk:16: ^ parse error

I also get similar errors on Solaris using its standard awk:

keiths ~ >/usr/bin/awk -f a.awk
awk: syntax error near line 10
awk: bailing out near line 10

The structure of an awk program looks like ("..." = statements):

[BEGIN] { ... }
{ ... }
[END] { ... }

Not like what you have:

{ ... }
...
END { ... }

Add braces ("{","}") at the appropriate places and it will work just fine.

> #BEGIN
> {
> 	FS="|"
> }
Add "{" here.

> if  (( $2  ~  /Label/ )  &&  ( $3  ~  /Not found/ )) {
> 	label=label+1
> }
> if  (( $2  ~  /Form/  ) && ( $3 ~  /Not found/ )) {
> 	form=form+1
> }
> if  ((  $2  ~  /Report/ ) && ( $3 ~  /Not found/  )){
> 	report=report+1
> }
Add "}" here.

> END { print FILENAME, "\t" label "\t"form "\t" report
> >>"result.log"}
>
> this program runs correctly under mkstoolkit and on my
> linux box.but fails to under cygwin.
>
> with a parse error ^ if  ((  $2  ~  /Report/ ) && ( $3
> ~  /Not found/  )){

Keith



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: awk script compile problem
  2001-09-04  7:57   ` Keith Seitz
@ 2001-09-04 21:12     ` hrishy
  0 siblings, 0 replies; 5+ messages in thread
From: hrishy @ 2001-09-04 21:12 UTC (permalink / raw)
  To: Keith Seitz, hrishy; +Cc: cygwin

Hello Keith

I am glad that you responded.Thanks a lott buddy for
the help.

regards
Hrishy



 --- Keith Seitz <keiths@cygnus.com> wrote: > On Tue,
4 Sep 2001, [iso-8859-1] hrishy wrote:
> 
> > a few minutes ago i installed cygwin and i tried
> to
> > run the following program.
> 
> I doubt very much that this worked on anything. This
> awk program clearly
> has an obvious syntax error. On RH7.0:
> 
> keiths ~ >awk -f a.awk
> awk: a.awk:10: if  (( $2  ~  /Label/ )  &&  ( $3  ~ 
> /Not found/ )) {
> awk: a.awk:10: ^ parse error
> awk: a.awk:13: if  (( $2  ~  /Form/  ) && ( $3 ~ 
> /Not found/ )) {
> awk: a.awk:13: ^ parse error
> awk: a.awk:16: if  ((  $2  ~  /Report/ ) && ( $3 ~ 
> /Not found/  )){
> awk: a.awk:16: ^ parse error
> 
> I also get similar errors on Solaris using its
> standard awk:
> 
> keiths ~ >/usr/bin/awk -f a.awk
> awk: syntax error near line 10
> awk: bailing out near line 10
> 
> The structure of an awk program looks like ("..." =
> statements):
> 
> [BEGIN] { ... }
> { ... }
> [END] { ... }
> 
> Not like what you have:
> 
> { ... }
> ...
> END { ... }
> 
> Add braces ("{","}") at the appropriate places and
> it will work just fine.
> 
> > #BEGIN
> > {
> > 	FS="|"
> > }
> Add "{" here.
> 
> > if  (( $2  ~  /Label/ )  &&  ( $3  ~  /Not found/
> )) {
> > 	label=label+1
> > }
> > if  (( $2  ~  /Form/  ) && ( $3 ~  /Not found/ ))
> {
> > 	form=form+1
> > }
> > if  ((  $2  ~  /Report/ ) && ( $3 ~  /Not found/ 
> )){
> > 	report=report+1
> > }
> Add "}" here.
> 
> > END { print FILENAME, "\t" label "\t"form "\t"
> report
> > >>"result.log"}
> >
> > this program runs correctly under mkstoolkit and
> on my
> > linux box.but fails to under cygwin.
> >
> > with a parse error ^ if  ((  $2  ~  /Report/ ) &&
> ( $3
> > ~  /Not found/  )){
> 
> Keith
> 
>  

____________________________________________________________
Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2001-09-04 21:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-09-04  1:15 cygwin and GPL Bernard Dautrevaux
2001-09-04  1:29 ` awk script compile problem hrishy
2001-09-04  4:55   ` Marco Craveiro
2001-09-04  7:57   ` Keith Seitz
2001-09-04 21:12     ` hrishy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).