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

Re: Getting vim to run on LynxOS

Expand Messages
  • lorenz.hahn@gmx.de
    Hi. ... Done and verified. It works! :-) ... Jeah. I see. Ok, it s handled correct. ... Obviously you are right: #ifdef __Lynx__ is the better implementation.
    Message 1 of 8 , Jun 26, 2000
    • 0 Attachment
      Hi.

      > > But sadly, this leads to this compiler output:
      > [...]
      > > which leads to unresolved symbols. Calling this line with
      > > -lX11 moved to the end does the job!
      >
      > Mostly you can add a library a second time to solve problems like this.
      > Perhaps by appending "-lX11" to the new lines in the Makefile?
      Done and verified. It works! :-)

      > > We may use __Lynx__ to solve this topic, but one thougth to
      > > OpenPTY in general.
      > >
      > > When I've got it right this function is intended to provide
      > > the filehandle of the controlling tty, isn't it? What is the
      > > parameter for?
      >
      > You mean the "ttyn" parameter"? It's for returning the name of the tty,
      > so
      > that the slave side can be opened.
      Jeah. I see. Ok, it's handled correct.

      > Unfortunatly, this breaks when __Lynx__ is not defined. Isn't it
      > possible to use "#ifdef __Lynx__"? I don't completely understand your
      > remark. I find it unlikely that we need:
      > #ifdef __Lynx__
      > # if __Lynx__
      Obviously you are right: #ifdef __Lynx__ is the better implementation.
      This is the solution I've chosen while generating the appended patch
      against vim 5.7.1.

      Since ttyname() is a posix compliant function, one can use this
      implementation of OpenPTY() on any other posix conform system. With an
      appropriate test we could use HAVE_TTYNAME instead of __Lynx__.

      Here is a little test proggy which can be used to determine if ttyname()
      can be used and linked to a program (...exists) . The output and result
      value of the created binary can be used inside a script to verify the path

      of the controlling tty (...is usable):
      ----------------------------------- 8< ----------------------------------
      #include <stdio.h>

      int
      main( void ){
      char *TTYName;

      TTYName = (char *) ttyname(0);

      if( !TTYName || ( *TTYName == 0 ) ){
      fprintf( stderr ,"Can't determine controlling tty!\n" );
      return 1;
      }

      printf("%s", TTYName );
      return 0;
      }

      ----------------------------------- >8 ----------------------------------

      Best Regards,
      Lorenz.

      --
      Sent through GMX FreeMail - http://www.gmx.net
    Your message has been successfully submitted and would be delivered to recipients shortly.