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

Remove src/java.desktop/unix/classes/sun/awt/X11/keysym2ucs.h



    • b20



        Copying notes from https://bugs.openjdk.java.net/browse/JDK-8210776 which is about needing to keep an "up to date"
        copy of the file keysym2ucs.h, mentioned in legal/xwindows.md
        as being an imported X11 header.

        keysym2ucs.h is a strange bird.
        It is not an actual C header file, but embeds one.
        It is located in openjdk as src/java.desktop/unix/classes/sun/awt/X11/keysym2ucs.h
        (Yes, this means it is co-located with Java source files, not C source).
        There is also an awk script genhash.awk which has this comment

        :# With this script one can generate a new version XKeysym.java file out
        # of keysym2ucs.h prototype and UnicodeData.txt database.
        # Latter file should be fetched from a unicode.org site, most
        # probably http://www.unicode.org/Public/UNIDATA/UnicodeData.txt

        So this is really an off-line tool to generate a Java file which is then checked in.
        The C header file it is based on is (typically) /usr/include/X11/keysymdef.h
        So this is the actual X11 header file we "include".
        Perhaps we could run this tool during the build parsing system headers, but
        a) it would require work on the tool
        b) it might be the file is massaged, so more work on the tool
        c) Apparently you need UnicodeData.txt too ..

        But "keeping this up to date" looks like a really tricky one, as its not clear what it even means.
        In summary, I'd prefer this to "go away" :-)

        So updating the tool so that it uses an external copy of this file, rather than an embedded one
        is the first thing to investigate, but it could be tricky.

        And tricky it is .. the embedded source is massaged to mark unwanted entries so they can be skipped


        So I conclude the best thing to do here is to remove the file.
        It is not remotely worth the trouble of re-creating an updated one
        every time X11 revs it.


          Issue Links



                prr Philip Race
                prr Philip Race
                0 Vote for this issue
                3 Start watching this issue