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

Entire JDK should be built with -D_FILE_OFFSET_BITS=64

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Won't Fix
    • Icon: P3 P3
    • 14
    • 9
    • infrastructure
    • Unix

      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?

            Unassigned Unassigned
            martin Martin Buchholz
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: