public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* windres broken
@ 2017-01-07  4:10 Steven Penny
  2017-01-07 13:47 ` Ken Brown
  2017-01-07 14:01 ` Hans-Bernhard Bröker
  0 siblings, 2 replies; 6+ messages in thread
From: Steven Penny @ 2017-01-07  4:10 UTC (permalink / raw)
  To: cygwin

Something is wrong with windres:

    $ windres myapp.rc -o myapp.res
    Usage: windres [option(s)] [input-file] [output-file]
     The options are:
      -i --input=<file>            Name input file
      -o --output=<file>           Name output file
      -J --input-format=<format>   Specify input format

The syntax above is shown here:

http://cygwin.com/cygwin-ug-net/windres.html

Yet the command just prints usage instead of doing the thing. This command
works:

    windres myapp.rc myapp.res

However this shouldnt be needed as described by the man:

    -i filename
        The name of the input file.  If this option is not used, then
        windres will use the first non-option argument as the input file
        name.

This is a problem because Git itself uses the "input -o output" syntax, which
should be working:

http://github.com/git/git/blob/e05806d/Makefile#L1816-L1819

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

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

* Re: windres broken
  2017-01-07  4:10 windres broken Steven Penny
@ 2017-01-07 13:47 ` Ken Brown
  2017-01-07 18:54   ` Steven Penny
  2017-01-07 14:01 ` Hans-Bernhard Bröker
  1 sibling, 1 reply; 6+ messages in thread
From: Ken Brown @ 2017-01-07 13:47 UTC (permalink / raw)
  To: cygwin

On 1/6/2017 11:10 PM, Steven Penny wrote:
> Something is wrong with windres:
>
>     $ windres myapp.rc -o myapp.res
>     Usage: windres [option(s)] [input-file] [output-file]
>      The options are:
>       -i --input=<file>            Name input file
>       -o --output=<file>           Name output file
>       -J --input-format=<format>   Specify input format
>
> The syntax above is shown here:
>
> http://cygwin.com/cygwin-ug-net/windres.html
>
> Yet the command just prints usage instead of doing the thing. This command
> works:
>
>     windres myapp.rc myapp.res
>
> However this shouldnt be needed as described by the man:
>
>     -i filename
>         The name of the input file.  If this option is not used, then
>         windres will use the first non-option argument as the input file
>         name.
>
> This is a problem because Git itself uses the "input -o output" syntax, which
> should be working:
>
> http://github.com/git/git/blob/e05806d/Makefile#L1816-L1819

That syntax works for me.  Are you sure you're using Cygwin's windres?

Ken


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

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

* Re: windres broken
  2017-01-07  4:10 windres broken Steven Penny
  2017-01-07 13:47 ` Ken Brown
@ 2017-01-07 14:01 ` Hans-Bernhard Bröker
  1 sibling, 0 replies; 6+ messages in thread
From: Hans-Bernhard Bröker @ 2017-01-07 14:01 UTC (permalink / raw)
  To: cygwin

Am 07.01.2017 um 05:10 schrieb Steven Penny:
> Something is wrong with windres:
>
>     $ windres myapp.rc -o myapp.res
>     Usage: windres [option(s)] [input-file] [output-file]
>      The options are:
>       -i --input=<file>            Name input file
>       -o --output=<file>           Name output file
>       -J --input-format=<format>   Specify input format

What version of windres is that?  That same command works just fine, 
here (from package binutils-2.25-4 on cygwin64).

> The syntax above is shown here:
>
> http://cygwin.com/cygwin-ug-net/windres.html

That's just an example, and for actual documentation it points to GNU 
binutils documentation.  So if anything, this example could be wrong, 
but if there's really something wrong, you should take this up with the 
binutils people.

> Yet the command just prints usage instead of doing the thing.

Well, strictly speaking, according to that syntax, the above command 
_is_ wrong.  -o myapp.res is an option, and as such it should have come 
_before_ the [input-file] argument, myapp.rc.  But like I said, the 
problem does not reproduce here.

> This command works:
>
>     windres myapp.rc myapp.res

Well, FWIW that one does follow the syntax.


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

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

* Re: windres broken
  2017-01-07 13:47 ` Ken Brown
@ 2017-01-07 18:54   ` Steven Penny
  2017-01-07 22:14     ` Ken Brown
  0 siblings, 1 reply; 6+ messages in thread
From: Steven Penny @ 2017-01-07 18:54 UTC (permalink / raw)
  To: cygwin

On Sat, 7 Jan 2017 08:47:35, Ken Brown wrote:
> That syntax works for me.  Are you sure you're using Cygwin's windres?

I figured it out. If POSIXLY_CORRECT is set in the environment, it causes the
problem I was having. This should probably be documented somewhere.


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

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

* Re: windres broken
  2017-01-07 18:54   ` Steven Penny
@ 2017-01-07 22:14     ` Ken Brown
  2017-01-11  5:24       ` Steven Penny
  0 siblings, 1 reply; 6+ messages in thread
From: Ken Brown @ 2017-01-07 22:14 UTC (permalink / raw)
  To: cygwin

On 1/7/2017 1:54 PM, Steven Penny wrote:
> On Sat, 7 Jan 2017 08:47:35, Ken Brown wrote:
>> That syntax works for me.  Are you sure you're using Cygwin's windres?
>
> I figured it out. If POSIXLY_CORRECT is set in the environment, it causes the
> problem I was having. This should probably be documented somewhere.

 From http://man7.org/linux/man-pages/man3/opterr.3.html:

By default, getopt() permutes the contents of argv as it scans, so that 
eventually all the nonoptions are at the end.  Two other modes are also 
implemented.  If the first character of optstring is '+' or the 
environment variable POSIXLY_CORRECT is set, then option processing 
stops as soon as a nonoption argument is encountered.

Ken

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

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

* Re: windres broken
  2017-01-07 22:14     ` Ken Brown
@ 2017-01-11  5:24       ` Steven Penny
  0 siblings, 0 replies; 6+ messages in thread
From: Steven Penny @ 2017-01-11  5:24 UTC (permalink / raw)
  To: cygwin

On Sat, 7 Jan 2017 17:14:24, Ken Brown wrote:
>  From http://man7.org/linux/man-pages/man3/opterr.3.html:
> By default, getopt() permutes the contents of argv as it scans, so that 
> eventually all the nonoptions are at the end.  Two other modes are also 
> implemented.  If the first character of optstring is '+' or the 
> environment variable POSIXLY_CORRECT is set, then option processing 
> stops as soon as a nonoption argument is encountered.

Thanks for this. The Git repo accepted my commit to use POSIX syntax:

http://github.com/git/git/commit/7c44b33

I think it makes sense for the Cygwin example to use POSIX syntax as well, or at
least make a note of it.


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

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

end of thread, other threads:[~2017-01-11  5:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-07  4:10 windres broken Steven Penny
2017-01-07 13:47 ` Ken Brown
2017-01-07 18:54   ` Steven Penny
2017-01-07 22:14     ` Ken Brown
2017-01-11  5:24       ` Steven Penny
2017-01-07 14:01 ` Hans-Bernhard Bröker

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).