After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 147618 - Incomplete glib 64 types migration?
Incomplete glib 64 types migration?
Status: RESOLVED FIXED
Product: libgtop
Classification: Core
Component: general
unspecified
Other FreeBSD
: Normal normal
: ---
Assigned To: libgtop maintainers
libgtop maintainers
: 147422 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2004-07-15 02:29 UTC by Alexander Nedotsukov
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed patch (13.70 KB, patch)
2004-07-16 17:33 UTC, Benoît Dejean
none Details | Review

Description Alexander Nedotsukov 2004-07-15 02:29:45 UTC
Do grep int64_t include/glibtop/*
This trigged build failure in dependent modules on FreeBSD since sys/types.h
header where int64_t defined is not always implicitly included. It is not a
problem for libtop build since include/glibtop/global.h have this header
_IN_LIBGTOP protected.
I propose to finalize 64 bit type migration with some kind of manual
s/int64_t/gint64/. Let me know if you prefer a patch from me.
Comment 1 Benoît Dejean 2004-07-15 08:11:57 UTC
the patch may be done with regexxer (be careful). I'll do it tonight or this
weekend. The only trap is to not replace the "s/int64_t/gint64/" in the
ChangeLog.  Everywhere else, this platform specific types have to be replaced by
g(u?)int64. But i don't know if this is safe enought to be applied in gnome-2-6
as i don't think conversion are implicit between this two types. This may depend
on the compiler.
Comment 2 Alexander Nedotsukov 2004-07-15 08:58:45 UTC
Hmm. Do you mean that glib 64bit integer may be not 64bit integer? Since
platrorm independent C99 defined int64_t is always 64bit integer.
Comment 3 Benoît Dejean 2004-07-15 09:10:30 UTC
no, i mean that even if int64_t and gint64 are typedef of the same 64bits types,
cast (or value or pointer) may not be implicit and will break software using
them.  I'm not sure but this minor change may break the API in a way, so it
would be better to apply it in HEAD, not in gnome-2-6
Comment 4 Benoît Dejean 2004-07-16 06:31:07 UTC
*** Bug 147508 has been marked as a duplicate of this bug. ***
Comment 5 Benoît Dejean 2004-07-16 06:32:29 UTC
*** Bug 147422 has been marked as a duplicate of this bug. ***
Comment 6 Benoît Dejean 2004-07-16 17:33:34 UTC
Created attachment 29588 [details] [review]
proposed patch

Could you check and test this patch against CVS please ?
Comment 7 Benoît Dejean 2004-07-18 20:34:14 UTC
	* doc/reference.texi:
	* include/glibtop/command.h:
	* include/glibtop/glib-arrays.h:
	* include/glibtop/proclist.h:
	* lib/glib-arrays.c: (glibtop_get_proclist_as_array_l):
	* lib/lib.pl:
	* scripts/c_types.pl:
	* src/daemon/main.c: (handle_parent_connection):
	* src/daemon/slave.c: (handle_slave_connection):
	* support/mkstemp.c:
	* sysdeps/aix/proclist.c: (glibtop_get_proclist_s):
	* sysdeps/freebsd/cpu.c: (glibtop_get_cpu_p):
	* sysdeps/freebsd/prockernel.c: (glibtop_get_proc_kernel_p):
	* sysdeps/freebsd/proclist.c: (glibtop_get_proclist_p):
	* sysdeps/freebsd/procmem.c: (glibtop_get_proc_mem_p):
	* sysdeps/kernel/proclist.c: (glibtop_get_proclist_s):
	* sysdeps/linux/proclist.c: (glibtop_get_proclist_s):
	* sysdeps/osf1/proclist.c: (glibtop_get_proclist_p):
	* sysdeps/solaris/proclist.c: (glibtop_get_proclist_s):
	* sysdeps/stub/proclist.c: (glibtop_get_proclist_s):
	* sysdeps/stub_suid/proclist.c: (glibtop_get_proclist_p):
	* sysdeps/sun4/proclist.c: (glibtop_get_proclist_p): Glibify a bit more.
	Closes #147618.