ThinkPart

Andrey's blog

 

Of strtold, strto(u), strto(u)ll, strtoumax(), strtoimax()

 

We are trying to compile Connector/C++ in the OpenOffice.Org environment, however dmake, the OO.Org build too (Ubuntu/Debian has it) can't work currently with CMake. CMake is the meta-make system we use for Connector/C++ to easy the portability. I had a blog entry which platforms are supported, a vast number. Without CMake this wouldn't have been that easy.

For OO.Org we try with pre-compiled headers instead of using CMake for the detection of existing functions and types. Connector/C++ checks for the following functions:

  • strtold() - like strtod() but returns long double. Connector/C++ uses long double in the API
  • strtol() - string to long
  • strtoul() - string to unsigned long
  • strtoll() - string to long long. Not every platform has it.
  • strtoull() - string to unsigned long long. Not every platform has it.
  • strtoimax()
  • strtoumax()

Here is the list I collected from almost all platforms:


SOLARIS9 x86
-- Looking for strtold - not found
-- Looking for strtol - found
-- Looking for strtoll - found
-- Looking for strtoul - found
-- Looking for strtoull - found
-- Looking for strtoimax - not found
-- Looking for strtoumax - not found

SOLARIS9 sparc64
-- Looking for strtold - not found
-- Looking for strtol - found
-- Looking for strtoll - found
-- Looking for strtoul - found
-- Looking for strtoull - found
-- Looking for strtoimax - not found
-- Looking for strtoumax - not found

SOLARIS9 sparc32
-- Looking for strtold - not found
-- Looking for strtol - found
-- Looking for strtoll - found
-- Looking for strtoul - found
-- Looking for strtoull - found
-- Looking for strtoimax - not found
-- Looking for strtoumax - not found

SOLARIS10 x86
-- Looking for strtold - found
-- Looking for strtol - found
-- Looking for strtoll - found
-- Looking for strtoul - found
-- Looking for strtoull - found
-- Looking for strtoimax - found
-- Looking for strtoumax - found

SOLARIS10 x86_64
-- Looking for strtold - found
-- Looking for strtol - found
-- Looking for strtoll - found
-- Looking for strtoul - found
-- Looking for strtoull - found
-- Looking for strtoimax - found
-- Looking for strtoumax - found

SOLARIS10 sparc32
-- Looking for strtold - found
-- Looking for strtol - found
-- Looking for strtoll - found
-- Looking for strtoul - found
-- Looking for strtoull - found
-- Looking for strtoimax - found
-- Looking for strtoumax - found

SOLARIS10 sparc64
-- Looking for strtold - found
-- Looking for strtol - found
-- Looking for strtoll - found
-- Looking for strtoul - found
-- Looking for strtoull - found
-- Looking for strtoimax - found
-- Looking for strtoumax - found

MacOSX 10.4 x86
-- Looking for strtold - found
-- Looking for strtol - found
-- Looking for strtoll - found
-- Looking for strtoul - found
-- Looking for strtoull - found
-- Looking for strtoimax - found
-- Looking for strtoumax - found

MacOSX 10.4 ppc32
-- Looking for strtold - found
-- Looking for strtol - found
-- Looking for strtoll - found
-- Looking for strtoul - found
-- Looking for strtoull - found
-- Looking for strtoimax - found
-- Looking for strtoumax - found

MacOSX 10.4 ppc64
-- Looking for strtold - found
-- Looking for strtol - found
-- Looking for strtoll - found
-- Looking for strtoul - found
-- Looking for strtoull - found
-- Looking for strtoimax - found
-- Looking for strtoumax - found

MacOSX 10.5 x86
-- Looking for strtold - found
-- Looking for strtol - found
-- Looking for strtoll - found
-- Looking for strtoul - found
-- Looking for strtoull - found
-- Looking for strtoimax - found
-- Looking for strtoumax - found

MacOSX 10.5 ppc32
-- Looking for strtold - found
-- Looking for strtol - found
-- Looking for strtoll - found
-- Looking for strtoul - found
-- Looking for strtoull - found
-- Looking for strtoimax - found
-- Looking for strtoumax - found

MacOSX 10.5 ppc64
-- Looking for strtold - found
-- Looking for strtol - found
-- Looking for strtoll - found
-- Looking for strtoul - found
-- Looking for strtoull - found
-- Looking for strtoimax - found
-- Looking for strtoumax - found

RHEL4 x86
-- Looking for strtold - found
-- Looking for strtol - found
-- Looking for strtoll - found
-- Looking for strtoul - found
-- Looking for strtoull - found
-- Looking for strtoimax - found
-- Looking for strtoumax - found

RHEL4 x86_64
-- Looking for strtold - found
-- Looking for strtol - found
-- Looking for strtoll - found
-- Looking for strtoul - found
-- Looking for strtoull - found
-- Looking for strtoimax - found
-- Looking for strtoumax - found

RHEL4 ia64
-- Looking for strtold - found
-- Looking for strtol - found
-- Looking for strtoll - found
-- Looking for strtoul - found
-- Looking for strtoull - found
-- Looking for strtoimax - found
-- Looking for strtoumax - found

AIX 5.2 ppc32
-- Looking for strtold - found
-- Looking for strtol - found
-- Looking for strtoll - found
-- Looking for strtoul - found
-- Looking for strtoull - found
-- Looking for strtoimax - found
-- Looking for strtoumax - found

AIX 5.2 ppc64
-- Looking for strtold - found
-- Looking for strtol - found
-- Looking for strtoll - found
-- Looking for strtoul - found
-- Looking for strtoull - found
-- Looking for strtoimax - found
-- Looking for strtoumax - found

AIX 5.3 ppc32
-- Looking for strtold - found
-- Looking for strtol - found
-- Looking for strtoll - found
-- Looking for strtoul - found
-- Looking for strtoull - found
-- Looking for strtoimax - found
-- Looking for strtoumax - found

AIX 5.3 ppc64
-- Looking for strtold - found
-- Looking for strtol - found
-- Looking for strtoll - found
-- Looking for strtoul - found
-- Looking for strtoull - found
-- Looking for strtoimax - found
-- Looking for strtoumax - found

FreeBSD6 x86
-- Looking for strtold - found
-- Looking for strtol - found
-- Looking for strtoll - found
-- Looking for strtoul - found
-- Looking for strtoull - found
-- Looking for strtoimax - found
-- Looking for strtoumax - found

FreeBSD6 x64
-- Looking for strtold - found
-- Looking for strtol - found
-- Looking for strtoll - found
-- Looking for strtoul - found
-- Looking for strtoull - found
-- Looking for strtoimax - found
-- Looking for strtoumax - found

FreeBSD7 x86
-- Looking for strtold - found
-- Looking for strtol - found
-- Looking for strtoll - found
-- Looking for strtoul - found
-- Looking for strtoull - found
-- Looking for strtoimax - found
-- Looking for strtoumax - found

FreeBSD7 x86_64
-- Looking for strtold - found
-- Looking for strtol - found
-- Looking for strtoll - found
-- Looking for strtoul - found
-- Looking for strtoull - found
-- Looking for strtoimax - found
-- Looking for strtoumax - found

Responses (2) to "Of strtold, strto(u), strto(u)ll, strtoumax(), strtoimax()"

  1.  

    Looks to me like Solaris9 non x86 is the only problem area. Hmmm, that's not surprising. You might also want to check out the m4 macros in Drizzle to look for this kind of thing using autotools. smile

    Cheers!

    j

  2.  

    Jay, it's just for me for reference and Google to index it, so if someone is looking for this in the future he can find that information smile And it will be stored in the Internet Archive, now running SUN hardware on a SUN location in Santa Clara.

Leave a reply

Comments are disabled for this post.