Commit d9eb9ba9 authored by Hans Breuer's avatar Hans Breuer Committed by Hans Breuer

make it compile with msvc: !HAVE_UNISTD_H; no label without op, even if

2001-11-18  Hans Breuer  <hans@breuer.org>

	* gtk/gdkaccelmap.c : make it compile with msvc: !HAVE_UNISTD_H;
	no label without op, even if it's a no-op.

	* gtk/gtk.def :
	* gtk/makefile.msc.in : reflect marshaler split, some clean-up

	* config.h.win32.in : remove definition of HAVE_DIRENT_H
	* gtk/gtkfilesel.c : due to GDir (new in glib) DIR isn't
	required anymore, replace it.
	* gtk/queryimmodules.c : DIR -> GDir replacement, also
	getcwd() -> g_get_current_dir()

	* gdk/win32/gdkgeometry-win32.c : adapt to refactored gdkgeometry-x11.c
	Even 'noisy laugh' scolling appears to work, though I still can't
	claim to have fully understood what it is supposed to do ...
parent cdc4f6a4
2001-11-18 Hans Breuer <hans@breuer.org>
* gtk/gdkaccelmap.c : make it compile with msvc: !HAVE_UNISTD_H;
no label without op, even if it's a no-op.
* gtk/gtk.def :
* gtk/makefile.msc.in : reflect marshaler split, some clean-up
* config.h.win32.in : remove definition of HAVE_DIRENT_H
* gtk/gtkfilesel.c : due to GDir (new in glib) DIR isn't
required anymore, replace it.
* gtk/queryimmodules.c : DIR -> GDir replacement, also
getcwd() -> g_get_current_dir()
* gdk/win32/gdkgeometry-win32.c : adapt to refactored gdkgeometry-x11.c
Even 'noisy laugh' scolling appears to work, though I still can't
claim to have fully understood what it is supposed to do ...
Sat Nov 17 21:07:46 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkenums.h: Include glib-object.h instead of
......
2001-11-18 Hans Breuer <hans@breuer.org>
* gtk/gdkaccelmap.c : make it compile with msvc: !HAVE_UNISTD_H;
no label without op, even if it's a no-op.
* gtk/gtk.def :
* gtk/makefile.msc.in : reflect marshaler split, some clean-up
* config.h.win32.in : remove definition of HAVE_DIRENT_H
* gtk/gtkfilesel.c : due to GDir (new in glib) DIR isn't
required anymore, replace it.
* gtk/queryimmodules.c : DIR -> GDir replacement, also
getcwd() -> g_get_current_dir()
* gdk/win32/gdkgeometry-win32.c : adapt to refactored gdkgeometry-x11.c
Even 'noisy laugh' scolling appears to work, though I still can't
claim to have fully understood what it is supposed to do ...
Sat Nov 17 21:07:46 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkenums.h: Include glib-object.h instead of
......
2001-11-18 Hans Breuer <hans@breuer.org>
* gtk/gdkaccelmap.c : make it compile with msvc: !HAVE_UNISTD_H;
no label without op, even if it's a no-op.
* gtk/gtk.def :
* gtk/makefile.msc.in : reflect marshaler split, some clean-up
* config.h.win32.in : remove definition of HAVE_DIRENT_H
* gtk/gtkfilesel.c : due to GDir (new in glib) DIR isn't
required anymore, replace it.
* gtk/queryimmodules.c : DIR -> GDir replacement, also
getcwd() -> g_get_current_dir()
* gdk/win32/gdkgeometry-win32.c : adapt to refactored gdkgeometry-x11.c
Even 'noisy laugh' scolling appears to work, though I still can't
claim to have fully understood what it is supposed to do ...
Sat Nov 17 21:07:46 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkenums.h: Include glib-object.h instead of
......
2001-11-18 Hans Breuer <hans@breuer.org>
* gtk/gdkaccelmap.c : make it compile with msvc: !HAVE_UNISTD_H;
no label without op, even if it's a no-op.
* gtk/gtk.def :
* gtk/makefile.msc.in : reflect marshaler split, some clean-up
* config.h.win32.in : remove definition of HAVE_DIRENT_H
* gtk/gtkfilesel.c : due to GDir (new in glib) DIR isn't
required anymore, replace it.
* gtk/queryimmodules.c : DIR -> GDir replacement, also
getcwd() -> g_get_current_dir()
* gdk/win32/gdkgeometry-win32.c : adapt to refactored gdkgeometry-x11.c
Even 'noisy laugh' scolling appears to work, though I still can't
claim to have fully understood what it is supposed to do ...
Sat Nov 17 21:07:46 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkenums.h: Include glib-object.h instead of
......
2001-11-18 Hans Breuer <hans@breuer.org>
* gtk/gdkaccelmap.c : make it compile with msvc: !HAVE_UNISTD_H;
no label without op, even if it's a no-op.
* gtk/gtk.def :
* gtk/makefile.msc.in : reflect marshaler split, some clean-up
* config.h.win32.in : remove definition of HAVE_DIRENT_H
* gtk/gtkfilesel.c : due to GDir (new in glib) DIR isn't
required anymore, replace it.
* gtk/queryimmodules.c : DIR -> GDir replacement, also
getcwd() -> g_get_current_dir()
* gdk/win32/gdkgeometry-win32.c : adapt to refactored gdkgeometry-x11.c
Even 'noisy laugh' scolling appears to work, though I still can't
claim to have fully understood what it is supposed to do ...
Sat Nov 17 21:07:46 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkenums.h: Include glib-object.h instead of
......
2001-11-18 Hans Breuer <hans@breuer.org>
* gtk/gdkaccelmap.c : make it compile with msvc: !HAVE_UNISTD_H;
no label without op, even if it's a no-op.
* gtk/gtk.def :
* gtk/makefile.msc.in : reflect marshaler split, some clean-up
* config.h.win32.in : remove definition of HAVE_DIRENT_H
* gtk/gtkfilesel.c : due to GDir (new in glib) DIR isn't
required anymore, replace it.
* gtk/queryimmodules.c : DIR -> GDir replacement, also
getcwd() -> g_get_current_dir()
* gdk/win32/gdkgeometry-win32.c : adapt to refactored gdkgeometry-x11.c
Even 'noisy laugh' scolling appears to work, though I still can't
claim to have fully understood what it is supposed to do ...
Sat Nov 17 21:07:46 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkenums.h: Include glib-object.h instead of
......
2001-11-18 Hans Breuer <hans@breuer.org>
* gtk/gdkaccelmap.c : make it compile with msvc: !HAVE_UNISTD_H;
no label without op, even if it's a no-op.
* gtk/gtk.def :
* gtk/makefile.msc.in : reflect marshaler split, some clean-up
* config.h.win32.in : remove definition of HAVE_DIRENT_H
* gtk/gtkfilesel.c : due to GDir (new in glib) DIR isn't
required anymore, replace it.
* gtk/queryimmodules.c : DIR -> GDir replacement, also
getcwd() -> g_get_current_dir()
* gdk/win32/gdkgeometry-win32.c : adapt to refactored gdkgeometry-x11.c
Even 'noisy laugh' scolling appears to work, though I still can't
claim to have fully understood what it is supposed to do ...
Sat Nov 17 21:07:46 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkenums.h: Include glib-object.h instead of
......
......@@ -22,7 +22,7 @@
/* #undef HAVE_CATGETS */
/* #undef HAVE_DIMM_H */
#define HAVE_DIRENT_H 1 /* MSVC users: include it from build/win32/dirent */
/* #undef HAVE_DIRENT_H */
#define HAVE_GETTEXT 1
/* #undef HAVE_IPC_H */
/* #undef HAVE_LC_MESSAGES */
......@@ -115,7 +115,7 @@
/* #undef HAVE_DIMM_H */
/* Define if you have the <dirent.h> header file, and it defines `DIR'. */
#define HAVE_DIRENT_H 1
/* #undef HAVE_DIRENT_H */
/* Define if you have the <dlfcn.h> header file. */
/* #undef HAVE_DLFCN_H */
......
This diff is collapsed.
......@@ -89,11 +89,17 @@ EXPORTS
gtk_accel_group_connect
gtk_accel_group_disconnect
gtk_accel_group_find
gtk_accel_group_from_accel_closure
gtk_accel_group_get_type
gtk_accel_group_lock
gtk_accel_group_new
gtk_accel_group_query
gtk_accel_group_unlock
gtk_accel_groups_activate
gtk_accel_groups_disconnect_closure
gtk_accel_groups_from_acceleratable
gtk_accel_label_get_accel_widget
gtk_accel_label_get_accel_width
gtk_accel_label_get_type
gtk_accel_label_new
......@@ -105,13 +111,14 @@ EXPORTS
gtk_accel_map_add_notifer
gtk_accel_map_change_entry
gtk_accel_map_foreach
gtk_accel_map_foreach_unfiltered
gtk_accel_map_load
gtk_accel_map_load_fd
gtk_accel_map_load_scanner
gtk_accel_map_save
gtk_accel_map_save_fd
gtk_accel_map_lookup_entry
gtk_accel_map_remove_notifer
gtk_accel_map_save
gtk_accel_map_save_fd
gtk_accelerator_get_default_mod_mask
gtk_accelerator_name
gtk_accelerator_parse
......@@ -873,6 +880,7 @@ EXPORTS
gtk_list_store_prepend
gtk_list_store_remove
gtk_list_store_set
gtk_list_store_set_column_types
gtk_list_store_set_valist
gtk_list_store_set_value
gtk_list_toggle_add_mode
......@@ -889,51 +897,31 @@ EXPORTS
gtk_main_level
gtk_main_quit
gtk_major_version
gtk_marshal_BOOLEAN__BOOLEAN
gtk_marshal_BOOLEAN__BOXED
gtk_marshal_BOOLEAN__BOXED_BOXED
gtk_marshal_BOOLEAN__ENUM
gtk_marshal_BOOLEAN__INT_INT
gtk_marshal_BOOLEAN__OBJECT_BOXED_BOXED
gtk_marshal_BOOLEAN__OBJECT_INT_INT_UINT
gtk_marshal_BOOLEAN__OBJECT_STRING_STRING_BOXED
gtk_marshal_BOOLEAN__POINTER
gtk_marshal_BOOLEAN__POINTER_INT_INT
gtk_marshal_BOOLEAN__POINTER_INT_INT_UINT
gtk_marshal_BOOLEAN__POINTER_POINTER_INT_INT
gtk_marshal_BOOLEAN__POINTER_STRING_STRING_POINTER
gtk_marshal_BOOLEAN__VOID
gtk_marshal_ENUM__ENUM
gtk_marshal_INT__POINTER
gtk_marshal_STRING__DOUBLE
gtk_marshal_VOID__BOOLEAN_BOOLEAN_BOOLEAN
gtk_marshal_VOID__BOXED_BOXED
gtk_marshal_VOID__BOXED_BOXED_POINTER
gtk_marshal_VOID__BOXED_OBJECT
gtk_marshal_VOID__BOXED_POINTER
gtk_marshal_VOID__BOXED_STRING_INT
gtk_marshal_VOID__BOXED_UINT
gtk_marshal_VOID__BOXED_UINT_FLAGS
gtk_marshal_VOID__BOXED_UINT_UINT
gtk_marshal_VOID__ENUM_ENUM
gtk_marshal_INT__POINTER_CHAR_CHAR
gtk_marshal_VOID__ENUM_FLOAT
gtk_marshal_VOID__ENUM_FLOAT_BOOLEAN
gtk_marshal_VOID__ENUM_INT
gtk_marshal_VOID__ENUM_INT_BOOLEAN
gtk_marshal_VOID__INT_INT
gtk_marshal_VOID__INT_INT_BOXED
gtk_marshal_VOID__INT_INT_INT
gtk_marshal_VOID__OBJECT_BOOLEAN
gtk_marshal_VOID__OBJECT_BOXED_BOXED
gtk_marshal_VOID__OBJECT_BOXED_UINT_UINT
gtk_marshal_VOID__OBJECT_INT_INT
gtk_marshal_VOID__OBJECT_INT_INT_BOXED_UINT_UINT
gtk_marshal_VOID__OBJECT_OBJECT
gtk_marshal_VOID__OBJECT_STRING_STRING
gtk_marshal_VOID__OBJECT_UINT
gtk_marshal_VOID__OBJECT_UINT_FLAGS
gtk_marshal_VOID__INT_INT_POINTER
gtk_marshal_VOID__POINTER_INT
gtk_marshal_VOID__POINTER_INT_INT_POINTER_UINT_UINT
gtk_marshal_VOID__POINTER_POINTER
gtk_marshal_VOID__POINTER_POINTER_POINTER
gtk_marshal_VOID__POINTER_POINTER_UINT_UINT
gtk_marshal_VOID__POINTER_STRING_STRING
gtk_marshal_VOID__POINTER_UINT
gtk_marshal_VOID__POINTER_UINT_ENUM
gtk_marshal_VOID__POINTER_UINT_UINT
gtk_marshal_VOID__STRING_INT_POINTER
gtk_marshal_VOID__STRING_STRING
gtk_marshal_VOID__UINT_BOXED_UINT_FLAGS_FLAGS
gtk_marshal_VOID__UINT_OBJECT_UINT_FLAGS_FLAGS
gtk_marshal_VOID__UINT_POINTER_UINT_ENUM_ENUM_POINTER
gtk_marshal_VOID__UINT_POINTER_UINT_UINT_ENUM
gtk_marshal_VOID__UINT_STRING
gtk_menu_attach_to_widget
gtk_menu_bar_get_type
......@@ -1711,6 +1699,7 @@ EXPORTS
gtk_tree_drag_source_drag_data_delete
gtk_tree_drag_source_drag_data_get
gtk_tree_drag_source_get_type
gtk_tree_drag_source_row_draggable
gtk_tree_get_row_drag_data
gtk_tree_get_type
gtk_tree_insert
......@@ -1831,6 +1820,7 @@ EXPORTS
gtk_tree_store_prepend
gtk_tree_store_remove
gtk_tree_store_set
gtk_tree_store_set_column_types
gtk_tree_store_set_valist
gtk_tree_store_set_value
gtk_tree_unselect_child
......@@ -1888,11 +1878,12 @@ EXPORTS
gtk_tree_view_column_set_widget
gtk_tree_view_columns_autosize
gtk_tree_view_create_row_drag_icon
gtk_tree_view_enable_model_drag_source
gtk_tree_view_enable_model_drag_dest
gtk_tree_view_enable_model_drag_source
gtk_tree_view_expand_all
gtk_tree_view_expand_row
gtk_tree_view_get_background_area
gtk_tree_view_get_bin_window
gtk_tree_view_get_cell_area
gtk_tree_view_get_column
gtk_tree_view_get_columns
......@@ -2071,6 +2062,7 @@ EXPORTS
gtk_widget_set_name
gtk_widget_set_parent
gtk_widget_set_parent_window
gtk_widget_set_redraw_on_allocate
gtk_widget_set_scroll_adjustments
gtk_widget_set_sensitive
gtk_widget_set_size_request
......
......@@ -16,13 +16,21 @@
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#include "config.h"
#include "gtkaccelmap.h"
#include "gtkwindow.h" /* in lack of GtkAcceleratable */
#include <string.h>
#include <fcntl.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef G_OS_WIN32
#include <io.h>
#endif
#include <errno.h>
......@@ -816,6 +824,7 @@ gtk_accel_map_foreach (gpointer data,
goto skip_accel;
foreach_func (data, entry->accel_path, entry->accel_key, entry->accel_mods, changed);
skip_accel:
/* noop */;
}
g_slist_free (entries);
}
......
......@@ -32,9 +32,6 @@
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_DIRENT_H
#include <dirent.h>
#endif
#include <stdlib.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
......@@ -2592,8 +2589,9 @@ open_new_dir (gchar *dir_name,
gboolean stat_subdirs)
{
CompletionDirSent *sent;
DIR *directory;
struct dirent *dirent_ptr;
GDir *directory;
char *dirent;
GError *error;
gint entry_count = 0;
gint n_entries = 0;
gint i;
......@@ -2615,38 +2613,38 @@ open_new_dir (gchar *dir_name,
return NULL;
}
directory = opendir (sys_dir_name);
directory = g_dir_open (sys_dir_name, 0, &error);
if (!directory)
{
cmpl_errno = errno;
cmpl_errno = error->code; /* ??? */
g_free (sys_dir_name);
return NULL;
}
while ((dirent_ptr = readdir (directory)) != NULL)
while ((dirent = g_dir_read_name (directory)) != NULL)
entry_count++;
sent->entries = g_new (CompletionDirEntry, entry_count);
sent->entry_count = entry_count;
rewinddir (directory);
g_dir_rewind (directory);
for (i = 0; i < entry_count; i += 1)
{
dirent_ptr = readdir (directory);
dirent = g_dir_read_name (directory);
if (!dirent_ptr)
if (!dirent)
{
cmpl_errno = errno;
closedir (directory);
g_warning ("Failure reading directory '%s'", sys_dir_name);
g_dir_close (directory);
g_free (sys_dir_name);
return NULL;
}
sent->entries[n_entries].entry_name = g_filename_to_utf8 (dirent_ptr->d_name, -1, NULL, NULL, NULL);
sent->entries[n_entries].entry_name = g_filename_to_utf8 (dirent, -1, NULL, NULL, NULL);
if (!g_utf8_validate (sent->entries[n_entries].entry_name, -1, NULL))
{
g_warning (_("The filename %s couldn't be converted to UTF-8. Try setting the environment variable G_BROKEN_FILENAMES."), dirent_ptr->d_name);
g_warning (_("The filename %s couldn't be converted to UTF-8. Try setting the environment variable G_BROKEN_FILENAMES."), dirent);
continue;
}
......@@ -2655,7 +2653,7 @@ open_new_dir (gchar *dir_name,
{
g_string_append_c (path, G_DIR_SEPARATOR);
}
g_string_append (path, dirent_ptr->d_name);
g_string_append (path, dirent);
if (stat_subdirs)
{
......@@ -2678,7 +2676,7 @@ open_new_dir (gchar *dir_name,
g_string_free (path, TRUE);
qsort (sent->entries, sent->entry_count, sizeof (CompletionDirEntry), compare_cmpl_dir);
closedir (directory);
g_dir_close (directory);
return sent;
}
......
......@@ -27,8 +27,8 @@ AWK = gawk
INCLUDES = -I . -I .. -I ../gdk -I ../gdk-pixbuf -DPANGO_ENABLE_BACKEND
DEPCFLAGS = $(PANGO_CFLAGS) $(GLIB_CFLAGS) $(LIBICONV_CFLAGS) \
$(INTL_CFLAGS) $(ATK_CFLAGS) $(DIRENT_CFLAGS)
LDFLAGS = $(ATK_LIBS) $(DIRENT_LIBS) /link /machine:ix86 $(LINKDEBUG)
$(INTL_CFLAGS) $(ATK_CFLAGS)
LDFLAGS = $(ATK_LIBS) /link /machine:ix86 $(LINKDEBUG)
# Some files use near as an identifier
# Don't define GTK_COMPILATION here, because it's for gtk-x.x.dll only
DEFINES = $(G_DEBUGGING) -DGTK_DISABLE_COMPAT_H -DG_LOG_DOMAIN=\"Gtk\" -Dnear=xxnear \
......@@ -46,14 +46,15 @@ all : \
generated \
gtk-stocks-icons \
gtk-win32-$(GTK_VER).dll \
gtk-query-immodules-$(GTK_VER).exe \
# gtk-win32-$(GTK_VER)s.lib \
# gtk-x11-$(GTK_VER).dll
gtk_OBJECTS = \
fnmatch.obj \
# gdk-pixbuf-loader.obj \
gtkaccelgroup.obj \
gtkaccellabel.obj \
gtkaccelmap.obj \
gtkaccessible.obj \
gtkadjustment.obj \
gtkalignment.obj \
......@@ -118,6 +119,8 @@ gtk_OBJECTS = \
gtklistitem.obj \
gtkliststore.obj \
gtkmain.obj \
gtkmarshalers.obj \
gtkmarshal.obj \
gtkmenu.obj \
gtkmenubar.obj \
gtkmenuitem.obj \
......@@ -179,7 +182,6 @@ gtk_OBJECTS = \
gtktreednd.obj \
gtktreeitem.obj \
gtktreemodel.obj \
# gtktreemodelsimple.obj \
gtktreemodelsort.obj \
gtktreeselection.obj \
gtktreesortable.obj \
......@@ -268,6 +270,7 @@ gtk_public_h_sources = \
gtklistitem.h \
gtkliststore.h \
gtkmain.h \
gtkmarshal.h \
gtkmenu.h \
gtkmenubar.h \
gtkmenuitem.h \
......@@ -278,9 +281,7 @@ gtk_public_h_sources = \
gtkoldeditable.h \
gtkobject.h \
gtkoptionmenu.h \
# gtkpacker.h \
gtkpaned.h \
# gdk-pixbuf-loader.h \
gtkpixmap.h \
gtkplug.h \
gtkpreview.h \
......@@ -323,7 +324,6 @@ gtk_public_h_sources = \
gtktree.h \
gtktreeitem.h \
gtktreemodel.h \
# gtktreemodelsimple.h \
gtktreemodelsort.h \
gtktreeselection.h \
gtktreesortable.h \
......@@ -353,7 +353,7 @@ gtk_extra_sources = \
..\config.h : ..\config.h.win32
copy ..\config.h.win32 ..\config.h
GENERATED = gtk.defs gtktypebuiltins.h gtktypebuiltins_vars.c gtktypebuiltins_ids.c gtktypebuiltins_evals.c gtkmarshal.h gtkmarshal.c
GENERATED = gtk.defs gtktypebuiltins.h gtktypebuiltins_vars.c gtktypebuiltins_ids.c gtktypebuiltins_evals.c gtkmarshal.h gtkmarshal.c gtkmarshalers.h gtkmarshalers.c
#
# Generated source files:
......@@ -382,8 +382,18 @@ gtktypebuiltins_ids.c: gtk.defs maketypes.awk
gtktypebuiltins_evals.c: makeenums.pl gtk.defs
$(PERL) makeenums.pl arrays $(gtk_public_h_sources) $(gdk_headers) >gtktypebuiltins_evals.c
# private marshalers
gtkmarshalers.h : gtkmarshalers.list
$(GLIB)\gobject\glib-genmarshal --prefix=_gtk_marshal gtkmarshalers.list --header >>gtkmarshalers.h
gtkmarshalers.c : gtkmarshalers.list
$(GLIB)\gobject\glib-genmarshal --prefix=_gtk_marshal gtkmarshalers.list --body >gtkmarshalers.c
# public, deprecated marshalers
gtkmarshal.h : gtkmarshal.list
$(GLIB)\gobject\glib-genmarshal --prefix=gtk_marshal gtkmarshal.list --header >gtkmarshal.h
echo #ifndef GTK_DISABLE_DEPRECATED >gtkmarshal.h
$(GLIB)\gobject\glib-genmarshal --prefix=gtk_marshal gtkmarshal.list --header >>gtkmarshal.h
echo #endif /* GTK_DISABLE_DEPRECATED */ >>gtkmarshal.h
gtkmarshal.c : gtkmarshal.list
$(GLIB)\gobject\glib-genmarshal --prefix=gtk_marshal gtkmarshal.list --body >gtkmarshal.c
......@@ -400,6 +410,9 @@ gtk-win32-$(GTK_VER).dll : $(gtk_OBJECTS) gtk.def
gtk-win32-$(GTK_VER)s.lib : $(gtk_OBJECTS)
lib /out:gtk-win32-$(GTK_VER)s.lib $(gtk_OBJECTS)
gtk-query-immodules-$(GTK_VER).exe : queryimmodules.obj
$(CC) $(CFLAGS) -Fe$@ queryimmodules.obj $(GTK_LIBS) $(GLIB_LIBS) $(PANGO_LIBS) $(LDFLAGS)
gtk-x11-$(GTK_VER).dll : $(gtk_OBJECTS) gtk.def
$(CC) $(CFLAGS) -LD -Fm -Fegtk-x11-$(GTK_VER).dll $(gtk_OBJECTS) ../gdk/gdk-x11-$(GTK_VER).lib $(GDK_PIXBUF_LIBS) $(PANGO_LIBS) $(INTL_LIBS) $(GLIB_LIBS) gdi32.lib user32.lib advapi32.lib $(LDFLAGS) /def:gtk.def
......
......@@ -22,9 +22,6 @@
#include "config.h"
#include <glib.h>
#ifdef HAVE_DIRENT_H
#include <dirent.h>
#endif
#include <gmodule.h>
#include <errno.h>
......@@ -120,7 +117,7 @@ query_module (const char *dir, const char *name)
int main (int argc, char **argv)
{
char cwd[PATH_MAX];
char *cwd;
int i;
char *path;
gboolean error = FALSE;
......@@ -142,28 +139,30 @@ int main (int argc, char **argv)
for (i=0; dirs[i]; i++)
{
DIR *dir = opendir (dirs[i]);
GDir *dir = g_dir_open (dirs[i], 0, NULL);
if (dir)
{
struct dirent *dent;
char *dent;
while ((dent = readdir (dir)))
while ((dent = g_dir_read_name (dir)))
{
int len = strlen (dent->d_name);
if (len > 3 && strcmp (dent->d_name + len - strlen (SOEXT), SOEXT) == 0)
error |= query_module (dirs[i], dent->d_name);
int len = strlen (dent);
if (len > 3 && strcmp (dent + len - strlen (SOEXT), SOEXT) == 0)
error |= query_module (dirs[i], dent);
}
closedir (dir);
g_dir_close (dir);
}
}
}
else
{
getcwd (cwd, PATH_MAX);
cwd = g_get_current_dir ();
for (i=1; i<argc; i++)
error |= query_module (cwd, argv[i]);
g_free (cwd);
}
return error ? 1 : 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment