mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 10:50:10 +00:00
portability fixes and corrected prototypes for self-contained build
This commit is contained in:
parent
aceeae34fb
commit
6bda7a895e
@ -1,3 +1,11 @@
|
||||
2000-11-11 Hans Breuer <Hans@Breuer.Org>
|
||||
|
||||
* gdk-pixbuf-io.c : Fix all function prototype macros for self
|
||||
contained image handlers (!USE_G_MODULE). Files to save should
|
||||
be opened in binary mode, fopen(s, "wb").
|
||||
|
||||
* io-xpm.c : added HAVE_UNISTD_H condition
|
||||
|
||||
2000-11-11 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* gdk_pixbuf.def: Add gdk_pixbuf_new_subpixbuf.
|
||||
|
@ -349,17 +349,18 @@ gdk_pixbuf_load_module (GdkPixbufModule *image_module,
|
||||
#else
|
||||
|
||||
#define mname(type,fn) gdk_pixbuf__ ## type ## _image_ ##fn
|
||||
#define m_load(type) extern GdkPixbuf * mname(type,load) (FILE *f);
|
||||
#define m_load(type) extern GdkPixbuf * mname(type,load) (FILE *f, GError **error);
|
||||
#define m_load_xpm_data(type) extern GdkPixbuf * mname(type,load_xpm_data) (const char **data);
|
||||
#define m_begin_load(type) \
|
||||
extern gpointer mname(type,begin_load) (ModulePreparedNotifyFunc prepare_func, \
|
||||
ModuleUpdatedNotifyFunc update_func, \
|
||||
ModuleFrameDoneNotifyFunc frame_done_func,\
|
||||
ModuleAnimationDoneNotifyFunc anim_done_func,\
|
||||
gpointer user_data);
|
||||
gpointer user_data,\
|
||||
GError **error);
|
||||
#define m_stop_load(type) extern void mname(type,stop_load) (gpointer context);
|
||||
#define m_load_increment(type) extern gboolean mname(type,load_increment) (gpointer context, const guchar *buf, guint size);
|
||||
#define m_load_animation(type) extern GdkPixbufAnimation * mname(type,load_animation) (FILE *f);
|
||||
#define m_load_increment(type) extern gboolean mname(type,load_increment) (gpointer context, const guchar *buf, guint size, GError **error);
|
||||
#define m_load_animation(type) extern GdkPixbufAnimation * mname(type,load_animation) (FILE *f, GError **error);
|
||||
#define m_save(type) \
|
||||
extern gboolean mname(type,save) (FILE *f, \
|
||||
GdkPixbuf *pixbuf, \
|
||||
@ -857,7 +858,7 @@ gdk_pixbuf_savev (GdkPixbuf *pixbuf,
|
||||
g_return_val_if_fail (filename != NULL, FALSE);
|
||||
g_return_val_if_fail (type != NULL, FALSE);
|
||||
|
||||
f = fopen (filename, "w");
|
||||
f = fopen (filename, "wb");
|
||||
|
||||
if (f == NULL) {
|
||||
g_set_error (error,
|
||||
|
@ -27,7 +27,9 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <glib.h>
|
||||
#include <unistd.h>
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h> /* for unlink */
|
||||
#endif
|
||||
#include "gdk-pixbuf-private.h"
|
||||
#include "gdk-pixbuf-io.h"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user