unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Bauer, Christoph" <Christoph.Bauer@lms-gmbh.de>
Cc: cyd@stupidchicken.com, emacs-devel@gnu.org
Subject: AW: [Christoph.Bauer@lms-gmbh.de: HP-UX: link error]
Date: Wed, 22 Mar 2006 13:00:24 +0100	[thread overview]
Message-ID: <26EB47FDD566A7469FC862DAF373792FE20E22@kaiserslautern1.lmsintl.com> (raw)

>     cc fails with this error in lib-src:
> 
>     cc -DHAVE_CONFIG_H    -I. -I../src -
> I/T/tools/unix/build/emacs/emacs/lib-src
>     -I/T/tools/unix/build/emacs/emacs/lib-src/../src   -g
>     /T/tools/unix/build/emacs/emacs/lib-src/fakemail.c -l:libdld.sl      -
> o
>     fakemail
>     cpp: "/T/tools/unix/build/emacs/emacs/lib-src/../src/s/hpux9.h", line
> 63:
>     warning 2001: Redefinition of macro HAVE_PSTAT_GETDYNAMIC.
>     cc: "/usr/include/sys/_mbstate_t.h", line 11: error 1000: Unexpected
> symbol:
>     "int".
>     cc: "/usr/include/stdlib.h", line 117: warning 573: Parameter list is
>     inconsistent for "getenv".
> 
> Would you like to debug it and send a patch we can try?

I don't have a complete fix, but a first explanation for the message.

src/config.h contains

/* Define to 1 if <wchar.h> declares mbstate_t. */
/* #undef HAVE_MBSTATE_T */

#define HAVE_SYS__MBSTATE_T_H 1

#define mbstate_t int

/* End of config.h */

But <sys/_mbstate_t.h> defines mbstate_t as a struct. This leads to
the syntax error above. src/config.h from the gcc-build doesn't 
define mbstate_t. configure.in:AC_TYPE_MSTATE_T
generates a test program, which includes only <wchar.h>.

Here is a patch for configure.in with a workaround:

diff -r1.406 configure.in
2695a2696,2700
> echo "$ac_cv_header_sys__mbstate_t_h"
> if test "$ac_cv_header_sys__mbstate_t_h" = "yes"; then
>    ac_cv_type_mbstate_t="yes"
> fi
>

There is a second problem, which is located in src/strftime.c.

#ifdef _LIBC
...
# define MULTIBYTE_IS_FORMAT_SAFE 1
...
#endif 
...

#define DO_MULTIBYTE (HAVE_MBLEN && ! MULTIBYTE_IS_FORMAT_SAFE)

#if DO_MULTIBYTE
# if HAVE_MBRLEN
#  include <wchar.h>
#   ifdef HAVE_SYS__MBSTATE_H	/* previously tested __hpux */
#     include <sys/_mbstate_t.h>
#   endif
#  if !defined (mbsinit) && !defined (HAVE_MBSINIT)
#   define mbsinit(ps) 1
#  endif /* !defined (mbsinit) && !defined (HAVE_MBSINIT) */

So <sys/_mbstate_t.h> is not included (_LIBC in not defined).
When I define MULTIBYTE_IS_FORMAT_SAFE in config.h, the build
succeeds. 

             reply	other threads:[~2006-03-22 12:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-22 12:00 Bauer, Christoph [this message]
2006-03-22 20:48 ` AW: [Christoph.Bauer@lms-gmbh.de: HP-UX: link error] Richard Stallman
  -- strict thread matches above, loose matches on Subject: below --
2006-03-24  8:26 Christoph Bauer
2006-03-24 23:26 ` Richard Stallman
2006-03-22 10:57 Bauer, Christoph
2006-03-22 14:13 ` Ken Raeburn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=26EB47FDD566A7469FC862DAF373792FE20E22@kaiserslautern1.lmsintl.com \
    --to=christoph.bauer@lms-gmbh.de \
    --cc=cyd@stupidchicken.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).