Loading ...
Sorry, an error occurred while loading the content.

Re: Bugreport

Expand Messages
  • Nam SungHyun
    ... The size_t for this line should be changed to int (like Xlib.h). I use gcc-3.3 and it fixes the compile problem. ... regards, namsh
    Message 1 of 8 , Jan 3, 2004
    • 0 Attachment
      On Sat, 03 Jan 2004 12:50:01 +0100, Bram Moolenaar wrote:
      >
      > Ali Akcaagac wrote:
      >
      > > A Happy new Year to you all. I got a little bugreport which looks like
      > > this (attachment). I was able to solve this by commenting some lines
      > > within the code. Would be cool to have that fixed. System Linux, XFree86
      > > 4.4.0 RC2, Lunix 2.6.0 :)
      > >
      > >
      > > Starting make in the src directory.
      > > If there are problems, cd to the src directory and run make there
      > > cd src && make first
      > > make[1]: Entering directory `/tmp/vim62/src'
      > > gcc -c -I. -Iproto -DHAVE_CONFIG_H -g -O2 -I/usr/X11R6/include -o objects/buffer.o buffer.c
      > > In file included from /usr/X11R6/include/X11/Intrinsic.h:56,
      > > from structs.h:76,
      > > from vim.h:1351,
      > > from buffer.c:29:
      > > /usr/X11R6/include/X11/Xlib.h:103: error: conflicting types for `_Xmblen'
      > > auto/osdef.h:124: error: previous declaration of `_Xmblen'
      > > make[1]: *** [objects/buffer.o] Error 1
      > > make[1]: Leaving directory `/tmp/vim62/src'
      > > make: *** [first] Error 2
      >
      > Please show me the lines in Xlib.h that define _Xmblen(). Also find out
      > whether ISC is defined or not.
      >
      > osdef2.h.in currently contains:
      >
      > #ifdef ISC
      > extern int _Xmblen __ARGS((char const *, size_t));
      > #else
      > extern int _Xmblen __ARGS((char *, size_t));

      The 'size_t' for this line should be changed to 'int' (like Xlib.h).
      I use gcc-3.3 and it fixes the compile problem.

      > #endif
      >
      > I can't guess how to change this to make it work on this system.

      regards,
      namsh
    • Bram Moolenaar
      ... Is that for the first or the second prototype? The reason I used size_t instead of int , is that this was the original prototype that worked well for
      Message 2 of 8 , Jan 4, 2004
      • 0 Attachment
        Nam SungHyun wrote:

        > On Sat, 03 Jan 2004 12:50:01 +0100, Bram Moolenaar wrote:
        > >
        > > Ali Akcaagac wrote:
        > >
        > > > A Happy new Year to you all. I got a little bugreport which looks like
        > > > this (attachment). I was able to solve this by commenting some lines
        > > > within the code. Would be cool to have that fixed. System Linux, XFree86
        > > > 4.4.0 RC2, Lunix 2.6.0 :)
        > > >
        > > >
        > > > Starting make in the src directory.
        > > > If there are problems, cd to the src directory and run make there
        > > > cd src && make first
        > > > make[1]: Entering directory `/tmp/vim62/src'
        > > > gcc -c -I. -Iproto -DHAVE_CONFIG_H -g -O2 -I/usr/X11R6/include -o objects/buffer.o buffer.c
        > > > In file included from /usr/X11R6/include/X11/Intrinsic.h:56,
        > > > from structs.h:76,
        > > > from vim.h:1351,
        > > > from buffer.c:29:
        > > > /usr/X11R6/include/X11/Xlib.h:103: error: conflicting types for `_Xmblen'
        > > > auto/osdef.h:124: error: previous declaration of `_Xmblen'
        > > > make[1]: *** [objects/buffer.o] Error 1
        > > > make[1]: Leaving directory `/tmp/vim62/src'
        > > > make: *** [first] Error 2
        > >
        > > Please show me the lines in Xlib.h that define _Xmblen(). Also find out
        > > whether ISC is defined or not.
        > >
        > > osdef2.h.in currently contains:
        > >
        > > #ifdef ISC
        > > extern int _Xmblen __ARGS((char const *, size_t));
        > > #else
        > > extern int _Xmblen __ARGS((char *, size_t));
        >
        > The 'size_t' for this line should be changed to 'int' (like Xlib.h).
        > I use gcc-3.3 and it fixes the compile problem.

        Is that for the first or the second prototype?

        The reason I used "size_t" instead of "int", is that this was the
        original prototype that worked well for quite a while. Mostly
        sizeof(int) and sizeof(size_t) are equal, but it might cause trouble on
        64 bit machines.

        Is there any preprocessor symbol we could use to know what is the
        correct argument?

        I can't think of an autoconf check for this...

        --
        I'm writing a book. I've got the page numbers done.

        /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
        /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\
        \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
        \\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html ///
      • Nam SungHyun
        ... I believe you ve already seen this prototype before you made a patch. extern int _Xmblen( #ifdef ISC char const *str, size_t len #else char *str, int len
        Message 3 of 8 , Jan 4, 2004
        • 0 Attachment
          On Sun, 04 Jan 2004 12:52:23 +0100, Bram Moolenaar wrote:
          >
          > Nam SungHyun wrote:
          >
          > > On Sat, 03 Jan 2004 12:50:01 +0100, Bram Moolenaar wrote:
          > > >
          > > > Ali Akcaagac wrote:
          > > >
          > > > > A Happy new Year to you all. I got a little bugreport which looks like
          > > > > this (attachment). I was able to solve this by commenting some lines
          > > > > within the code. Would be cool to have that fixed. System Linux, XFree86
          > > > > 4.4.0 RC2, Lunix 2.6.0 :)
          > > > >
          > > > >
          > > > > Starting make in the src directory.
          > > > > If there are problems, cd to the src directory and run make there
          > > > > cd src && make first
          > > > > make[1]: Entering directory `/tmp/vim62/src'
          > > > > gcc -c -I. -Iproto -DHAVE_CONFIG_H -g -O2 -I/usr/X11R6/include -o objects/buffer.o buffer.c
          > > > > In file included from /usr/X11R6/include/X11/Intrinsic.h:56,
          > > > > from structs.h:76,
          > > > > from vim.h:1351,
          > > > > from buffer.c:29:
          > > > > /usr/X11R6/include/X11/Xlib.h:103: error: conflicting types for `_Xmblen'
          > > > > auto/osdef.h:124: error: previous declaration of `_Xmblen'
          > > > > make[1]: *** [objects/buffer.o] Error 1
          > > > > make[1]: Leaving directory `/tmp/vim62/src'
          > > > > make: *** [first] Error 2
          > > >
          > > > Please show me the lines in Xlib.h that define _Xmblen(). Also find out
          > > > whether ISC is defined or not.
          > > >
          > > > osdef2.h.in currently contains:
          > > >
          > > > #ifdef ISC
          > > > extern int _Xmblen __ARGS((char const *, size_t));
          > > > #else
          > > > extern int _Xmblen __ARGS((char *, size_t));
          > >
          > > The 'size_t' for this line should be changed to 'int' (like Xlib.h).
          > > I use gcc-3.3 and it fixes the compile problem.
          >
          > Is that for the first or the second prototype?

          I believe you've already seen this prototype before you made a
          patch.

          extern int
          _Xmblen(
          #ifdef ISC
          char const *str,
          size_t len
          #else
          char *str,
          int len
          #endif
          );

          Regards,
          namsh
        • Bram Moolenaar
          ... [...] I now discovered that the prototype for _Xmblen isn t found at all, because the X11 header files are not loaded in osdef.sh. Please try this fix (it
          Message 4 of 8 , Jan 5, 2004
          • 0 Attachment
            Nam SungHyun wrote:

            > > > On Sat, 03 Jan 2004 12:50:01 +0100, Bram Moolenaar wrote:
            > > > >
            > > > > Ali Akcaagac wrote:
            > > > >
            > > > > > A Happy new Year to you all. I got a little bugreport which looks like
            > > > > > this (attachment). I was able to solve this by commenting some lines
            > > > > > within the code. Would be cool to have that fixed. System Linux, XFree86
            > > > > > 4.4.0 RC2, Lunix 2.6.0 :)
            > > > > >
            > > > > >
            > > > > > Starting make in the src directory.
            > > > > > If there are problems, cd to the src directory and run make there
            > > > > > cd src && make first
            > > > > > make[1]: Entering directory `/tmp/vim62/src'
            > > > > > gcc -c -I. -Iproto -DHAVE_CONFIG_H -g -O2 -I/usr/X11R6/include -o objects/buffer.o buffer.c
            > > > > > In file included from /usr/X11R6/include/X11/Intrinsic.h:56,
            > > > > > from structs.h:76,
            > > > > > from vim.h:1351,
            > > > > > from buffer.c:29:
            > > > > > /usr/X11R6/include/X11/Xlib.h:103: error: conflicting types for `_Xmblen'
            > > > > > auto/osdef.h:124: error: previous declaration of `_Xmblen'
            > > > > > make[1]: *** [objects/buffer.o] Error 1
            > > > > > make[1]: Leaving directory `/tmp/vim62/src'
            > > > > > make: *** [first] Error 2

            [...]

            I now discovered that the prototype for _Xmblen isn't found at all,
            because the X11 header files are not loaded in osdef.sh.

            Please try this fix (it works for me):

            *** ../vim-6.2.170/src/osdef2.h.in Mon Dec 29 21:17:44 2003
            --- src/osdef2.h.in Mon Jan 5 10:03:41 2004
            ***************
            *** 83,87 ****
            --- 83,88 ----
            #ifdef ISC
            extern int _Xmblen __ARGS((char const *, size_t));
            #else
            + /* This is different from the header but matches mblen() */
            extern int _Xmblen __ARGS((char *, size_t));
            #endif
            *** ../vim-6.2.170/src/osdef.sh Thu Jul 24 22:09:03 2003
            --- src/osdef.sh Mon Jan 5 10:05:41 2004
            ***************
            *** 41,46 ****
            --- 41,50 ----
            # include <sys/types.h>
            # include <sys/statfs.h> /* only for memfile.c */
            #endif
            +
            + #ifdef HAVE_X11
            + # include <X11/Intrinsic.h>
            + #endif
            EOF

            # Mac uses precompiled headers, but we need real headers here.


            --
            In a world without fences, who needs Gates and Windows?

            /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
            /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\
            \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
            \\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html ///
          Your message has been successfully submitted and would be delivered to recipients shortly.