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

Entire JDK should be built with -D_FILE_OFFSET_BITS=64

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P3
    • Resolution: Won't Fix
    • Affects Version/s: 9
    • Fix Version/s: 14
    • Component/s: infrastructure
    • Labels:
    • Environment:

      Unix

      Description

      The JDK should use 64-bit file offsets whenever the OS provides it.
      By far the easiest way to do it is to build everything with _FILE_OFFSET_BITS=64 and use standard functions and types like off_t and stat everywhere. The only downside is that this has to be a global transformation of the entire JDK build, and all _LARGEFILE64_SOURCE artifacts like e.g. fstatat64 should be changed back to fstatat. It would be hard for anyone other than the build team to do this (or at least someone with access to test on many machines, e.g. via jprt). Maybe it needs to be done as a JEP.

      Plan:

      Add -D_FILE_OFFSET_BITS=64 to all the compiler configure variables for Unix like CFLAGS_JDKEXE.

      Add configure tests for all system functions like fstatat that currently don't have them. Consistently use configure macros instead of system macros to test e.g. #ifdef HAVE_FSTATAT.

      Remove all references to _LARGEFILE64_SOURCE or _LARGEFILE_SOURCE. Replace all LFS 64-bit transition functions with their standard variants.

      What could go wrong?

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              martin Martin Buchholz
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: