Re: Question about Makefile templates for gtk

On Sat, Nov 06, 1999 at 11:33:00PM -0500, Havoc Pennington wrote:
> is autogenerated from, then Makefile is generated
> from If gdk wasn't linked it would have to be a bug in one of
> the build tools, maybe libtool or automake; gdk is specified in
> Havoc

I'm not so sure.
Take a look at in the gtk subdirectory:

libgtk_la_LDFLAGS = @STRIP_BEGIN@ \
        -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)    \
        -release $(LT_RELEASE)                                  \
        -export-dynamic                                         \
        @GLIB_DEPLIBS@                                          \
        @x_ldflags@                                             \
        @x_libs@                                                \
        -lm                                                     \
#       $(top_builddir)/gdk/                              

Why is this line commented out?  I think this is what caused me loads of

I have a related question regarding the file in the glib
subdirectory, lines 796-807:

                if test "$ac_cv_func_getpwuid_r" = "yes"; then
                        AC_MSG_CHECKING(whether getpwuid_r is posix like)
                        # getpwuid_r(0, NULL, NULL, 0) is the signature on
                        # solaris, if that is not found, the prog below won't
                        # compile, then the posix signature is assumed as
                        # the default.
                        AC_TRY_COMPILE([#include <pwd.h>],
                                [getpwuid_r(0, NULL, NULL, 0);],

The AIX xlc compiler has a brain-dead behavior, where
if it finds a function with an incorrect number of arguments,
it will flag it as an error, will still return an errno of 0.

eg. "conftest.c", line 4.14: 1506-098 (E) Missing argument(s). 

Under AIX 4.3, the prototype for getpwuid_r() is the POSIX one.  But
when xlc compiles the non-POSIX prototype, getpwuid_r(0, NULL, NULL, 0),
it says: "Missing argument(s)", but still accepts the non-POSIX prototype.
The binary will then build, and then every subsequent call to the
libglib will coredump!

Can the above test be changed to check for the POSIX prototype?
That would be:  
int getpwuid_r(uid_t, struct passwd *, char *, size_t, struct passwd **);

If the test fails, then default to getpwuid_r(0, NULL, NULL, 0).

I have no experience with automake, so I could use some assistance.
I have been spending hours tracking these bugs down on AIX............


Craig Rodrigues          

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]