Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4112703

portability: suggested portability improvements to make tools easier to port

    Details

    • Subcomponent:
    • CPU:
      generic
    • OS:
      solaris_2.5.1

      Description

      Portability bugs related to ANSI-C in JAE 1.2:

      In the following patch listing, "L" refers to the left path which is original
      file from JavaSoft and "R" refers to the right path which is our modified file.
      At the end of each "---------" line is ANSI-C, see below for explanation.

      The use of absolute directory names, such as "/tmp" in javah.c should be in
      platform-specific headers.

      Comparison of J:\JAE1_2T\src\share\tools\javah\JAVAH.C and
      J:\PC\SHARE\tools\javah\JAVAH.C
      Version 1.99

      ----------------------------------------------------- ANSI-C
      L73 static char *tempdir = "/tmp";

      R73 static char *tempdir = "/-/java/dir/tmp";



      Opening of class files may need special treatment on host platforms that are not
      UNIX or DOS based. The actual call to open should be in a macro that is in a
      platform specific header file.

      Comparison of J:\JAE1_2T\src\share\tools\javah\JAVAH.C and
      J:\PC\SHARE\tools\javah\JAVAH.C
      Version 1.99

      ----------------------------------------------------- ANSI-C
      L1386 if (fn == 0 || (codefd = open(fn, 0, 0644)) < 0
      L1387 || fstat(codefd, st) < 0)

      R1386 if (fn == 0 ||
      R1387 (codefd = open(fn,
      R1388 0|_O_ATTRIBUTE|_O_BINARY,
      R1389 "EXTMODE=ASCII,INTMODE=ASCII")) < 0 ||
      R1390 fstat(codefd, st) < 0)

        Attachments

          Activity

            People

            • Assignee:
              jmcilreesunw James Mcilree (Inactive)
              Reporter:
              jbenoit Jonathan Benoit (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: