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 341826 - goption.c: 'strtoll' is C99's function
goption.c: 'strtoll' is C99's function
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: general
2.11.x
Other All
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2006-05-15 10:22 UTC by Kazuki Iwamoto
Modified: 2011-02-18 15:49 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Kazuki Iwamoto 2006-05-15 10:22:30 UTC
Please describe the problem:
'strtoll' is C99's function.
So goption.c is not able to be compiled with old C run-time library.

Steps to reproduce:
1. compile by old compiler

Actual results:
Following message is displayed. (Visual C++ 6.0)
goption.c(750) : error C4013: 'strtoll' undefined; assuming extern returning int

Expected results:
If 'strtoll' exists, macro 'HAVE_STRTOLL' should be defined.
For example,
#ifdef HAVE_STRTOLL
  tmp = strtoll (arg, &end, 0);
#else
  tmp = strtol (arg, &end, 0);
#endif

Or, add a new API 'g_ascii_strtoll' to gstrfuncs.c and use it.
('g_ascii_strtoull' already exists since 2.2.)

Does this happen every time?


Other information:
Comment 1 Matthias Clasen 2006-05-15 14:50:19 UTC
Yes, we need g_ascii_strtoll for this.