[Glade-devel] glade-2.0.0: win32 patch
- From: v caron zerodeux net (Vincent Caron)
- Subject: [Glade-devel] glade-2.0.0: win32 patch
- Date: Fri, 6 Jun 2003 18:17:07 +0200 (CEST)
------=_20030606181707_68967
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
Hello,
attached a simple patch to help win32 (and maybe other hostile places) compilation.
* glade/main.c
- shielded <unistd.h> inclusion against _WIN32
(was already done in other places)
* glade/utils.c
- replaced diropen() with more portable glib's g_dir_open()
BTW, where is glade 2.x CVS ? I couldn't find a matching module on cvs.gnome.org.
Thanks !
------=_20030606181707_68967
Content-Type: application/octet-stream; name="glade2_diropen.patch"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="glade2_diropen.patch"
T25seSBpbiBnbGFkZTI6IGNvbmZpZy5oDQpPbmx5IGluIGdsYWRlMjogZGVidWcNCmRpZmYgLWNy
IGdsYWRlLTIuMC4wL2dsYWRlL21haW4uYyBnbGFkZTIvZ2xhZGUvbWFpbi5jDQoqKiogZ2xhZGUt
Mi4wLjAvZ2xhZGUvbWFpbi5jCVdlZCBBcHIgIDIgMTc6MDE6MDYgMjAwMw0KLS0tIGdsYWRlMi9n
bGFkZS9tYWluLmMJVGh1IEp1biAgNSAyMDo0NDowMiAyMDAzDQoqKioqKioqKioqKioqKioNCioq
KiAyMywyOSAqKioqDQotLS0gMjMsMzEgLS0tLQ0KICAjaW5jbHVkZSA8c3RyaW5nLmg+DQogICNp
bmNsdWRlIDxzeXMvdHlwZXMuaD4NCiAgI2luY2x1ZGUgPHN5cy9zdGF0Lmg+DQorICNpZm5kZWYg
X1dJTjMyDQogICNpbmNsdWRlIDx1bmlzdGQuaD4NCisgI2VuZGlmDQogIA0KICAjaW5jbHVkZSA8
Z3RrL2d0a21haW4uaD4NCiAgI2luY2x1ZGUgPGd0ay9ndGtyYy5oPg0KZGlmZiAtY3IgZ2xhZGUt
Mi4wLjAvZ2xhZGUvdXRpbHMuYyBnbGFkZTIvZ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gTlVMTCkNCiAgCSAgICBicmVhazsNCiAgDQohIAkgIGlmICghc3RybmNt
cCAoZW50cnksIHByb2plY3Rfc3RyaW5nLCBwcm9qZWN0X3N0cmluZ19sZW4pKQ0KICAJICAgIHsN
CiAgCSAgICAgIC8qIE5vdyBzZWUgaWYgaXQgaGFzIGEgbnVtYmVyIG9uIHRoZSBlbmQuICovDQoh
IAkgICAgICBudW1fbWF0Y2hlZCA9IHNzY2FuZiAoZW50cnkgKyBwcm9qZWN0X3N0cmluZ19sZW4s
DQogIAkJCQkgICAgIiVpJW4iLCAmcHJvamVjdF9udW0sICZjaGFyc19tYXRjaGVkKTsNCiAgCSAg
ICAgIGlmIChudW1fbWF0Y2hlZCA+PSAxDQohIAkJICAmJiBjaGFyc19tYXRjaGVkID09IHN0cmxl
biAoZW50cnkpIC0gcHJvamVjdF9zdHJpbmdfbGVuKQ0KICAJCXsNCiAgCQkgIG1heF9wcm9qZWN0
X251bSA9IE1BWCAobWF4X3Byb2plY3RfbnVtLCBwcm9qZWN0X251bSk7DQogIAkJfQ0KICAJICAg
IH0NCiAgCX0NCiAgDQohICAgICAgIGdfZGlyX2Nsb3NlIChkaXJlY3RvcnkpOw0KICAgICAgfQ0K
ICANCiAgICBtYXhfcHJvamVjdF9udW0rKzsNCk9ubHkgaW4gZ2xhZGUyOiBnbGFkZTIubmNiDQpP
bmx5IGluIGdsYWRlMjogZ2xhZGUyLnNsbg0KT25seSBpbiBnbGFkZTI6IGdsYWRlMi5zdW8NCk9u
bHkgaW4gZ2xhZGUyOiBnbGFkZTIudmNwcm9qDQo=
------=_20030606181707_68967--
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]