This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] gjnih


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]