[OpenJDK 2D-Dev] Dont use libjpeg-internal macros in splashscreen (original) (raw)
Omair Majid omajid at redhat.com
Wed Apr 30 20:48:32 UTC 2014
- Previous message: [OpenJDK 2D-Dev] [9] Review Request: 8042103 Deserialization of empty java.awt.geom.Path2D will cause an exception
- Next message: [OpenJDK 2D-Dev] Dont use libjpeg-internal macros in splashscreen
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi,
As indicated in the libjpeg API documentation [1], the standard libjpeg headers are: jpeglib.h, jerror.h, jconfig.h, jmorecfg.h.
splashscreen_jpeg.c violates this layering and uses the SIZEOF macro from the non-public header jinclude.h directly. This macro is a wrapper over sizeof. The code in splashscreen_jpeg.c already uses sizeof in multiple places so it seems like it should be okay to use it in some more.
The following webrev fixes it: http://cr.openjdk.java.net/~omajid/webrevs/libjpeg-internal-macros/01/
One motivation of having this patch is that if/when we add system-libjpeg support, the header jinclude.h will become inaccessible.
Thanks, Omair
[1] http://svn.code.sf.net/p/libjpeg-turbo/code/trunk/libjpeg.txt
-- PGP Key: 66484681 (http://pgp.mit.edu/) Fingerprint = F072 555B 0A17 3957 4E95 0056 F286 F14F 6648 4681
- Previous message: [OpenJDK 2D-Dev] [9] Review Request: 8042103 Deserialization of empty java.awt.geom.Path2D will cause an exception
- Next message: [OpenJDK 2D-Dev] Dont use libjpeg-internal macros in splashscreen
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]