diff -Naurp gnome-libs-1.4.2/config.h.in gnome-libs-1.4.2-cygwin/config.h.in --- gnome-libs-1.4.2/config.h.in 2002-01-06 13:29:28.000000000 +0000 +++ gnome-libs-1.4.2-cygwin/config.h.in 2003-02-26 14:15:36.000000000 +0000 @@ -269,7 +269,7 @@ #undef HAVE_DB1_DB_H /* Define if you have the header file. */ -#undef HAVE_DB_185_H +#define HAVE_DB_185_H 1 /* Define if you have the header file. */ #undef HAVE_DIRENT_H diff -Naurp gnome-libs-1.4.2/configure gnome-libs-1.4.2-cygwin/configure --- gnome-libs-1.4.2/configure 2002-08-15 23:24:44.000000000 +0100 +++ gnome-libs-1.4.2-cygwin/configure 2003-02-26 14:15:36.000000000 +0000 @@ -1300,7 +1300,7 @@ ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} conftest.$ac_ext $CFLAGS $CPPFLAGS $LDFLAGS $LIBS 1>&5' cross_compiling=$ac_cv_prog_cc_cross echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 @@ -3325,7 +3325,8 @@ EOF else $CC -o impgen impgen.c ; fi)~ $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def' - old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib' +# old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib' +old_archive_from_expsyms_cmds= # cygwin and mingw dlls have different entry points and sets of symbols # to exclude. @@ -5022,7 +5023,8 @@ old_postuninstall_cmds=$lt_old_postunins old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds +#old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds +old_archive_from_expsyms_cmds= # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds @@ -8679,8 +8681,8 @@ fi gnomelocaledir='${prefix}/${DATADIRNAME}/locale' -echo $ac_n "checking for floor in -lm""... $ac_c" 1>&6 -echo "configure:8684: checking for floor in -lm" >&5 +echo $ac_n "checking for floor""... $ac_c" 1>&6 +echo "configure:5138: checking for floor" >&5 ac_lib_var=`echo m'_'floor | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8720,7 +8722,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_l #define $ac_tr_lib 1 EOF - LIBS="-lm $LIBS" + LIBS="$LIBS" else echo "$ac_t""no" 1>&6 @@ -9975,7 +9977,8 @@ else fi -for ac_func in grantpt utmpxname utmpname getutmpx getutent getttyent +#for ac_func in grantpt utmpxname utmpname getutmpx getutent getttyent +for ac_func in grantpt utmpxname getutmpx getttyent do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 echo "configure:9982: checking for $ac_func" >&5 @@ -10394,7 +10397,7 @@ if eval "test \"`echo '$''{'ac_cv_lib_$a echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-ltiff -lm $LIBS" +LIBS="-ltiff $LIBS" cat > conftest.$ac_ext <&6 else ac_save_LIBS="$LIBS" -LIBS="-ltiff $JPEG_LIBS $Z_LIBS -lm $LIBS" +LIBS="-ltiff $JPEG_LIBS $Z_LIBS $LIBS" cat > conftest.$ac_ext <&6 else ac_save_LIBS="$LIBS" -LIBS="-ltiff34 $JPEG_LIBS $Z_LIBS -lm $LIBS" +LIBS="-ltiff34 $JPEG_LIBS $Z_LIBS $LIBS" cat > conftest.$ac_ext <&6 else ac_save_LIBS="$LIBS" -LIBS="-lpng $Z_LIBS -lm $LIBS" +LIBS="-lpng $Z_LIBS $LIBS" cat > conftest.$ac_ext <&6 -echo $ac_n "checking for __db185_open in -ldb-3""... $ac_c" 1>&6 -echo "configure:11621: checking for __db185_open in -ldb-3" >&5 -ac_lib_var=`echo db-3'_'__db185_open | sed 'y%./+-%__p_%'` +echo $ac_n "checking for __db185_open in -ldb-3.1""... $ac_c" 1>&6 +echo "configure:11621: checking for __db185_open in -ldb-3.1" >&5 +ac_lib_var=`echo db-3.1'_'__db185_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-ldb-3 $LIBS" +LIBS="-ldb-3.1 $LIBS" cat > conftest.$ac_ext <&6 - DB_LIB="-ldb-3" + DB_LIB="-ldb-3.1" else echo "$ac_t""no" 1>&6 echo $ac_n "checking for __db185_open in -ldb-4""... $ac_c" 1>&6 @@ -13561,11 +13564,11 @@ rm -f conftest* LIBGNOME_LIBS="$ESD_LIBS $AUDIOFILE_LIBS $DB_LIB $GLIB_LIBS $DL_LIB" LIBGNOMEUI_LIBS="$LIBGNOME_LIBS $GDK_IMLIB_LIBS $GTK_LIBS" LIBGTKXMHTML_LIBS="$XPM_LIBS $JPEG_LIBS $PNG_LIBS $Z_LIBS $GTK_LIBS" -LIBSUPPORT='$(top_builddir)/support/libgnomesupport.la' +LIBSUPPORT='$(top_builddir)/support/libgnomesupport.la -lpopt' SUPPORTINCS='-DNEED_GNOMESUPPORT_H -I$(top_builddir)/support -I$(top_srcdir)/support' ART_LIBS="-lart_lgpl" -GNOME_LIBS="-lgnome -lgnomesupport $LIBGNOME_LIBS" +GNOME_LIBS="-lgnome -lgnomesupport -lpopt $LIBGNOME_LIBS" GNOMEUI_LIBS="-lgnomeui $ART_LIBS $GDK_IMLIB_LIBS $GTK_LIBS $GNOME_LIBS" GTKXMHTML_LIBS="-lgtkxmhtml $LIBGTKXMHTML_LIBS" ZVT_LIBS="-lzvt $UTIL_LIBS $GTK_LIBS" @@ -14044,8 +14047,8 @@ s%@subdirs@%$subdirs%g s%@GNOME_LIBS_DIR@%$GNOME_LIBS_DIR%g s%@INSIDE_GNOME_DOCU_TRUE@%$INSIDE_GNOME_DOCU_TRUE%g s%@INSIDE_GNOME_DOCU_FALSE@%$INSIDE_GNOME_DOCU_FALSE%g -s%@GNOME_LIBS@%$GNOME_LIBS%g -s%@GNOMEUI_LIBS@%$GNOMEUI_LIBS%g +s%@GNOME_LIBS@%$GNOME_LIBS -lpopt%g +s%@GNOMEUI_LIBS@%$GNOMEUI_LIBS -lpopt%g s%@ZVT_LIBS@%$ZVT_LIBS%g s%@GTKXMHTML_LIBS@%$GTKXMHTML_LIBS%g s%@GNOME_LIBDIR@%$GNOME_LIBDIR%g diff -Naurp gnome-libs-1.4.2/gtk-xmhtml/Makefile.in gnome-libs-1.4.2-cygwin/gtk-xmhtml/Makefile.in --- gnome-libs-1.4.2/gtk-xmhtml/Makefile.in 2002-08-15 23:25:40.000000000 +0100 +++ gnome-libs-1.4.2-cygwin/gtk-xmhtml/Makefile.in 2003-02-26 14:15:36.000000000 +0000 @@ -240,7 +240,7 @@ PROGRAMS = $(noinst_PROGRAMS) htmltest_OBJECTS = test.$(OBJEXT) htmltest_DEPENDENCIES = libgtkxmhtml.la htmltest_LDFLAGS = -CFLAGS = @CFLAGS@ +CFLAGS = @CFLAGS@ $(DLL_CFLAGS) COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) @@ -284,6 +284,9 @@ install-libLTLIBRARIES: $(lib_LTLIBRARIE if test -f $$p; then \ echo "$(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p"; \ $(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p; \ + dll=$$(echo $$p | sed 's,^lib\(.*\).la$$,cyg\1.dll,'); \ + echo "install -D --mode=755 .libs/$$dll $(DESTDIR)$(bindir)/$$dll"; \ + install -D --mode=755 .libs/$$dll $(DESTDIR)$(bindir)/$$dll; \ else :; fi; \ done @@ -291,6 +294,8 @@ uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) list='$(lib_LTLIBRARIES)'; for p in $$list; do \ $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p; \ + dll=$$(echo $$p | sed 's,^lib\(.*\).la$$,cyg\1.dll,'); \ + rm -f $(DESTDIR)$(bindir)/$$dll; \ done .c.o: @@ -337,8 +342,10 @@ distclean-libtool: maintainer-clean-libtool: +libgtkxmhtml.la: DLL_CFLAGS = -DLIBGTKXHTML_BUILD_DLL libgtkxmhtml.la: $(libgtkxmhtml_la_OBJECTS) $(libgtkxmhtml_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(libgtkxmhtml_la_LDFLAGS) $(libgtkxmhtml_la_OBJECTS) $(libgtkxmhtml_la_LIBADD) $(LIBS) + PREFIX=$(prefix) sh ../mkdll.sh $@ $(libgtkxmhtml_la_LIBADD) $(LDFLAGS) $(LIBS) mostlyclean-noinstPROGRAMS: diff -Naurp gnome-libs-1.4.2/libart_lgpl/Makefile.in gnome-libs-1.4.2-cygwin/libart_lgpl/Makefile.in --- gnome-libs-1.4.2/libart_lgpl/Makefile.in 2002-08-15 23:25:26.000000000 +0100 +++ gnome-libs-1.4.2-cygwin/libart_lgpl/Makefile.in 2003-02-26 14:15:38.000000000 +0000 @@ -146,7 +146,7 @@ libart_lgpl_la_SOURCES = \ libart_lgpl_la_LDFLAGS = -version-info @LIBART_VERSION_INFO@ -libart_lgpl_la_LIBADD = -lm +libart_lgpl_la_LIBADD = libart_lgplincdir = $(includedir)/gnome-1.0/libart_lgpl libart_lgplinc_HEADERS = \ @@ -197,12 +197,12 @@ LDADDS = $(top_builddir)/libart_lgpl.la testart_SOURCES = testart.c testart_LDFLAGS = testart_DEPENDENCIES = $(DEPS) -testart_LDADD = $(LDADDS) -lm +testart_LDADD = $(LDADDS) testuta_SOURCES = testuta.c testuta_LDFLAGS = testuta_DEPENDENCIES = $(DEPS) -testuta_LDADD = $(LDADDS) -lm +testuta_LDADD = $(LDADDS) m4datadir = $(datadir)/aclocal m4data_DATA = libart.m4 @@ -244,7 +244,7 @@ gen_art_config_DEPENDENCIES = gen_art_config_LDFLAGS = SCRIPTS = $(bin_SCRIPTS) -CFLAGS = @CFLAGS@ +CFLAGS = @CFLAGS@ $(DLL_CFLAGS) COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) @@ -335,6 +335,9 @@ install-libLTLIBRARIES: $(lib_LTLIBRARIE if test -f $$p; then \ echo "$(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p"; \ $(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p; \ + dll=$$(echo $$p | sed 's,^lib\(.*\).la$$,cyg\1.dll,'); \ + echo "install -D --mode=755 .libs/$$dll $(DESTDIR)$(bindir)/$$dll"; \ + install -D --mode=755 .libs/$$dll $(DESTDIR)$(bindir)/$$dll; \ else :; fi; \ done @@ -342,6 +345,8 @@ uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) list='$(lib_LTLIBRARIES)'; for p in $$list; do \ $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p; \ + dll=$$(echo $$p | sed 's,^lib\(.*\).la$$,cyg\1.dll,'); \ + rm -f $(DESTDIR)$(bindir)/$$dll; \ done .c.o: @@ -388,8 +393,10 @@ distclean-libtool: maintainer-clean-libtool: +libart_lgpl.la: DLL_CFLAGS = -DLIBART_LGPL_BUILD_DLL libart_lgpl.la: $(libart_lgpl_la_OBJECTS) $(libart_lgpl_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(libart_lgpl_la_LDFLAGS) $(libart_lgpl_la_OBJECTS) $(libart_lgpl_la_LIBADD) $(LIBS) + PREFIX=$(prefix) sh ../mkdll.sh $@ mostlyclean-noinstPROGRAMS: diff -Naurp gnome-libs-1.4.2/libart_lgpl/configure gnome-libs-1.4.2-cygwin/libart_lgpl/configure --- gnome-libs-1.4.2/libart_lgpl/configure 2002-08-01 15:30:58.000000000 +0100 +++ gnome-libs-1.4.2-cygwin/libart_lgpl/configure 2003-02-26 14:15:38.000000000 +0000 @@ -3076,7 +3076,8 @@ EOF else $CC -o impgen impgen.c ; fi)~ $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def' - old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib' +# old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib' +old_archive_from_expsyms_cmds= # cygwin and mingw dlls have different entry points and sets of symbols # to exclude. @@ -4773,7 +4774,8 @@ old_postuninstall_cmds=$lt_old_postunins old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds +#old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds +old_archive_from_expsyms_cmds= # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds @@ -5143,7 +5145,7 @@ fi LIBART_LIBDIR='-L${libdir}' LIBART_INCLUDEDIR='-I${includedir}/gnome-1.0' -LIBART_LIBS='-lart_lgpl -lm' +LIBART_LIBS='-lart_lgpl' diff -Naurp gnome-libs-1.4.2/libgnome/Makefile.in gnome-libs-1.4.2-cygwin/libgnome/Makefile.in --- gnome-libs-1.4.2/libgnome/Makefile.in 2002-08-15 23:25:30.000000000 +0100 +++ gnome-libs-1.4.2-cygwin/libgnome/Makefile.in 2003-02-26 14:15:38.000000000 +0000 @@ -238,7 +238,7 @@ man_MANS = \ EXTRA_DIST = parse-path.cP $(man_MANS) libgnome_la_LDFLAGS = -version-info 36:3:4 #-rpath $(libdir) -libgnome_la_LIBADD = $(GLIB_LIBS) -lm +libgnome_la_LIBADD = $(GLIB_LIBS) bin_PROGRAMS = dns-helper gnome-dump-metadata gnome-moz-remote \ gconfigger gnome-gen-mimedb @@ -307,7 +307,7 @@ gconfigger_LDFLAGS = gnome_gen_mimedb_OBJECTS = gnome-gen-mimedb.$(OBJEXT) gnome_gen_mimedb_DEPENDENCIES = libgnome.la gnome_gen_mimedb_LDFLAGS = -CFLAGS = @CFLAGS@ +CFLAGS = @CFLAGS@ $(DLL_CFLAGS) COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) @@ -354,6 +354,9 @@ install-libLTLIBRARIES: $(lib_LTLIBRARIE if test -f $$p; then \ echo "$(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p"; \ $(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p; \ + dll=$$(echo $$p | sed 's,^lib\(.*\).la$$,cyg\1.dll,'); \ + echo "install -D --mode=755 .libs/$$dll $(DESTDIR)$(bindir)/$$dll"; \ + install -D --mode=755 .libs/$$dll $(DESTDIR)$(bindir)/$$dll; \ else :; fi; \ done @@ -361,6 +364,8 @@ uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) list='$(lib_LTLIBRARIES)'; for p in $$list; do \ $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p; \ + dll=$$(echo $$p | sed 's,^lib\(.*\).la$$,cyg\1.dll,'); \ + rm -f $(DESTDIR)$(bindir)/$$dll; \ done .c.o: @@ -407,8 +412,10 @@ distclean-libtool: maintainer-clean-libtool: +libgnome.la: DLL_CFLAGS = -DLIBGNOME_BUILD_DLL libgnome.la: $(libgnome_la_OBJECTS) $(libgnome_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(libgnome_la_LDFLAGS) $(libgnome_la_OBJECTS) $(libgnome_la_LIBADD) $(LIBS) + PREFIX=$(prefix) sh ../mkdll.sh $@ ../support/.libs/libgnomesupport.dll.a -lpopt $$(glib-config --libs) -lesd -laudiofile -lintl $(LDFLAGS) $(LIBS) mostlyclean-binPROGRAMS: @@ -422,7 +429,7 @@ maintainer-clean-binPROGRAMS: install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(bindir) - @list='$(bin_PROGRAMS)'; for p in $$list; do \ + @list='$(subst .exe,,$(bin_PROGRAMS))'; for p in $$list; do \ if test -f $$p; then \ echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ diff -Naurp gnome-libs-1.4.2/libgnome/gnome-exec.c gnome-libs-1.4.2-cygwin/libgnome/gnome-exec.c --- gnome-libs-1.4.2/libgnome/gnome-exec.c 2002-01-27 00:20:58.000000000 +0000 +++ gnome-libs-1.4.2-cygwin/libgnome/gnome-exec.c 2003-02-26 14:18:10.000000000 +0000 @@ -104,7 +104,11 @@ gnome_execute_async_with_env_fds (const res = pipe(child_comm_pipes); close(parent_comm_pipes[0]); if(!res) +#ifndef __CYGWIN__ child_pid = fork(); +#else + child_pid = vfork(); +#endif switch(child_pid) { case -1: diff -Naurp gnome-libs-1.4.2/libgnome/gnome-fileconvert.c gnome-libs-1.4.2-cygwin/libgnome/gnome-fileconvert.c --- gnome-libs-1.4.2/libgnome/gnome-fileconvert.c 2000-04-04 00:55:38.000000000 +0100 +++ gnome-libs-1.4.2-cygwin/libgnome/gnome-fileconvert.c 2003-02-26 14:19:02.000000000 +0000 @@ -330,7 +330,11 @@ gfc_run_pipe (gchar *acmd, gint infd) close (fds [1]); if (infd > 2) close (infd); +#ifndef __CYGWIN__ if (fork()) /* Double-forking is good for the (zombified) soul ;-) */ +#else + if (vfork()) /* Double-forking is good for the (zombified) soul ;-) */ +#endif exit (0); else execvp (parts [0], parts); diff -Naurp gnome-libs-1.4.2/libgnome/gnome-score.c gnome-libs-1.4.2-cygwin/libgnome/gnome-score.c --- gnome-libs-1.4.2/libgnome/gnome-score.c 2002-01-24 23:06:20.000000000 +0000 +++ gnome-libs-1.4.2-cygwin/libgnome/gnome-score.c 2003-02-26 14:15:38.000000000 +0000 @@ -243,9 +243,13 @@ drop_perms (void) { gid_t gid = getegid (); +#ifndef __CYGWIN__ setregid (getgid (), getgid ()); /* on some os'es (eg linux) this * incantation will also drop the * saved gid */ +#else + setegid(gid); +#endif /* see if we can set it back -- if we can, saved id wasnt dropped */ if (gid != getgid() && !setgid (gid)) { diff -Naurp gnome-libs-1.4.2/libgnome/gnome-triggers.c gnome-libs-1.4.2-cygwin/libgnome/gnome-triggers.c --- gnome-libs-1.4.2/libgnome/gnome-triggers.c 1999-07-29 02:26:32.000000000 +0100 +++ gnome-libs-1.4.2-cygwin/libgnome/gnome-triggers.c 2003-02-26 14:17:26.000000000 +0000 @@ -551,7 +551,11 @@ gnome_trigger_do_command(GnomeTrigger* t { pid_t childpid; int status; +#ifndef __CYGWIN__ childpid = fork(); +#else + childpid = vfork(); +#endif if(childpid) waitpid(childpid, &status, 0); else diff -Naurp gnome-libs-1.4.2/libgnomeui/Makefile.in gnome-libs-1.4.2-cygwin/libgnomeui/Makefile.in --- gnome-libs-1.4.2/libgnomeui/Makefile.in 2002-08-15 23:25:34.000000000 +0100 +++ gnome-libs-1.4.2-cygwin/libgnomeui/Makefile.in 2003-02-26 14:15:38.000000000 +0000 @@ -515,7 +515,7 @@ dock_demo_DEPENDENCIES = libgnomeui.la $(top_builddir)/libgnome/libgnome.la \ $(top_builddir)/libart_lgpl/libart_lgpl.la dock_demo_LDFLAGS = -CFLAGS = @CFLAGS@ +CFLAGS = @CFLAGS@ $(DLL_CFLAGS) COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) @@ -565,6 +565,9 @@ install-libLTLIBRARIES: $(lib_LTLIBRARIE if test -f $$p; then \ echo "$(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p"; \ $(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p; \ + dll=$$(echo $$p | sed 's,^lib\(.*\).la$$,cyg\1.dll,'); \ + echo "install -D --mode=755 .libs/$$dll $(DESTDIR)$(bindir)/$$dll"; \ + install -D --mode=755 .libs/$$dll $(DESTDIR)$(bindir)/$$dll; \ else :; fi; \ done @@ -572,6 +575,8 @@ uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) list='$(lib_LTLIBRARIES)'; for p in $$list; do \ $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p; \ + dll=$$(echo $$p | sed 's,^lib\(.*\).la$$,cyg\1.dll,'); \ + rm -f $(DESTDIR)$(bindir)/$$dll; \ done .c.o: @@ -618,8 +623,10 @@ distclean-libtool: maintainer-clean-libtool: +libgnomeui.la: DLL_CFLAGS = -DLIBGNOMEUI_BUILD_DLL libgnomeui.la: $(libgnomeui_la_OBJECTS) $(libgnomeui_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(libgnomeui_la_LDFLAGS) $(libgnomeui_la_OBJECTS) $(libgnomeui_la_LIBADD) $(LIBS) + PREFIX=$(prefix) sh ../mkdll.sh $@ ../libgnome/.libs/libgnome.dll.a ../support/.libs/libgnomesupport.dll.a -lpopt ../libart_lgpl/.libs/libart_lgpl.dll.a -L/usr/X11R6/lib -lSM -lICE -lX11 $$(imlib-config --libs-gdk) $$(gtk-config --libs) mostlyclean-binPROGRAMS: @@ -633,7 +640,7 @@ maintainer-clean-binPROGRAMS: install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(bindir) - @list='$(bin_PROGRAMS)'; for p in $$list; do \ + @list='$(subst .exe,,$(bin_PROGRAMS))'; for p in $$list; do \ if test -f $$p; then \ echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ diff -Naurp gnome-libs-1.4.2/libgnomeui/gnome-dns.c gnome-libs-1.4.2-cygwin/libgnomeui/gnome-dns.c --- gnome-libs-1.4.2/libgnomeui/gnome-dns.c 1999-09-12 01:39:38.000000000 +0100 +++ gnome-libs-1.4.2-cygwin/libgnomeui/gnome-dns.c 2003-02-26 14:20:08.000000000 +0000 @@ -392,7 +392,11 @@ static gint gnome_dns_create_server(void return(-1); } +#ifndef __CYGWIN__ pid = fork(); +#else + pid = vfork(); +#endif if (pid < 0) { fprintf(stderr, "gnome: forking: %s\n", strerror(errno)); return(-1); diff -Naurp gnome-libs-1.4.2/libgnomeui/gnome-init.c gnome-libs-1.4.2-cygwin/libgnomeui/gnome-init.c --- gnome-libs-1.4.2/libgnomeui/gnome-init.c 2002-08-03 14:23:52.000000000 +0100 +++ gnome-libs-1.4.2-cygwin/libgnomeui/gnome-init.c 2003-02-26 14:19:34.000000000 +0000 @@ -654,7 +654,11 @@ static void gnome_segv_handle(int signum gdk_flush(); +#ifndef __CYGWIN__ if ((pid = fork())) { +#else + if ((pid = vfork())) { +#endif /* Wait for user to see the dialog, then exit. */ /* Why wait at all? Because we want to allow people to attach to the process */ diff -Naurp gnome-libs-1.4.2/libgnomeui/gnome-spell.c gnome-libs-1.4.2-cygwin/libgnomeui/gnome-spell.c --- gnome-libs-1.4.2/libgnomeui/gnome-spell.c 2000-05-04 11:51:24.000000000 +0100 +++ gnome-libs-1.4.2-cygwin/libgnomeui/gnome-spell.c 2003-02-26 14:20:26.000000000 +0000 @@ -441,7 +441,11 @@ gnome_spell_start_proc(GnomeSpell* spell return; } +#ifndef __CYGWIN__ spell->spell_pid = fork(); +#else + spell->spell_pid = vfork(); +#endif if ( spell->spell_pid < 0 ) { g_warning("gnome-spell: fork() failed: %s", g_strerror(errno)); return; diff -Naurp gnome-libs-1.4.2/libgnorba/Makefile.in gnome-libs-1.4.2-cygwin/libgnorba/Makefile.in --- gnome-libs-1.4.2/libgnorba/Makefile.in 2002-08-15 23:25:44.000000000 +0100 +++ gnome-libs-1.4.2-cygwin/libgnorba/Makefile.in 2003-02-26 14:15:38.000000000 +0000 @@ -229,7 +229,7 @@ libgnorbainclude_HEADERS = \ libgnorba_la_LDFLAGS = -version-info 28:8:1 -rpath $(libdir) -libgnorba_la_LIBADD = $(ORBIT_LIBS) $(GLIB_LIBS) -lm +libgnorba_la_LIBADD = $(ORBIT_LIBS) $(GLIB_LIBS) loadshlib_SOURCES = loadshlib.c @@ -319,7 +319,7 @@ goad_browser_LDFLAGS = gnome_name_service_OBJECTS = gnome-name-server.$(OBJEXT) gnome_name_service_DEPENDENCIES = libgnorbagtk.la gnome_name_service_LDFLAGS = -CFLAGS = @CFLAGS@ +CFLAGS = @CFLAGS@ $(DLL_CFLAGS) COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) @@ -368,6 +368,9 @@ install-libLTLIBRARIES: $(lib_LTLIBRARIE if test -f $$p; then \ echo "$(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p"; \ $(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p; \ + dll=$$(echo $$p | sed 's,^lib\(.*\).la$$,cyg\1.dll,'); \ + echo "install -D --mode=755 .libs/$$dll $(DESTDIR)$(bindir)/$$dll"; \ + install -D --mode=755 .libs/$$dll $(DESTDIR)$(bindir)/$$dll; \ else :; fi; \ done @@ -375,6 +378,8 @@ uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) list='$(lib_LTLIBRARIES)'; for p in $$list; do \ $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p; \ + dll=$$(echo $$p | sed 's,^lib\(.*\).la$$,cyg\1.dll,'); \ + rm -f $(DESTDIR)$(bindir)/$$dll; \ done .c.o: @@ -421,11 +426,15 @@ distclean-libtool: maintainer-clean-libtool: +libgnorba.la: DLL_CFLAGS = -DLIBGNORBA_BUILD_DLL libgnorba.la: $(libgnorba_la_OBJECTS) $(libgnorba_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(libgnorba_la_LDFLAGS) $(libgnorba_la_OBJECTS) $(libgnorba_la_LIBADD) $(LIBS) + PREFIX=$(prefix) sh ../mkdll.sh $@ ../libgnomeui/.libs/libgnomeui.dll.a ../libgnome/.libs/libgnome.dll.a ../support/.libs/libgnomesupport.dll.a -lpopt $$(orbit-config --libs --use-service=name client) $$(gtk-config --libs) -lintl +libgnorbagtk.la: DLL_CFLAGS = -DLIBGNORBAGTK_BUILD_DLL libgnorbagtk.la: $(libgnorbagtk_la_OBJECTS) $(libgnorbagtk_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(libgnorbagtk_la_LDFLAGS) $(libgnorbagtk_la_OBJECTS) $(libgnorbagtk_la_LIBADD) $(LIBS) + PREFIX=$(prefix) sh ../mkdll.sh $@ ../libgnomeui/.libs/libgnomeui.dll.a ../libgnome/.libs/libgnome.dll.a ../support/.libs/libgnomesupport.dll.a -lpopt $$(orbit-config --libs --use-service=name client) $$(gtk-config --libs) -lintl mostlyclean-binPROGRAMS: @@ -439,7 +448,7 @@ maintainer-clean-binPROGRAMS: install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(bindir) - @list='$(bin_PROGRAMS)'; for p in $$list; do \ + @list='$(subst .exe,,$(bin_PROGRAMS))'; for p in $$list; do \ if test -f $$p; then \ echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ diff -Naurp gnome-libs-1.4.2/libgnorba/goad.c gnome-libs-1.4.2-cygwin/libgnorba/goad.c --- gnome-libs-1.4.2/libgnorba/goad.c 2002-04-28 14:10:52.000000000 +0100 +++ gnome-libs-1.4.2-cygwin/libgnorba/goad.c 2003-02-26 14:22:40.000000000 +0000 @@ -23,6 +23,7 @@ #define MAX_TTD 64 +#ifndef __CYGWIN__ #ifdef HAVE_DLFCN_H # define SHLIB_DEPENDENCIES 1 #endif @@ -30,6 +31,8 @@ #ifdef SHLIB_DEPENDENCIES # include #endif +#endif /* __CYGWIN__ */ + #include #define SERVER_LISTING_PATH "CORBA/servers" @@ -1105,7 +1108,11 @@ goad_server_activate_exe(GoadServer *sin g_message("Did string_to_object on %s", ai.iorbuf); no_wait: fclose(iorfh); +#ifndef __CYGWIN__ } else if(fork()) { +#else + } else if(vfork()) { +#endif _exit(0); /* de-zombifier process, just exit */ } else { char **args; diff -Naurp gnome-libs-1.4.2/libgnorba/orbitns.c gnome-libs-1.4.2-cygwin/libgnorba/orbitns.c --- gnome-libs-1.4.2/libgnorba/orbitns.c 1999-08-19 17:10:18.000000000 +0100 +++ gnome-libs-1.4.2-cygwin/libgnorba/orbitns.c 2003-02-26 14:23:08.000000000 +0000 @@ -204,7 +204,11 @@ name_server_by_forking (CORBA_Environmen out: fclose(iorfh); +#ifndef __CYGWIN__ } else if (fork ()) { +#else + } else if (vfork ()) { +#endif /* de-zombifier process, just exit */ _exit(0); } else { diff -Naurp gnome-libs-1.4.2/mkdll.sh gnome-libs-1.4.2-cygwin/mkdll.sh --- gnome-libs-1.4.2/mkdll.sh 1970-01-01 00:00:00.000000000 +0000 +++ gnome-libs-1.4.2-cygwin/mkdll.sh 2003-02-26 14:15:38.000000000 +0000 @@ -0,0 +1,68 @@ +#!/bin/sh + +# script to generate dll from libtool-generated static archive (.la file) +# invoke with: +# mkdll.sh +# eg: +# mkdll.sh libtest.la -L/usr/local/lib -llocal + +# defaults to using gcc for libraries written in C. +# set the CC env var to use a different compiler driver: eg +# export CC=g++ +# for C++ libraries + +# defaults to using /usr/local as the installation PREFIX +# override this by setting the PREFIX env var: eg +# export PREFIX=/opt/gnome + +archive=$1 +test -f $archive || { echo $(basename $0): $archive not found; exit 1; } + +module=$(echo $(basename $archive) | sed -e 's,^lib\(.*\).la$,\1,') + +shift +dependency_libs="$@" + +test -n "$CC" || CC=gcc +prefix=${PREFIX:=/usr/local} + +# get the static library name +# first look in the .la archive +old_lib=$(sed -ne '/^old_library=/ s,^old_library='\''\(.*\)'\''.*$,\1,p' .libs/$archive) +# if not there, use default name +test -n "$old_lib" || old_lib=lib${module}.a + + + +# update the archive with the dll and import lib name; fix install dir; remove relink command +# (${prefix}/lib is hard-coded here - edit it if necessary) +libdir=${prefix}/lib +if sed -e 's,^dlname='\'\'',dlname='\'cyg${module}.dll\'',' \ + -e 's,^library_names='\'\'',library_names='\'lib${module}.dll.a\'',' \ + -e '/^libdir=/ s,='\'\'',='\'$libdir\'',' \ + -e '/^relink_command=/ s,^$,,' \ + .libs/$archive > .libs/${archive}.tmp +then cat .libs/${archive}.tmp > .libs/${archive} +fi +rm -f .libs/${archive}.tmp + +# update the install archive if it exists +if [ -f .libs/${archive}i ] ; then + if sed -e 's,^dlname='\'\'',dlname='\'../bin/cyg${module}.dll\'',' \ + -e 's,^library_names='\'\'',library_names='\'lib${module}.dll.a\'',' \ + -e '/^relink_command=/ s,^$,,' \ + .libs/${archive}i > .libs/${archive}i.tmp + then cat .libs/${archive}i.tmp > .libs/${archive}i + fi + rm -f .libs/${archive}i.tmp +fi + + +# report the link command to stdout +eval echo $CC -shared -o cyg${module}.dll -Wl,--out-implib=lib${module}.dll.a \ +-Wl,--export-all-symbols -Wl,--whole-archive $old_lib -Wl,--no-whole-archive ${dependency_libs} + +# do the link command - if it fails, remove archive so make knows to re-build it +eval $CC -shared -o .libs/cyg${module}.dll -Wl,--out-implib=.libs/lib${module}.dll.a -Wl,--export-all-symbols \ +-Wl,--whole-archive .libs/$old_lib -Wl,--no-whole-archive ${dependency_libs} || { rm -f $archive; false; } + diff -Naurp gnome-libs-1.4.2/support/Makefile.in gnome-libs-1.4.2-cygwin/support/Makefile.in --- gnome-libs-1.4.2/support/Makefile.in 2002-08-15 23:25:18.000000000 +0100 +++ gnome-libs-1.4.2-cygwin/support/Makefile.in 2003-02-26 14:15:38.000000000 +0000 @@ -168,7 +168,7 @@ noinst_HEADERS = gnomesupport-fake.h \ gnomeincludedir = $(includedir)/gnome-1.0 gnomeinclude_HEADERS = popt-gnome.h -popt_sources = findme.c poptconfig.c poptparse.c popt.c popthelp.c +#popt_sources = findme.c poptconfig.c poptparse.c popt.c popthelp.c libgnomesupport_la_SOURCES = gnomesupport.h $(popt_sources) gnome-argp.c libgnomesupport_la_LIBADD = @LTLIBOBJS@ @@ -200,9 +200,9 @@ X_LIBS = @X_LIBS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ libgnomesupport_la_DEPENDENCIES = @LTLIBOBJS@ -libgnomesupport_la_OBJECTS = findme.lo poptconfig.lo poptparse.lo \ -popt.lo popthelp.lo gnome-argp.lo -CFLAGS = @CFLAGS@ +libgnomesupport_la_OBJECTS = gnome-argp.lo + +CFLAGS = @CFLAGS@ $(DLL_CFLAGS) COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) @@ -251,6 +251,9 @@ install-libLTLIBRARIES: $(lib_LTLIBRARIE if test -f $$p; then \ echo "$(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p"; \ $(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p; \ + dll=$$(echo $$p | sed 's,^lib\(.*\).la$$,cyg\1.dll,'); \ + echo "install -D --mode=755 .libs/$$dll $(DESTDIR)$(bindir)/$$dll"; \ + install -D --mode=755 .libs/$$dll $(DESTDIR)$(bindir)/$$dll; \ else :; fi; \ done @@ -258,6 +261,8 @@ uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) list='$(lib_LTLIBRARIES)'; for p in $$list; do \ $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p; \ + dll=$$(echo $$p | sed 's,^lib\(.*\).la$$,cyg\1.dll,'); \ + rm -f $(DESTDIR)$(bindir)/$$dll; \ done .c.o: @@ -304,8 +309,10 @@ distclean-libtool: maintainer-clean-libtool: +libgnomesupport.la: DLL_CFLAGS = -DLIBGNOMESUPPORT_BUILD_DLL libgnomesupport.la: $(libgnomesupport_la_OBJECTS) $(libgnomesupport_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(libgnomesupport_la_LDFLAGS) $(libgnomesupport_la_OBJECTS) $(libgnomesupport_la_LIBADD) $(LIBS) + PREFIX=$(prefix) sh ../mkdll.sh $@ -lintl install-supportexecincludeDATA: $(supportexecinclude_DATA) @$(NORMAL_INSTALL) diff -Naurp gnome-libs-1.4.2/support/gnomesupport.h gnome-libs-1.4.2-cygwin/support/gnomesupport.h --- gnome-libs-1.4.2/support/gnomesupport.h 2002-08-15 23:25:16.000000000 +0100 +++ gnome-libs-1.4.2-cygwin/support/gnomesupport.h 2003-02-26 14:15:38.000000000 +0000 @@ -5,11 +5,31 @@ #define GNOMESUPPORT_H #include /* for size_t */ +#include +#include +#include +#define NAMLEN(dirent) strlen((dirent)->d_name) #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ +/* Return a malloc'd copy of at most N bytes of STRING. The + resultant string is terminated even if no null terminator + appears before STRING[N]. */ +char * strndup (const char */*s*/, size_t /*n*/); + +/* Find the length of STRING, but scan at most MAXLEN + characters. If no '\0' terminator is found in that many + characters, return MAXLEN. */ +size_t strnlen (const char */*string*/, size_t /*maxlen*/); + +/* Write formatted output to a string dynamically allocated with + `malloc'. Store the address of the string in *PTR. */ +int vasprintf (char **/*ptr*/, const char */*format*/, + va_list /*args*/); +int asprintf (char **/*ptr*/, const char */*format*/, ...); + #ifdef __cplusplus } #endif /* __cplusplus */ diff -Naurp gnome-libs-1.4.2/test-gnome/Makefile.in gnome-libs-1.4.2-cygwin/test-gnome/Makefile.in --- gnome-libs-1.4.2/test-gnome/Makefile.in 2002-08-15 23:25:48.000000000 +0100 +++ gnome-libs-1.4.2-cygwin/test-gnome/Makefile.in 2003-02-26 14:15:38.000000000 +0000 @@ -39,6 +39,8 @@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. +abs_builddir = $(shell cd $(top_builddir) && pwd) +TEST_ENVIRONMENT = PATH="$(abs_builddir)/gtk-xmhtml/.libs:$(abs_builddir)/libart_lgpl/.libs:$(abs_builddir)/libgnome/.libs:$(abs_builddir)/libgnomeui/.libs:$(abs_builddir)/libgnorba/.libs:$(abs_builddir)/support/.libs:$(abs_builddir)/zvt/.libs:$(PATH)" ACLOCAL = @ACLOCAL@ AUTOCONF = @AUTOCONF@ @@ -828,11 +830,11 @@ maintainer-clean-generic clean mostlycle # the program has to be run from $srcdir to find its image files test: test-gnome blddir=`pwd`; top_blddir=`cd $(top_builddir) && pwd`; cd $(srcdir); \ - $(SHELL) $$top_blddir/libtool --mode=execute $$blddir/test-gnome + $(TEST_ENVIRONMENT) $(SHELL) $$top_blddir/libtool --mode=execute $$blddir/test-gnome test-debug: test-gnome blddir=`pwd`; top_blddir=`cd $(top_builddir) && pwd`; cd $(srcdir); \ - $(SHELL) $$top_blddir/libtool --mode=execute gdb $$blddir/test-gnome + $(TEST_ENVIRONMENT) $(SHELL) $$top_blddir/libtool --mode=execute gdb $$blddir/test-gnome # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Naurp gnome-libs-1.4.2/test-gnome/canvas-primitives.c gnome-libs-1.4.2-cygwin/test-gnome/canvas-primitives.c --- gnome-libs-1.4.2/test-gnome/canvas-primitives.c 1999-03-26 12:37:46.000000000 +0000 +++ gnome-libs-1.4.2-cygwin/test-gnome/canvas-primitives.c 2003-02-26 14:15:38.000000000 +0000 @@ -777,6 +777,9 @@ create_canvas_primitives (gint aa) setup_divisions (root); setup_rectangles (root); setup_ellipses (root); +#ifdef __CYGWIN__ /* antialias text not working on cygwin for some reason */ + if (!aa) +#endif setup_texts (root); setup_images (root, aa); setup_lines (root); diff -Naurp gnome-libs-1.4.2/zvt/Makefile.in gnome-libs-1.4.2-cygwin/zvt/Makefile.in --- gnome-libs-1.4.2/zvt/Makefile.in 2002-08-15 23:25:42.000000000 +0100 +++ gnome-libs-1.4.2-cygwin/zvt/Makefile.in 2003-02-26 14:15:38.000000000 +0000 @@ -148,7 +148,8 @@ gnomelocaledir = @gnomelocaledir@ l = @l@ need_gnome_support = @need_gnome_support@ -sbin_PROGRAMS = gnome-pty-helper +#sbin_PROGRAMS = gnome-pty-helper +sbin_PROGRAMS = lib_LTLIBRARIES = libzvt.la noinst_PROGRAMS = zterm test-utmp @@ -182,7 +183,8 @@ libzvtinclude_HEADERS = \ zvtterm.h -man_MANS = gnome-pty-helper.1 +#man_MANS = gnome-pty-helper.1 +man_MANS = # Since we do gnome-pty-helper manually, include the relevant sources here EXTRA_DIST = TODO BUGS README \ @@ -225,7 +227,7 @@ libzvt_la_LIBADD = libzvt_la_OBJECTS = gnome-login-support.lo lists.lo subshell.lo \ update.lo vt.lo zvtterm.lo noinst_PROGRAMS = zterm$(EXEEXT) test-utmp$(EXEEXT) -sbin_PROGRAMS = gnome-pty-helper$(EXEEXT) +#sbin_PROGRAMS = gnome-pty-helper$(EXEEXT) PROGRAMS = $(noinst_PROGRAMS) $(sbin_PROGRAMS) zterm_OBJECTS = zterm.$(OBJEXT) @@ -239,7 +241,7 @@ gnome_pty_helper_OBJECTS = gnome-pty-he gnome_pty_helper_LDADD = $(LDADD) gnome_pty_helper_DEPENDENCIES = gnome_pty_helper_LDFLAGS = -CFLAGS = @CFLAGS@ +CFLAGS = @CFLAGS@ $(DLL_CFLAGS) COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) @@ -287,6 +289,9 @@ install-libLTLIBRARIES: $(lib_LTLIBRARIE if test -f $$p; then \ echo "$(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p"; \ $(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p; \ + dll=$$(echo $$p | sed 's,^lib\(.*\).la$$,cyg\1.dll,'); \ + echo "install -D --mode=755 .libs/$$dll $(DESTDIR)$(bindir)/$$dll"; \ + install -D --mode=755 .libs/$$dll $(DESTDIR)$(bindir)/$$dll; \ else :; fi; \ done @@ -294,6 +299,8 @@ uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) list='$(lib_LTLIBRARIES)'; for p in $$list; do \ $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p; \ + dll=$$(echo $$p | sed 's,^lib\(.*\).la$$,cyg\1.dll,'); \ + rm -f $(DESTDIR)$(bindir)/$$dll; \ done .c.o: @@ -340,9 +347,11 @@ distclean-libtool: maintainer-clean-libtool: +libzvt.la: DLL_CFLAGS = -DLIBZVT_BUILD_DLL libzvt.la: $(libzvt_la_OBJECTS) $(libzvt_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(libzvt_la_LDFLAGS) $(libzvt_la_OBJECTS) $(libzvt_la_LIBADD) $(LIBS) - + PREFIX=$(prefix) sh ../mkdll.sh $@ $$(imlib-config --libs-gdk) -lutil + mostlyclean-noinstPROGRAMS: clean-noinstPROGRAMS: @@ -364,7 +373,7 @@ maintainer-clean-sbinPROGRAMS: install-sbinPROGRAMS: $(sbin_PROGRAMS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(sbindir) - @list='$(sbin_PROGRAMS)'; for p in $$list; do \ + @list='$(subst .exe,,$(sbin_PROGRAMS))'; for p in $$list; do \ if test -f $$p; then \ echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(sbindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(sbindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ diff -Naurp gnome-libs-1.4.2/zvt/subshell.c gnome-libs-1.4.2-cygwin/zvt/subshell.c --- gnome-libs-1.4.2/zvt/subshell.c 2002-08-03 16:37:40.000000000 +0100 +++ gnome-libs-1.4.2-cygwin/zvt/subshell.c 2003-02-26 14:15:38.000000000 +0000 @@ -22,6 +22,11 @@ #include +#ifdef __CYGWIN__ +#include +#include +#endif + #include "subshell-includes.h" #define ZVT_TERM_DO_UTMP_LOG 1 #define ZVT_TERM_DO_WTMP_LOG 2 @@ -84,6 +89,7 @@ sigchld_handler (int signo) (*old_sigchld_handler.sa_handler)(signo); } + #ifdef HAVE_SENDMSG #include #include @@ -135,7 +141,7 @@ s_pipe (int fd [2]) return socketpair (AF_UNIX, SOCK_STREAM, 0, fd); } -#elif defined(__sgi) && !defined(HAVE_SENDMSG) +#elif ( defined(__sgi) && !defined(HAVE_SENDMSG) ) || defined(__CYGWIN__) /* * IRIX 6.2 is like 4.3BSD; it will not have HAVE_SENDMSG set, @@ -200,6 +206,199 @@ s_pipe (int fd [2]) } #endif +#ifdef __CYGWIN__ + +static struct termios* +init_term_with_defaults(struct termios* term) +{ + /* + * openpty assumes POSIX termios so this should be portable. + * Don't change this to a structure init - POSIX doesn't say + * anything about field order. + */ + memset(term, 0, sizeof(struct termios)); + + term->c_iflag = 0 +#ifdef BRKINT + | BRKINT +#endif +#ifdef ICRNL + | ICRNL +#endif +#ifdef IMAXBEL + | IMAXBEL +#endif +#ifdef IXON + | IXON +#endif +#ifdef IXANY + | IXANY +#endif + ; + term->c_oflag = 0 +#ifdef OPOST + | OPOST +#endif +#ifdef ONLCR + | ONLCR +#endif +#ifdef NL0 + | NL0 +#endif +#ifdef CR0 + | CR0 +#endif +#ifdef TAB0 + | TAB0 +#endif +#ifdef BS0 + | BS0 +#endif +#ifdef VT0 + | VT0 +#endif +#ifdef FF0 + | FF0 +#endif + ; + term->c_cflag = 0 +#ifdef CREAD + | CREAD +#endif +#ifdef CS8 + | CS8 +#endif +#ifdef HUPCL + | HUPCL +#endif + ; +#ifdef EXTB + cfsetispeed(term, EXTB); + cfsetospeed(term, EXTB); +#else +# ifdef B38400 + cfsetispeed(term, B38400); + cfsetospeed(term, B38400); +# else +# ifdef B9600 + cfsetispeed(term, B9600); + cfsetospeed(term, B9600); +# endif +# endif +#endif /* EXTB */ + + term->c_lflag = 0 +#ifdef ECHO + | ECHO +#endif +#ifdef ICANON + | ICANON +#endif +#ifdef ISIG + | ISIG +#endif +#ifdef IEXTEN + | IEXTEN +#endif +#ifdef ECHOE + | ECHOE +#endif +#ifdef ECHOKE + | ECHOKE +#endif +#ifdef ECHOK + | ECHOK +#endif + | ECHOK +#ifdef ECHOCTL + | ECHOCTL +#endif + ; + +#ifdef N_TTY + /* should really be a check for c_line, but maybe this is good enough */ + term->c_line = N_TTY; +#endif + + /* These two may overlap so set them first */ + /* That setup means, that read() will be blocked untill */ + /* at least 1 symbol will be read. */ + term->c_cc[VMIN] = 1; + term->c_cc[VTIME] = 0; + + /* + * Now set the characters. This is of course a religious matter + * but we use the defaults, with erase bound to the key gnome-terminal + * maps. + * + * These are the ones set by "stty sane". + */ + + term->c_cc[VINTR] = 'C'-64; + term->c_cc[VQUIT] = '\\'-64; + term->c_cc[VERASE] = 127; + term->c_cc[VKILL] = 'U'-64; + term->c_cc[VEOF] = 'D'-64; +#ifdef VSWTC + term->c_cc[VSWTC] = 255; +#endif + term->c_cc[VSTART] = 'Q'-64; + term->c_cc[VSTOP] = 'S'-64; + term->c_cc[VSUSP] = 'Z'-64; + term->c_cc[VEOL] = 255; + + /* + * Extended stuff. + */ + +#ifdef VREPRINT + term->c_cc[VREPRINT] = 'R'-64; +#endif +#ifdef VSTATUS + term->c_cc[VSTATUS] = 'T'-64; +#endif +#ifdef VDISCARD + term->c_cc[VDISCARD] = 'O'-64; +#endif +#ifdef VWERASE + term->c_cc[VWERASE] = 'W'-64; +#endif +#ifdef VLNEXT + term->c_cc[VLNEXT] = 'V'-64; +#endif +#ifdef VDSUSP + term->c_cc[VDSUSP] = 'Y'-64; +#endif +#ifdef VEOL2 + term->c_cc[VEOL2] = 255; +#endif + return(term); +} + +static void * +get_ptys (int *master, int *slave, int update_wutmp) { + char *term_name; + int status; + struct termios term; + + term_name = ((char *) alloca (PATH_MAX)) + 1; + /* Initialize term */ + init_term_with_defaults(&term); + + + /* Open pty with priveleges of the user */ + status = openpty (master, slave, term_name, &term, NULL); + + /* openpty() failed, reject request */ + if (status == -1){ + return NULL; + } + + return (void*)1; +} + +#else + static void * get_ptys (int *master, int *slave, int update_wutmp) { @@ -303,6 +502,8 @@ get_ptys (int *master, int *slave, int u return tag; } +#endif /*__CYGWIN__*/ + /** * zvt_init_subshell: * @vt: the terminal emulator object.