mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-09-27 17:52:58 +02:00
win32: Updated msvc build files
Now it's possible again to build on the command line again. Lowest tested compiler version is msvc6 (aka _MSC_VER 1200)
This commit is contained in:
@@ -182,7 +182,12 @@ g_settings_set_mapping_unsigned_int (const GValue *value,
|
||||
variant = g_variant_new_handle ((guint) u);
|
||||
}
|
||||
else if (g_variant_type_equal (expected_type, G_VARIANT_TYPE_DOUBLE))
|
||||
#ifdef _MSC_VER && (_MSC_VER <= 1200)
|
||||
/* error C2520: conversion from unsigned __int64 to double not implemented */
|
||||
variant = g_variant_new_double ((gdouble) (__int64)u);
|
||||
#else
|
||||
variant = g_variant_new_double ((gdouble) u);
|
||||
#endif
|
||||
|
||||
return variant;
|
||||
}
|
||||
@@ -320,7 +325,12 @@ g_settings_get_mapping_unsigned_int (GValue *value,
|
||||
}
|
||||
else if (G_VALUE_HOLDS_DOUBLE (value))
|
||||
{
|
||||
#ifdef _MSC_VER && (_MSC_VER <= 1200)
|
||||
/* error C2520: conversion from unsigned __int64 to double not implemented */
|
||||
g_value_set_double (value, (__int64)u);
|
||||
#else
|
||||
g_value_set_double (value, u);
|
||||
#endif
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@@ -5,7 +5,7 @@ PACKAGE = gio
|
||||
PKG_VER = 2.0
|
||||
!INCLUDE $(TOP)\glib\build\win32\make.msc
|
||||
|
||||
SUBDIRS = win32
|
||||
SUBDIRS = gvdb win32
|
||||
|
||||
sub-all:
|
||||
for %d in ($(SUBDIRS)) do nmake -nologo -f makefile.msc sub-one THIS=%d
|
||||
@@ -67,6 +67,7 @@ gio_headers = \
|
||||
gnativevolumemonitor.h \
|
||||
goutputstream.h \
|
||||
gseekable.h \
|
||||
gsettings.h \
|
||||
gsimpleasyncresult.h \
|
||||
gthemedicon.h \
|
||||
gvfs.h \
|
||||
@@ -75,23 +76,55 @@ gio_headers = \
|
||||
$(NULL)
|
||||
|
||||
OBJECTS = \
|
||||
gaction.obj \
|
||||
gactiongroup.obj \
|
||||
gappinfo.obj \
|
||||
gapplication.obj \
|
||||
gapplicationcommandline.obj \
|
||||
gapplicationimpl-win32.obj \
|
||||
gasynchelper.obj \
|
||||
gasyncinitable.obj \
|
||||
gasyncresult.obj \
|
||||
gbufferedinputstream.obj \
|
||||
gbufferedoutputstream.obj \
|
||||
gcancellable.obj \
|
||||
gcharsetconverter.obj \
|
||||
gcontenttype.obj \
|
||||
gconverter.obj \
|
||||
gconverterinputstream.obj \
|
||||
gconverteroutputstream.obj \
|
||||
gcredentials.obj \
|
||||
gdatainputstream.obj \
|
||||
gdataoutputstream.obj \
|
||||
gdbusaddress.obj \
|
||||
gdbusauth.obj \
|
||||
gdbusauthmechanism.obj \
|
||||
gdbusauthmechanismanon.obj \
|
||||
gdbusauthmechanismexternal.obj \
|
||||
gdbusauthmechanismsha1.obj \
|
||||
gdbusauthobserver.obj \
|
||||
gdbusconnection.obj \
|
||||
gdbuserror.obj \
|
||||
gdbusintrospection.obj \
|
||||
gdbusmessage.obj \
|
||||
gdbusmethodinvocation.obj \
|
||||
gdbusnameowning.obj \
|
||||
gdbusnamewatching.obj \
|
||||
gdbusprivate.obj \
|
||||
gdbusproxy.obj \
|
||||
gdbusserver.obj \
|
||||
gdbusutils.obj \
|
||||
# gdesktopappinfo.obj \
|
||||
gdelayedsettingsbackend.obj \
|
||||
gdrive.obj \
|
||||
gdummyfile.obj \
|
||||
gdummyproxyresolver.obj \
|
||||
gdummytlsbackend.obj \
|
||||
gemblem.obj \
|
||||
gemblemedicon.obj \
|
||||
gfile.obj \
|
||||
gfileattribute.obj \
|
||||
gfiledescriptorbased.obj \
|
||||
gfileenumerator.obj \
|
||||
gfileicon.obj \
|
||||
gfileinfo.obj \
|
||||
@@ -112,20 +145,38 @@ OBJECTS = \
|
||||
giomodule.obj \
|
||||
gioscheduler.obj \
|
||||
giostream.obj \
|
||||
gkeyfilesettingsbackend.obj \
|
||||
gloadableicon.obj \
|
||||
glocalfileiostream.obj \
|
||||
gmemoryinputstream.obj \
|
||||
gmemoryoutputstream.obj \
|
||||
gmemorysettingsbackend.obj \
|
||||
gmount.obj \
|
||||
gmountoperation.obj \
|
||||
gnativevolumemonitor.obj \
|
||||
gnetworkaddress.obj \
|
||||
gnetworkservice.obj \
|
||||
gnullsettingsbackend.obj \
|
||||
goutputstream.obj \
|
||||
gpermission.obj \
|
||||
gpollableinputstream.obj \
|
||||
gpollableoutputstream.obj \
|
||||
gpollfilemonitor.obj \
|
||||
gproxy.obj \
|
||||
gproxyaddress.obj \
|
||||
gproxyaddressenumerator.obj \
|
||||
gproxyresolver.obj \
|
||||
gresolver.obj \
|
||||
gsettings-mapping.obj \
|
||||
gsettings-tool.obj \
|
||||
gsettings.obj \
|
||||
gsettingsbackend.obj \
|
||||
gsettingsschema.obj \
|
||||
gseekable.obj \
|
||||
gsimpleaction.obj \
|
||||
gsimpleactiongroup.obj \
|
||||
gsimpleasyncresult.obj \
|
||||
gsimplepermission.obj \
|
||||
gsocket.obj \
|
||||
gsocketaddress.obj \
|
||||
gsocketaddressenumerator.obj \
|
||||
@@ -137,6 +188,10 @@ OBJECTS = \
|
||||
gsocketservice.obj \
|
||||
gsocketinputstream.obj \
|
||||
gsocketoutputstream.obj \
|
||||
gsocks4aproxy.obj \
|
||||
gsocks4proxy.obj \
|
||||
gsocks5proxy.obj \
|
||||
gtcpwrapperconnection.obj \
|
||||
gsrvtarget.obj \
|
||||
gtcpconnection.obj \
|
||||
gthreadedresolver.obj \
|
||||
@@ -157,10 +212,21 @@ OBJECTS = \
|
||||
glocaldirectorymonitor.obj \
|
||||
gwin32appinfo.obj \
|
||||
\
|
||||
gtlsbackend.obj \
|
||||
gtlscertificate.obj \
|
||||
gtlsclientconnection.obj \
|
||||
gtlsconnection.obj \
|
||||
gtlsserverconnection.obj \
|
||||
\
|
||||
gio-marshal.obj \
|
||||
gregistrysettingsbackend.obj \
|
||||
gwin32inputstream.obj \
|
||||
gwin32outputstream.obj \
|
||||
gwin32mount.obj \
|
||||
gwin32volumemonitor.obj \
|
||||
gwin32resolver.obj
|
||||
gwin32resolver.obj \
|
||||
gzlibcompressor.obj \
|
||||
gzlibdecompressor.obj \
|
||||
|
||||
libgio_2_0_la_LIBADD = \
|
||||
$(top_builddir)/glib/libglib-2.0.la \
|
||||
@@ -250,8 +316,8 @@ $(PACKAGE).res : $(PACKAGE).rc
|
||||
libgio-$(PKG_VER)-0.dll : $(OBJECTS) win32\giowin32.lib $(PACKAGE).def $(RESOURCE)
|
||||
$(CC) $(CFLAGS) -LD -Felibgio-$(PKG_VER)-0.dll $(OBJECTS) $(RESOURCE) \
|
||||
..\glib\glib-2.0.lib ..\gobject\gobject-2.0.lib ..\gmodule\gmodule-2.0.lib \
|
||||
win32\giowin32.lib \
|
||||
$(INTL_LIBS) \
|
||||
gvdb\gvdb.lib win32\giowin32.lib \
|
||||
$(INTL_LIBS) $(ZLIB_LIBS) \
|
||||
kernel32.lib user32.lib advapi32.lib shell32.lib wsock32.lib ws2_32.lib dnsapi.lib mpr.lib $(LDFLAGS) \
|
||||
/implib:gio-2.0.lib /def:$(PACKAGE).def
|
||||
|
||||
|
@@ -1826,7 +1826,12 @@ g_date_time_get_seconds (GDateTime *datetime)
|
||||
{
|
||||
g_return_val_if_fail (datetime != NULL, 0);
|
||||
|
||||
#ifdef _MSC_VER && (MSC_VER <= 1200)
|
||||
/* error C2520: conversion from unsigned __int64 to double not implemented */
|
||||
return (__int64)(datetime->usec % USEC_PER_MINUTE) / 1000000.0;
|
||||
#else
|
||||
return (datetime->usec % USEC_PER_MINUTE) / 1000000.0;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Exporters {{{1 */
|
||||
|
@@ -49,7 +49,7 @@
|
||||
#error Please port this to your operating system
|
||||
#endif
|
||||
|
||||
#if defined (_MSC_VER) && !defined(_WIN64)
|
||||
#if defined (_MSC_VER) && (_MSC_VER > 1200) && !defined(_WIN64)
|
||||
#undef _wstat
|
||||
#define _wstat _wstat32
|
||||
#endif
|
||||
|
@@ -43,9 +43,11 @@ G_BEGIN_DECLS
|
||||
* in MinGW, a plain "struct stat" is the one with 32-bit st_size and
|
||||
* st_*time fields.
|
||||
*/
|
||||
|
||||
# if (_MSC_VER > 1200)
|
||||
typedef struct _stat32 GStatBuf;
|
||||
|
||||
# else
|
||||
typedef struct stat GStatBuf;
|
||||
# endif
|
||||
#else
|
||||
|
||||
typedef struct stat GStatBuf;
|
||||
|
@@ -17,7 +17,7 @@ DEPCFLAGS = -Zm400 $(INTL_CFLAGS) $(DIRENT_CFLAGS)
|
||||
|
||||
all : \
|
||||
..\config.h \
|
||||
..\glibconfig.h \
|
||||
glibconfig.h \
|
||||
gnulib\gnulib.lib \
|
||||
pcre\pcre.lib \
|
||||
libglib-2.0-0.dll \
|
||||
@@ -42,13 +42,16 @@ glib_OBJECTS = \
|
||||
gatomic.obj \
|
||||
gbacktrace.obj \
|
||||
gbase64.obj \
|
||||
gbitlock.obj \
|
||||
gbookmarkfile.obj \
|
||||
gbuffer.obj \
|
||||
gcache.obj \
|
||||
gchecksum.obj \
|
||||
gcompletion.obj \
|
||||
gconvert.obj \
|
||||
gdataset.obj \
|
||||
gdate.obj \
|
||||
gdatetime.obj \
|
||||
gdir.obj \
|
||||
gerror.obj \
|
||||
gfileutils.obj \
|
||||
@@ -88,19 +91,26 @@ glib_OBJECTS = \
|
||||
gthread.obj \
|
||||
gthreadpool.obj \
|
||||
gtimer.obj \
|
||||
gtimezone.obj \
|
||||
gtree.obj \
|
||||
gunibreak.obj \
|
||||
gunicollate.obj \
|
||||
gunidecomp.obj \
|
||||
guniprop.obj \
|
||||
gurifuncs.obj \
|
||||
gutf8.obj \
|
||||
gutils.obj \
|
||||
gwin32.obj \
|
||||
gutf8.obj \
|
||||
gutils.obj \
|
||||
gvariant-core.obj \
|
||||
gvariant-parser.obj \
|
||||
gvariant-serialiser.obj \
|
||||
gvariant.obj \
|
||||
gvarianttype.obj \
|
||||
gvarianttypeinfo.obj \
|
||||
gwin32.obj \
|
||||
localcharset.obj
|
||||
|
||||
..\glibconfig.h: ..\glibconfig.h.win32
|
||||
copy ..\glibconfig.h.win32 ..\glibconfig.h
|
||||
glibconfig.h: glibconfig.h.win32
|
||||
copy glibconfig.h.win32 glibconfig.h
|
||||
|
||||
..\config.h: ..\config.h.win32
|
||||
copy ..\config.h.win32 ..\config.h
|
||||
|
@@ -7,7 +7,7 @@ TOP = ..\..
|
||||
|
||||
################################################################
|
||||
|
||||
INCLUDES = -FImsvc_recommended_pragmas.h -I .. -I . -I ..\glib
|
||||
INCLUDES = -FImsvc_recommended_pragmas.h -I .. -I . -I ..\glib $(INTL_CFLAGS)
|
||||
DEFINES = -DHAVE_CONFIG_H -DGOBJECT_COMPILATION -DG_LOG_DOMAIN=\"GLib-GObject\" \
|
||||
-DG_ENABLE_DEBUG
|
||||
# -DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -DG_DISABLE_CAST_CHECKS
|
||||
@@ -24,6 +24,8 @@ all : \
|
||||
testgobject.exe
|
||||
|
||||
gobject_OBJECTS = \
|
||||
gatomicarray.obj \
|
||||
gbinding.obj \
|
||||
gboxed.obj \
|
||||
gclosure.obj \
|
||||
genums.obj \
|
||||
@@ -61,7 +63,8 @@ gmarshal.c: gmarshal.list gmarshal.h glib-genmarshal.exe
|
||||
|
||||
libgobject-2.0-@LT_CURRENT_MINUS_AGE@.dll : $(gobject_OBJECTS) gobject.def gobject.res
|
||||
$(CC) $(CFLAGS) -Fm -LD -Fe$@ $(gobject_OBJECTS) gobject.res \
|
||||
..\glib\glib-2.0.lib $(LDFLAGS) /implib:gobject-2.0.lib /def:gobject.def || del $@
|
||||
..\glib\glib-2.0.lib ..\gthread\gthread-2.0.lib \
|
||||
$(LDFLAGS) /implib:gobject-2.0.lib /def:gobject.def || del $@
|
||||
|
||||
gobject-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@s.lib : $(gobject_OBJECTS)
|
||||
lib /out:$@ $(gobject_OBJECTS)
|
||||
|
@@ -5,7 +5,6 @@ PARTS = glib gmodule gthread gobject gio tests
|
||||
|
||||
all : \
|
||||
config.h \
|
||||
glibconfig.h \
|
||||
sub-all
|
||||
|
||||
sub-all:
|
||||
@@ -23,6 +22,3 @@ sub-one:
|
||||
|
||||
config.h: config.h.win32
|
||||
copy config.h.win32 config.h
|
||||
|
||||
glibconfig.h: glibconfig.h.win32
|
||||
copy glibconfig.h.win32 glibconfig.h
|
||||
|
Reference in New Issue
Block a user