[patch] gjnih

Thomas Fitzsimmons fitzsim@redhat.com
Thu Apr 28 23:55:00 GMT 2005


On Thu, 2005-04-28 at 19:44 -0400, Andrew Pinski wrote:
> On Apr 28, 2005, at 7:41 PM, Thomas Fitzsimmons wrote:
> 
> > Hi,
> >
> > This patch adds another front-end to gcjh, called gjnih.  It is 
> > intended
> > to be a command-line compatible replacement for Sun's javah tool.  It
> > generates JNI headers by default.  "make check" in libjava shows no new
> > regressions.  OK for mainline?
> 
> You should not encode the executable name in the output so:
> +  return gjavah_main (argc, argv, 1, "gjnih");
> 
> Should be instead:
> +  return gjavah_main (argc, argv, 1, argv[0]);
> 
> 
> This is a GNU code style requirement by the way.
> 

No, the GNU Coding Standards say the opposite.  From Section 4.6:

The first line is meant to be easy for a program to parse; the version
number proper starts after the last space. In addition, it contains the
canonical name for this program, in this format: 

          GNU Emacs 19.30
     

The program's name should be a constant string; don't compute it from
argv[0]. The idea is to state the standard or canonical name for the
program, not its file name. There are other ways to find out the precise
file name where a command is found in PATH.

Tom




More information about the Java-patches mailing list