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

Xmblen is now defined in the latest XFree86 snapshot.

Expand Messages
  • Hisashi T Fujinaka
    This causes compile failures in mbyte.c. I m suggesting this patch: diff -Naur vim62.orig/src/mbyte.c vim62/src/mbyte.c ... +++ vim62/src/mbyte.c Fri Dec 12
    Message 1 of 8 , Dec 12, 2003
    • 0 Attachment
      This causes compile failures in mbyte.c. I'm suggesting this patch:

      diff -Naur vim62.orig/src/mbyte.c vim62/src/mbyte.c
      --- vim62.orig/src/mbyte.c Sat May 31 09:12:56 2003
      +++ vim62/src/mbyte.c Fri Dec 12 19:41:30 2003
      @@ -541,7 +541,9 @@
      # else
      char buf[MB_MAXBYTES];
      # ifdef X_LOCALE
      +# ifndef _Xmblen
      extern int _Xmblen __ARGS((char *, size_t));
      +# endif
      # ifndef mblen
      # define mblen _Xmblen
      # endif


      --
      Hisashi T Fujinaka - htodd@...
      BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte
    • Hisashi T Fujinaka
      ... And now that I think about it, that isn t right. -- Hisashi T Fujinaka - htodd@twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) +
      Message 2 of 8 , Dec 12, 2003
      • 0 Attachment
        On Fri, 12 Dec 2003, Hisashi T Fujinaka wrote:

        > This causes compile failures in mbyte.c. I'm suggesting this patch:
        >
        > diff -Naur vim62.orig/src/mbyte.c vim62/src/mbyte.c
        > --- vim62.orig/src/mbyte.c Sat May 31 09:12:56 2003
        > +++ vim62/src/mbyte.c Fri Dec 12 19:41:30 2003
        > @@ -541,7 +541,9 @@
        > # else
        > char buf[MB_MAXBYTES];
        > # ifdef X_LOCALE
        > +# ifndef _Xmblen
        > extern int _Xmblen __ARGS((char *, size_t));
        > +# endif
        > # ifndef mblen
        > # define mblen _Xmblen
        > # endif

        And now that I think about it, that isn't right.

        --
        Hisashi T Fujinaka - htodd@...
        BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte
      • Bram Moolenaar
        ... Perhaps the solution below works. The prototypes in osdef are filtered to remove the ones that exist in system header files. ... *************** ***
        Message 3 of 8 , Dec 23, 2003
        • 0 Attachment
          Hisashi T Fujinaka wrote:

          > > This causes compile failures in mbyte.c. I'm suggesting this patch:
          > >
          > > diff -Naur vim62.orig/src/mbyte.c vim62/src/mbyte.c
          > > --- vim62.orig/src/mbyte.c Sat May 31 09:12:56 2003
          > > +++ vim62/src/mbyte.c Fri Dec 12 19:41:30 2003
          > > @@ -541,7 +541,9 @@
          > > # else
          > > char buf[MB_MAXBYTES];
          > > # ifdef X_LOCALE
          > > +# ifndef _Xmblen
          > > extern int _Xmblen __ARGS((char *, size_t));
          > > +# endif
          > > # ifndef mblen
          > > # define mblen _Xmblen
          > > # endif
          >
          > And now that I think about it, that isn't right.

          Perhaps the solution below works. The prototypes in osdef are filtered
          to remove the ones that exist in system header files.

          *** ../vim-6.2.154/src/mbyte.c Sun Nov 9 20:20:26 2003
          --- src/mbyte.c Tue Dec 23 16:03:30 2003
          ***************
          *** 543,549 ****
          # else
          char buf[MB_MAXBYTES];
          # ifdef X_LOCALE
          - extern int _Xmblen __ARGS((char *, size_t));
          # ifndef mblen
          # define mblen _Xmblen
          # endif
          --- 547,552 ----
          *** ../vim-6.2.154/src/osdef2.h.in Sat Dec 15 22:24:12 2001
          --- src/osdef2.h.in Tue Dec 23 16:04:20 2003
          ***************
          *** 79,81 ****
          --- 79,83 ----
          #else
          extern char *mktemp __ARGS((char *));
          #endif
          +
          + extern int _Xmblen __ARGS((char *, size_t));


          --
          From "know your smileys":
          *<|:-) Santa Claus (Ho Ho Ho)

          /// 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 ///
        • Hisashi T Fujinaka
          ... I don t really know autoconf, but the patch didn t work. I think the problem is that it s an extern and not a define. CC= gcc -Iproto -DHAVE_CONFIG_H
          Message 4 of 8 , Dec 23, 2003
          • 0 Attachment
            On Tue, 23 Dec 2003, Bram Moolenaar wrote:

            > Hisashi T Fujinaka wrote:
            >
            > > > This causes compile failures in mbyte.c. I'm suggesting this patch:
            > > >
            > > > diff -Naur vim62.orig/src/mbyte.c vim62/src/mbyte.c
            > > > --- vim62.orig/src/mbyte.c Sat May 31 09:12:56 2003
            > > > +++ vim62/src/mbyte.c Fri Dec 12 19:41:30 2003
            > > > @@ -541,7 +541,9 @@
            > > > # else
            > > > char buf[MB_MAXBYTES];
            > > > # ifdef X_LOCALE
            > > > +# ifndef _Xmblen
            > > > extern int _Xmblen __ARGS((char *, size_t));
            > > > +# endif
            > > > # ifndef mblen
            > > > # define mblen _Xmblen
            > > > # endif
            > >
            > > And now that I think about it, that isn't right.
            >
            > Perhaps the solution below works. The prototypes in osdef are filtered
            > to remove the ones that exist in system header files.
            >
            > *** ../vim-6.2.154/src/mbyte.c Sun Nov 9 20:20:26 2003
            > --- src/mbyte.c Tue Dec 23 16:03:30 2003
            > ***************
            > *** 543,549 ****
            > # else
            > char buf[MB_MAXBYTES];
            > # ifdef X_LOCALE
            > - extern int _Xmblen __ARGS((char *, size_t));
            > # ifndef mblen
            > # define mblen _Xmblen
            > # endif
            > --- 547,552 ----
            > *** ../vim-6.2.154/src/osdef2.h.in Sat Dec 15 22:24:12 2001
            > --- src/osdef2.h.in Tue Dec 23 16:04:20 2003
            > ***************
            > *** 79,81 ****
            > --- 79,83 ----
            > #else
            > extern char *mktemp __ARGS((char *));
            > #endif
            > +
            > + extern int _Xmblen __ARGS((char *, size_t));
            >
            >
            >

            I don't really know autoconf, but the patch didn't work. I think the
            problem is that it's an extern and not a define.

            CC="gcc -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK -I/sw/include/gtk-2.0 -I/sw/lib/gtk-2.0/include -I/sw/include/atk-1.0 -I/sw/include/pango-1.0 -I/usr/X11R6/include -I/usr/X11R6/include/freetype2 -I/sw/include/glib-2.0 -I/sw/lib/glib-2.0/include -I/sw/include -g -O2 -I/usr/X11R6/include " srcdir=. sh ./osdef.sh
            gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK -I/sw/include/gtk-2.0 -I/sw/lib/gtk-2.0/include -I/sw/include/atk-1.0 -I/sw/include/pango-1.0 -I/usr/X11R6/include -I/usr/X11R6/include/freetype2 -I/sw/include/glib-2.0 -I/sw/lib/glib-2.0/include -I/sw/include -g -O2 -I/usr/X11R6/include -o objects/buffer.o buffer.c
            In file included from /usr/X11R6/include/X11/Intrinsic.h:56,
            from gui.h:34,
            from structs.h:73,
            from vim.h:1345,
            from buffer.c:29:
            /usr/X11R6/include/X11/Xlib.h:99: error: conflicting types for `_Xmblen'
            auto/osdef.h:118: error: previous declaration of `_Xmblen'
            make: *** [objects/buffer.o] Error 1
            ### execution of (cd failed, exit code 2
            Failed: compiling vim-6.2-24 failed


            --
            Hisashi T Fujinaka - htodd@...
            BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte
          • Bram Moolenaar
            ... What is line 56 of /usr/X11R6/include/X11/Intrinsic.h ? Thus: How is _Xmblen defined there. -- From know your smileys : *
            Message 5 of 8 , Dec 23, 2003
            • 0 Attachment
              Hisashi T Fujinaka wrote:

              > > Perhaps the solution below works. The prototypes in osdef are filtered
              > > to remove the ones that exist in system header files.
              > >
              > > *** ../vim-6.2.154/src/mbyte.c Sun Nov 9 20:20:26 2003
              > > --- src/mbyte.c Tue Dec 23 16:03:30 2003
              > > ***************
              > > *** 543,549 ****
              > > # else
              > > char buf[MB_MAXBYTES];
              > > # ifdef X_LOCALE
              > > - extern int _Xmblen __ARGS((char *, size_t));
              > > # ifndef mblen
              > > # define mblen _Xmblen
              > > # endif
              > > --- 547,552 ----
              > > *** ../vim-6.2.154/src/osdef2.h.in Sat Dec 15 22:24:12 2001
              > > --- src/osdef2.h.in Tue Dec 23 16:04:20 2003
              > > ***************
              > > *** 79,81 ****
              > > --- 79,83 ----
              > > #else
              > > extern char *mktemp __ARGS((char *));
              > > #endif
              > > +
              > > + extern int _Xmblen __ARGS((char *, size_t));
              > >
              > >
              > >
              >
              > I don't really know autoconf, but the patch didn't work. I think the
              > problem is that it's an extern and not a define.
              >
              > CC="gcc -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK -I/sw/include/gtk-2.0 -I/sw/lib/gtk-2.0/include -I/sw/include/atk-1.0 -I/sw/include/pango-1.0 -I/usr/X11R6/include -I/usr/X11R6/include/freetype2 -I/sw/include/glib-2.0 -I/sw/lib/glib-2.0/include -I/sw/include -g -O2 -I/usr/X11R6/include " srcdir=. sh ./osdef.sh
              > gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK -I/sw/include/gtk-2.0 -I/sw/lib/gtk-2.0/include -I/sw/include/atk-1.0 -I/sw/include/pango-1.0 -I/usr/X11R6/include -I/usr/X11R6/include/freetype2 -I/sw/include/glib-2.0 -I/sw/lib/glib-2.0/include -I/sw/include -g -O2 -I/usr/X11R6/include -o objects/buffer.o buffer.c
              > In file included from /usr/X11R6/include/X11/Intrinsic.h:56,
              > from gui.h:34,
              > from structs.h:73,
              > from vim.h:1345,
              > from buffer.c:29:
              > /usr/X11R6/include/X11/Xlib.h:99: error: conflicting types for `_Xmblen'
              > auto/osdef.h:118: error: previous declaration of `_Xmblen'
              > make: *** [objects/buffer.o] Error 1
              > ### execution of (cd failed, exit code 2
              > Failed: compiling vim-6.2-24 failed

              What is line 56 of /usr/X11R6/include/X11/Intrinsic.h ? Thus: How is
              _Xmblen defined there.

              --
              From "know your smileys":
              *<|:-) Santa Claus (Ho Ho Ho)

              /// 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 ///
            • Hisashi T Fujinaka
              ... This is in /usr/X11R6/include/X11/Xlib.h v1.6. Oddly, the date is 2001/02/09. 90 extern int 91 _Xmblen( 92 #ifdef ISC 93 char const *str, 94 size_t
              Message 6 of 8 , Dec 23, 2003
              • 0 Attachment
                On Tue, 23 Dec 2003, Bram Moolenaar wrote:

                >
                > Hisashi T Fujinaka wrote:
                >
                > > > Perhaps the solution below works. The prototypes in osdef are filtered
                > > > to remove the ones that exist in system header files.
                > > >
                > > > *** ../vim-6.2.154/src/mbyte.c Sun Nov 9 20:20:26 2003
                > > > --- src/mbyte.c Tue Dec 23 16:03:30 2003
                > > > ***************
                > > > *** 543,549 ****
                > > > # else
                > > > char buf[MB_MAXBYTES];
                > > > # ifdef X_LOCALE
                > > > - extern int _Xmblen __ARGS((char *, size_t));
                > > > # ifndef mblen
                > > > # define mblen _Xmblen
                > > > # endif
                > > > --- 547,552 ----
                > > > *** ../vim-6.2.154/src/osdef2.h.in Sat Dec 15 22:24:12 2001
                > > > --- src/osdef2.h.in Tue Dec 23 16:04:20 2003
                > > > ***************
                > > > *** 79,81 ****
                > > > --- 79,83 ----
                > > > #else
                > > > extern char *mktemp __ARGS((char *));
                > > > #endif
                > > > +
                > > > + extern int _Xmblen __ARGS((char *, size_t));
                > > >
                > > >
                > > >
                > >
                > > I don't really know autoconf, but the patch didn't work. I think the
                > > problem is that it's an extern and not a define.
                > >
                > > CC="gcc -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK -I/sw/include/gtk-2.0 -I/sw/lib/gtk-2.0/include -I/sw/include/atk-1.0 -I/sw/include/pango-1.0 -I/usr/X11R6/include -I/usr/X11R6/include/freetype2 -I/sw/include/glib-2.0 -I/sw/lib/glib-2.0/include -I/sw/include -g -O2 -I/usr/X11R6/include " srcdir=. sh ./osdef.sh
                > > gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK -I/sw/include/gtk-2.0 -I/sw/lib/gtk-2.0/include -I/sw/include/atk-1.0 -I/sw/include/pango-1.0 -I/usr/X11R6/include -I/usr/X11R6/include/freetype2 -I/sw/include/glib-2.0 -I/sw/lib/glib-2.0/include -I/sw/include -g -O2 -I/usr/X11R6/include -o objects/buffer.o buffer.c
                > > In file included from /usr/X11R6/include/X11/Intrinsic.h:56,
                > > from gui.h:34,
                > > from structs.h:73,
                > > from vim.h:1345,
                > > from buffer.c:29:
                > > /usr/X11R6/include/X11/Xlib.h:99: error: conflicting types for `_Xmblen'
                > > auto/osdef.h:118: error: previous declaration of `_Xmblen'
                > > make: *** [objects/buffer.o] Error 1
                > > ### execution of (cd failed, exit code 2
                > > Failed: compiling vim-6.2-24 failed
                >
                > What is line 56 of /usr/X11R6/include/X11/Intrinsic.h ? Thus: How is
                > _Xmblen defined there.

                This is in /usr/X11R6/include/X11/Xlib.h v1.6. Oddly, the date is 2001/02/09.

                90 extern int
                91 _Xmblen(
                92 #ifdef ISC
                93 char const *str,
                94 size_t len
                95 #else
                96 char *str,
                97 int len
                98 #endif
                99 );
                100




                --
                Hisashi T Fujinaka - htodd@...
                BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte
              • Bram Moolenaar
                ... Hmm, that doesn t look like a function prototype to the script that figures out the prototypes. We could make the prototype equal to this one, that should
                Message 7 of 8 , Dec 24, 2003
                • 0 Attachment
                  Hisashi T Fujinaka wrote:

                  > > > *** ../vim-6.2.154/src/mbyte.c Sun Nov 9 20:20:26 2003
                  > > > --- src/mbyte.c Tue Dec 23 16:03:30 2003
                  > > > ***************
                  > > > *** 543,549 ****
                  > > > # else
                  > > > char buf[MB_MAXBYTES];
                  > > > # ifdef X_LOCALE
                  > > > - extern int _Xmblen __ARGS((char *, size_t));
                  > > > # ifndef mblen
                  > > > # define mblen _Xmblen
                  > > > # endif
                  > > > --- 547,552 ----
                  > > > *** ../vim-6.2.154/src/osdef2.h.in Sat Dec 15 22:24:12 2001
                  > > > --- src/osdef2.h.in Tue Dec 23 16:04:20 2003
                  > > > ***************
                  > > > *** 79,81 ****
                  > > > --- 79,83 ----
                  > > > #else
                  > > > extern char *mktemp __ARGS((char *));
                  > > > #endif
                  > > > +
                  > > > + extern int _Xmblen __ARGS((char *, size_t));

                  > This is in /usr/X11R6/include/X11/Xlib.h v1.6. Oddly, the date is 2001/02/09.
                  >
                  > 90 extern int
                  > 91 _Xmblen(
                  > 92 #ifdef ISC
                  > 93 char const *str,
                  > 94 size_t len
                  > 95 #else
                  > 96 char *str,
                  > 97 int len
                  > 98 #endif
                  > 99 );
                  > 100

                  Hmm, that doesn't look like a function prototype to the script that
                  figures out the prototypes.

                  We could make the prototype equal to this one, that should stop the
                  warnings. I'm a bit worried about using "int" for the second argument
                  though... If ISC is not defined and sizeof(size_t) != sizeof(int) then
                  things will go wrong! I rather keep using "size_t" and risk the warning
                  message.

                  *** ../vim-6.2.154/src/osdef2.h.in Sat Dec 15 22:24:12 2001
                  --- src/osdef2.h.in Wed Dec 24 10:07:51 2003
                  ***************
                  *** 79,81 ****
                  --- 79,87 ----
                  #else
                  extern char *mktemp __ARGS((char *));
                  #endif
                  +
                  + #ifdef ISC
                  + extern int _Xmblen __ARGS((char const *, size_t));
                  + #else
                  + extern int _Xmblen __ARGS((char *, int));
                  + #endif



                  --
                  From "know your smileys":
                  *<|:-) Santa Claus (Ho Ho Ho)

                  /// 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 ///
                • Hisashi T Fujinaka
                  ... That works. Thanks! -- Hisashi T Fujinaka - htodd@twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte
                  Message 8 of 8 , Dec 24, 2003
                  • 0 Attachment
                    On Wed, 24 Dec 2003, Bram Moolenaar wrote:

                    >
                    > Hisashi T Fujinaka wrote:
                    >
                    > > > > *** ../vim-6.2.154/src/mbyte.c Sun Nov 9 20:20:26 2003
                    > > > > --- src/mbyte.c Tue Dec 23 16:03:30 2003
                    > > > > ***************
                    > > > > *** 543,549 ****
                    > > > > # else
                    > > > > char buf[MB_MAXBYTES];
                    > > > > # ifdef X_LOCALE
                    > > > > - extern int _Xmblen __ARGS((char *, size_t));
                    > > > > # ifndef mblen
                    > > > > # define mblen _Xmblen
                    > > > > # endif
                    > > > > --- 547,552 ----
                    > > > > *** ../vim-6.2.154/src/osdef2.h.in Sat Dec 15 22:24:12 2001
                    > > > > --- src/osdef2.h.in Tue Dec 23 16:04:20 2003
                    > > > > ***************
                    > > > > *** 79,81 ****
                    > > > > --- 79,83 ----
                    > > > > #else
                    > > > > extern char *mktemp __ARGS((char *));
                    > > > > #endif
                    > > > > +
                    > > > > + extern int _Xmblen __ARGS((char *, size_t));
                    >
                    > > This is in /usr/X11R6/include/X11/Xlib.h v1.6. Oddly, the date is 2001/02/09.
                    > >
                    > > 90 extern int
                    > > 91 _Xmblen(
                    > > 92 #ifdef ISC
                    > > 93 char const *str,
                    > > 94 size_t len
                    > > 95 #else
                    > > 96 char *str,
                    > > 97 int len
                    > > 98 #endif
                    > > 99 );
                    > > 100
                    >
                    > Hmm, that doesn't look like a function prototype to the script that
                    > figures out the prototypes.
                    >
                    > We could make the prototype equal to this one, that should stop the
                    > warnings. I'm a bit worried about using "int" for the second argument
                    > though... If ISC is not defined and sizeof(size_t) != sizeof(int) then
                    > things will go wrong! I rather keep using "size_t" and risk the warning
                    > message.
                    >
                    > *** ../vim-6.2.154/src/osdef2.h.in Sat Dec 15 22:24:12 2001
                    > --- src/osdef2.h.in Wed Dec 24 10:07:51 2003
                    > ***************
                    > *** 79,81 ****
                    > --- 79,87 ----
                    > #else
                    > extern char *mktemp __ARGS((char *));
                    > #endif
                    > +
                    > + #ifdef ISC
                    > + extern int _Xmblen __ARGS((char const *, size_t));
                    > + #else
                    > + extern int _Xmblen __ARGS((char *, int));
                    > + #endif

                    That works. Thanks!

                    --
                    Hisashi T Fujinaka - htodd@...
                    BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte
                  Your message has been successfully submitted and would be delivered to recipients shortly.