GNOME Bugzilla – Bug 767164
Use compiler directives to export the symbols for libgdkpixbuf
Last modified: 2016-06-14 05:23:17 UTC
Hi, Currently, the GdkPixbuf library makes use of .symbols files to control the export of symbols, like what GLib and GTK+ used to do in the past. As GLib and GTK+ (and some others) now make use of compiler directives to export symbols when possible, I thought it would make sense to do the same here. This should reduce maintenance overhead a bit. With blessings, thank you!
Created attachment 328950 [details] [review] Fix index for 2.36 api additions Hi, First up is to fix the typo that occurred when the index for 2.36 was added...
Created attachment 328953 [details] [review] Decorate symbols with GDK_PIXBUF_AVAILABLE_IN*/GDK_PIXBUF_DEPRECATED_IN* Hi, This adds a new public header gdk-pixbuf-macros.h which will define the macros for the stable releases, for symbol availability as well as deprecations. This also decorates all the function symbols in the public headers with such macros (or replace G_DEPRECATEED_IN* with the corresponding GDK_PIXBUF_DEPRECATED_IN* macros). This also makes the availability macros available in the docs...
Created attachment 328954 [details] [review] Use compiler directives to export symbols Hi, The last patch does the goal of this patch series: export the symbols using compiler directives, which is determined at configure time. Also update the Visual Studio projects so that we don't need to generate the .def file from the projects and use __declspec(dllexport) to accomplish the same purpose. Only the enumeration template source needs to be updated as the other sources have config.h included first-of-all. We can now say goodbye to gdk-pixbuf.symbols and abicheck.sh, as they won't be needed anymore, which should clean things up a bit in gdk-pixbuf/Makefile.am. With blessings, thank you!
Review of attachment 328950 [details] [review]: sure. thanks for catching that
Review of attachment 328953 [details] [review]: Looks good to me
Review of attachment 328954 [details] [review]: The Makefile.am and configure.ac parts look fine to me. I'll trust you on the win32-buildsystem parts
Hi Matthias, Thanks for the reviews, I have pushed the patches as: -328950: f0312dd -328953: 0c47922 -328954: 6855a2d With blessings, thank you!
Attachment 328954 [details] breaks applications using version number variables: $ gimp gimp: symbol lookup error: gimp: undefined symbol: gdk_pixbuf_micro_version A simple test program: $ cat gdk-pixbuf-version.c #include <stdio.h> #include <gdk-pixbuf/gdk-pixbuf.h> int main (int argc, char *argv[]) { printf ("%u.%u.%u\n", gdk_pixbuf_major_version, gdk_pixbuf_minor_version, gdk_pixbuf_micro_version); } $ cc -g gdk-pixbuf-version.c -o gdk-pixbuf-version `pkg-config --cflags --libs gdk-pixbuf-2.0` /tmp/ccnNTP7Y.o: In function `main': gdk-pixbuf-version.c:5: undefined reference to `gdk_pixbuf_micro_version' gdk-pixbuf-version.c:5: undefined reference to `gdk_pixbuf_minor_version' gdk-pixbuf-version.c:5: undefined reference to `gdk_pixbuf_major_version' collect2: error: ld returned 1 exit status
Created attachment 329666 [details] [review] Fix version number variable export Hi Ting-wei, Can you check whether this patch fixes this issue for you? Sorry about this. With blessings, thank you! --- 端午節快樂,啊,不好意思,漏掉這部份了...:P
Yes, attachment 329666 [details] [review] works for me. --- 端午節連假過完了!
Hi Ting-wei, I have pushed the patch as 630bc277-thanks for the feedback. With blessings, thank you!