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

x86_64 support

Expand Messages
  • ZarathustraXYZ
    Hi Jon, I have made a patch for Microemacs (for me060909 and for me061013) that add support for x86_64 plattform. Without this patch Microemacs crash on 64bit
    Message 1 of 5 , Nov 3, 2006
    • 0 Attachment
      Hi Jon,
      I have made a patch for Microemacs (for me060909 and for me061013)
      that add support for x86_64 plattform. Without this patch Microemacs
      crash on 64bit hw.
      I can send you the rpm package for Fedora Core 5 and for Centos 4.x.

      Ciao

      Vincenzo



      diff -u me060909/src/bind.c me060909v/src/bind.c
      --- me060909/src/bind.c 2006-09-30 20:38:58.000000000 +0200
      +++ me060909v/src/bind.c 2006-11-03 21:46:41.000000000 +0100
      @@ -369,7 +369,7 @@
      ss = buf1 ;
      while((c1 = *ss++) != '\0')
      if((dd = (meUByte *) strchr((char *) charMaskFlags,c1)) !=
      NULL)
      - flags |= 1 << (((int) dd)- ((int) charMaskFlags)) ;
      + flags |= 1 << ((int) (dd - charMaskFlags)) ;
      mask2 = (flags & 0x00ff) ;
      mask1 = (flags & 0x0f00) >> 4 ;

      diff -u me060909/src/estruct.h me060909v/src/estruct.h
      --- me060909/src/estruct.h 2006-09-30 20:38:58.000000000 +0200
      +++ me060909v/src/estruct.h 2006-11-03 22:12:26.000000000 +0100
      @@ -884,10 +884,10 @@
      #define meHilightGetLookBackScheme(root) ((root)->tknSttOff)
      #define meHilightGetColumnHilight(root) ((meHilight *)
      ((root)->rclose))
      #define meHilightSetColumnHilight(root,v) ((root)->rclose =
      (meUByte *) (v))
      -#define meHilightGetFromColumn(root) ((int) ((node)->close))
      -#define meHilightSetFromColumn(root,v) ((node)->close = (meUByte
      *) (v))
      -#define meHilightGetToColumn(root) ((int) ((node)->rtoken))
      -#define meHilightSetToColumn(root,v) ((node)->rtoken =
      (meUByte *) (v))
      +#define meHilightGetFromColumn(root) ((meInt) ((root)->close))
      +#define meHilightSetFromColumn(root,v) ((root)->close = (meUByte
      *) (v))
      +#define meHilightGetToColumn(root) ((meInt)
      ((root)->rtoken))
      +#define meHilightSetToColumn(root,v) ((root)->rtoken =
      (meUByte *) (v))

      /* hilight token flags */
      #define HLTOKEN 0x0001
      diff -u me060909/src/file.c me060909v/src/file.c
      --- me060909/src/file.c 2006-09-30 20:38:58.000000000 +0200
      +++ me060909v/src/file.c 2006-11-03 21:59:09.000000000 +0100
      @@ -244,7 +244,7 @@
      else if(S_ISLNK(statbuf.st_mode))
      {
      meUByte lbuf[meBUF_SIZE_MAX], buf[meBUF_SIZE_MAX],
      *ss ;
      - int ii, jj ;
      + size_t ii, jj ;

      ii = meStrlen(file) ;
      meStrncpy(lbuf,file,ii) ;
      @@ -266,7 +266,7 @@
      else
      {
      ss++ ;
      - ii = ((int) ss) - ((int) lbuf) ;
      + ii = (size_t) (ss - lbuf) ;
      meStrcpy(ss,buf) ;
      ii += jj ;
      }
      diff -u me060909/src/hilight.c me060909v/src/hilight.c
      --- me060909/src/hilight.c 2006-09-30 20:38:58.000000000 +0200
      +++ me060909v/src/hilight.c 2006-11-03 22:52:48.000000000 +0100
      @@ -999,7 +999,7 @@
      type = (meUShort) meAtoi(buf) ;
      if(type & HLCOLUMN)
      {
      - int fmCol, toCol ;
      + meInt fmCol, toCol ;

      if((meGetString((meUByte *)"From",0,0,buf,meBUF_SIZE_MAX)
      <= 0) ||
      ((fmCol = (meUByte) meAtoi(buf)) < 0) ||
      diff -u me060909/src/input.c me060909v/src/input.c
      --- me060909/src/input.c 2006-09-30 20:38:58.000000000 +0200
      +++ me060909v/src/input.c 2006-11-03 22:01:42.000000000 +0100
      @@ -927,12 +927,12 @@
      ipos = ilen ;
      else
      {
      - ipos = (int) s1 - (int) buf + osdCol ;
      + ipos = ((int) (s1 - buf)) + osdCol ;
      if(ipos > ilen)
      ipos = ilen ;
      if(((s2 = meStrchr(s1,meCHAR_NL)) != NULL) &&
      - (((int) s2 - (int) buf) < ipos))
      - ipos = (int) s2 - (int) buf ;
      + (((int) (s2 - buf)) < ipos))
      + ipos = (int) (s2 - buf) ;
      }
      }
      else
      diff -u me060909/src/linux26.gmk me060909v/src/linux26.gmk
      --- me060909/src/linux26.gmk 2006-09-30 20:39:00.000000000 +0200
      +++ me060909v/src/linux26.gmk 2006-11-04 00:08:34.000000000 +0100
      @@ -53,7 +53,14 @@
      LDOPTIMISE =
      LDFLAGS =
      LIBS =
      +#
      +# The Xlib are located in /usr/X11R6/lib64 on some Linux
      distributions like RHEL4.* .
      +#
      +ifeq "$(strip $(shell uname -m))" "x86_64"
      +WINDOW_LIBS = $(MAKEWINLIBS) -L/usr/X11R6/lib64 -lX11
      +else
      WINDOW_LIBS = $(MAKEWINLIBS) -L/usr/X11R6/lib -lX11
      +endif
      #
      # figure out if termcap is avaiable or if ncurses should be tried
      to
      # accomplish this try to compile test.c and see if it can link
      termcap. For
      diff -u me060909/src/osd.c me060909v/src/osd.c
      --- me060909/src/osd.c 2006-09-30 20:38:59.000000000 +0200
      +++ me060909v/src/osd.c 2006-11-03 22:05:40.000000000 +0100
      @@ -1671,7 +1671,7 @@
      s1 = meStrchr(ss,meCHAR_NL) ;
      s2 = ss ;
      start = 0 ;
      - while((s1 != NULL) && ((len=((int) s1 - (int) s2)) < cpos))
      + while((s1 != NULL) && ((len=((int) (s1 - s2))) < cpos))
      {
      start++ ;
      s2 = s1+1 ;
      @@ -1700,7 +1700,7 @@
      while(--row >= 0)
      {
      s2 = meStrchr(s1,meCHAR_NL) ;
      - len = ((int) s2 - (int) s1) ;
      + len = (int) (s2 - s1) ;
      osdRenderEntryLine(txtp,s1,len,0,ww) ;
      txtp += totWidth ;
      s1 = s2 + 1 ;
      @@ -1709,7 +1709,7 @@
      if(s2 == NULL)
      len = -1 ;
      else
      - len = ((int) s2 - (int) s1) ;
      + len = (int) (s2 - s1) ;
      col = osdRenderEntryLine(txtp,s1,len,cpos,ww) ;
      while(--dd >= 0)
      {
      @@ -1723,7 +1723,7 @@
      if(s2 == NULL)
      len = -1 ;
      else
      - len = ((int) s2 - (int) s1) ;
      + len = (int) (s2 - s1) ;
      }
      osdRenderEntryLine(txtp,s1,len,0,ww) ;
      }
      diff -u me060909/src/registry.c me060909v/src/registry.c
      --- me060909/src/registry.c 2006-09-30 20:38:59.000000000 +0200
      +++ me060909v/src/registry.c 2006-11-03 22:06:51.000000000 +0100
      @@ -804,7 +804,7 @@
      {
      if((ss=meStrchr(meRegModeList,toLower(cc))) == NULL)
      return mlwrite(MWABORT|MWPAUSE,(meUByte *)"Illegal
      Registry mode [%c]",cc) ;
      - jj = (1<< (((int) ss)-((int) meRegModeList))) ;
      + jj = 1 << ((int) (ss - meRegModeList)) ;
      if(isUpper(cc))
      mode &= ~jj ;
      else
      diff -u me060909/src/spawn.c me060909v/src/spawn.c
      --- me060909/src/spawn.c 2006-09-30 20:38:59.000000000 +0200
      +++ me060909v/src/spawn.c 2006-11-03 22:09:02.000000000 +0100
      @@ -1344,6 +1344,13 @@
      /* allocatePty; Allocate a pty. We use the old BSD method of
      searching for a
      * pty, once we have aquired one then we look for the tty. Return
      the name of
      * the tty to the caller so that it may be opened. */
      +
      +#ifdef _LINUX26
      +extern char *ptsname(int) ;
      +extern int unlockpt(int) ;
      +extern int grantpt(int) ;
      +#endif /* _LINUX26 */
      +
      static int
      allocatePty(meUByte *ptyName)
      {
      @@ -1948,7 +1955,7 @@
      #ifdef _UNIX
      meWAIT_STATUS ws;
      meUByte *cl, *ss ;
      - int ll ;
      + size_t ll ;
      #else
      meUByte filnam[meBUF_SIZE_MAX] ;

      @@ -2027,7 +2034,7 @@
      if((ss=meStrchr(comStr,'|')) == NULL)
      ss = comStr + ll ;
      else
      - ll = (int) ss - (int) comStr ;
      + ll = (size_t) (ss - comStr) ;

      meStrncpy(cl,comStr,ll) ;
      cl[ll] = '\0' ;
      diff -u me060909/src/undo.c me060909v/src/undo.c
      --- me060909/src/undo.c 2006-09-30 20:38:59.000000000 +0200
      +++ me060909v/src/undo.c 2006-11-03 22:09:43.000000000 +0100
      @@ -504,7 +504,7 @@
      }
      for(;;)
      {
      - int count, cont ;
      + meInt count, cont ;
      if((cun == NULL) || ((n <= 0)
      && !meModeTest(frameCur->bufferCur->mode,MDEDIT)))
      break ;
      if(bufferSetEdit() <= 0) /* Check we can
      change the buffer */
      Common subdirectories: me060909/src/win32s and me060909v/src/win32s
    • Patrick Das Gupta
      Hi Vincenzo, ... This is strange. Yesterday I ve build me on AMD64 (Debian Etch) and had no crashes thereafter. Patrick patrick:~$ me -V MicroEmacs 06 - Date
      Message 2 of 5 , Nov 4, 2006
      • 0 Attachment
        Hi Vincenzo,

        > I have made a patch for Microemacs (for me060909 and for me061013)
        > that add support for x86_64 plattform. Without this patch Microemacs
        > crash on 64bit hw.

        This is strange. Yesterday I've build me on AMD64 (Debian Etch) and had no
        crashes thereafter.

        Patrick

        patrick:~$ me -V
        MicroEmacs 06 - Date 2006/09/09 - linux

        patrick:~$ file `which me`
        /usr/bin/me: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for
        GNU/Linux 2.6.0, dynamically linked (uses shared libs), for GNU/Linux 2.6.0,
        stripped

        patrick:~$ ldd `which me`
        libncurses.so.5 => /lib/libncurses.so.5 (0x00002b4ac557d000)
        libX11.so.6 => /usr/lib/libX11.so.6 (0x00002b4ac56d8000)
        libc.so.6 => /lib/libc.so.6 (0x00002b4ac58e2000)
        libdl.so.2 => /lib/libdl.so.2 (0x00002b4ac5b1e000)
        libXau.so.6 => /usr/lib/libXau.so.6 (0x00002b4ac5c21000)
        libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x00002b4ac5d24000)
        /lib64/ld-linux-x86-64.so.2 (0x00002b4ac5465000)
      • Jon Green
        ... Hi Vincenzo, Many thanks for this. Looking through your changes it certainly makes sense especially with some of the horrible pointer casting that is going
        Message 3 of 5 , Nov 4, 2006
        • 0 Attachment
          ZarathustraXYZ wrote:
          > Hi Jon,
          > I have made a patch for Microemacs (for me060909 and for me061013)
          > that add support for x86_64 plattform. Without this patch Microemacs
          > crash on 64bit hw.
          > I can send you the rpm package for Fedora Core 5 and for Centos 4.x.
          >
          > Ciao
          >
          > Vincenzo

          Hi Vincenzo,

          Many thanks for this. Looking through your changes it certainly makes
          sense especially with some of the horrible pointer casting that is going
          on here.

          Can you send the packages directly to my mail address and ideally with
          the modified source so that I can make sure that all of the changes are
          captured and that it works on the existing platforms. I think there are
          now enough changes to warrant re-releasing the source as a new bundle
          rather than introducing some more patches.

          Regards
          Jon.
        • ZarathustraXYZ
          Hi Patrick, a crash appears (for example) when you try to exec external command like grep. I have submitted patch like this some month ago, the problem are the
          Message 4 of 5 , Nov 4, 2006
          • 0 Attachment
            Hi Patrick,
            a crash appears (for example) when you try to exec external command
            like grep. I have submitted patch like this some month ago, the
            problem are the same on x86_64 and on Alpha (I have tested this
            patch with gcc 2.x, 3.x and 4.x).


            Ciao.

            Vincenzo


            --- In jasspa@yahoogroups.com, Patrick Das Gupta <patrick@...>
            wrote:
            >
            > Hi Vincenzo,
            >
            > > I have made a patch for Microemacs (for me060909 and for
            me061013)
            > > that add support for x86_64 plattform. Without this patch
            Microemacs
            > > crash on 64bit hw.
            >
            > This is strange. Yesterday I've build me on AMD64 (Debian Etch)
            and had no
            > crashes thereafter.
            >
            > Patrick
            >
            > patrick:~$ me -V
            > MicroEmacs 06 - Date 2006/09/09 - linux
            >
            > patrick:~$ file `which me`
            > /usr/bin/me: ELF 64-bit LSB executable, AMD x86-64, version 1
            (SYSV), for
            > GNU/Linux 2.6.0, dynamically linked (uses shared libs), for
            GNU/Linux 2.6.0,
            > stripped
            >
            > patrick:~$ ldd `which me`
            > libncurses.so.5 => /lib/libncurses.so.5
            (0x00002b4ac557d000)
            > libX11.so.6 => /usr/lib/libX11.so.6 (0x00002b4ac56d8000)
            > libc.so.6 => /lib/libc.so.6 (0x00002b4ac58e2000)
            > libdl.so.2 => /lib/libdl.so.2 (0x00002b4ac5b1e000)
            > libXau.so.6 => /usr/lib/libXau.so.6 (0x00002b4ac5c21000)
            > libXdmcp.so.6 => /usr/lib/libXdmcp.so.6
            (0x00002b4ac5d24000)
            > /lib64/ld-linux-x86-64.so.2 (0x00002b4ac5465000)
            >
          • ZarathustraXYZ
            Hi Jon, I send to you a mail asap. Thanks Vincenzo ... me061013) ... Microemacs ... 4.x. ... makes ... going ... with ... changes are ... there are ... bundle
            Message 5 of 5 , Nov 4, 2006
            • 0 Attachment
              Hi Jon,
              I send to you a mail asap.
              Thanks

              Vincenzo



              --- In jasspa@yahoogroups.com, Jon Green <jon@...> wrote:
              >
              > ZarathustraXYZ wrote:
              > > Hi Jon,
              > > I have made a patch for Microemacs (for me060909 and for
              me061013)
              > > that add support for x86_64 plattform. Without this patch
              Microemacs
              > > crash on 64bit hw.
              > > I can send you the rpm package for Fedora Core 5 and for Centos
              4.x.
              > >
              > > Ciao
              > >
              > > Vincenzo
              >
              > Hi Vincenzo,
              >
              > Many thanks for this. Looking through your changes it certainly
              makes
              > sense especially with some of the horrible pointer casting that is
              going
              > on here.
              >
              > Can you send the packages directly to my mail address and ideally
              with
              > the modified source so that I can make sure that all of the
              changes are
              > captured and that it works on the existing platforms. I think
              there are
              > now enough changes to warrant re-releasing the source as a new
              bundle
              > rather than introducing some more patches.
              >
              > Regards
              > Jon.
              >
            Your message has been successfully submitted and would be delivered to recipients shortly.