[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-gnulib] gnulib module for uintmax_t? (and best practice questions)
From: |
James Youngman |
Subject: |
[Bug-gnulib] gnulib module for uintmax_t? (and best practice questions) |
Date: |
Sun, 17 Oct 2004 21:26:52 +0100 |
User-agent: |
Mutt/1.3.28i |
Hello,
This is a longish email which discusses a fairly simple problem. If I
understood the way that autoconf/automake pick up m4 macros well
enough to make this question shorter, I probably wouldn't need to ask
it...
I've just updated the version of gnulib in use by findutils to today's
gnulib. No new problems (except of course that I had to add the new
module xalloc-die in).
However, like the previous findutils code base, the current code does
not build under GCC 2.95.3 on AIX 4.3. The problem I think is that
findutils uses intmax_t (in find, as an attempt to check for
arithmetic overflow in time_t when parsing arguments to e.g. -mtime).
That type isn't available for that combination of OS and GCC version.
Gnulib solves this for uintmax_t, but when I tried to adapt the
solution used there for intmax_t, things went wrong in several ways
which I think are probably due to the fact that I'm using gnulib in a
rather odd way.
Part of my problem is perhaps that the subdirectory
findutils-x.y.z/gnulib within the findutils distribution is wholly
maintained by gnulib-tool, and so I can't make local changes in or
below the 'gnulib' directory. This has the advantage that I can
easily keep the code up to date with gnulib, but the disadvantage that
I have two config.h files (finudtils-x.y.z/config.h generated by the
top-level configure script and finudtils-x.y.z/gnulib/config.h
generated by finudtils-x.y.z/gnulib/configure via
AC_CONFIG_SUBDIRS(gnulib)).
This arrangement mainly works, but the gnulib config.h file is used
only to build gnulib, and not by the main set of code. I think that
might produce subtle problems I'm not noticing on platforms that need
more of the gnulib functionality (my normal development system runs
glibc). I've tried using AC_CONFIG_MACRO_DIR(gnulib/m4) in the
top-level configure.in script, but this doesn't seem to help. I still
have things like gl_FUINC_ALLOCA being passed through unsubstituted
into the generated finudtils-x.y.z/configure script).
If I manually use "aclocal -I . -I gnulib/m4" then gl_FUINC_ALLOCA
does get substituted, but if I then touch configure.in and run "make"
in the build directory, the automatic invocation of "aclocal" doesn't
include those "-I" options. Hence I can't use that solution (I don't
use --enable-maintainer-mode/AM_MAINTAINER_MODE).
So, to finally get to my point,
1. What is the best way for me to get intmax_t #defined or typedeffed?
If the answer is an m4 file from somewhere, where do I put it? I
can't put it in findutils-x.y.z/gnulib/m4 because that's the
pristine output of gnulib-tool, and I don't think that aclocal
picks stuff up from anywhere else.
2. Is there a better way of making use of gnulib?
I suspect the real problem is that I have happened upon a
configuration that just about works, but the tools I'm using weren't
intended to be used in quite this way.
Any guidance would be most welcome. Anybody overcome with a morbid
curiosity about this bizarre arrangement can get today's code from
ftp://alpha.gnu.org/gnu/findutils.
Thanks in advance for any help.
Regards,
James Youngman.