zsh-workers
 help / color / mirror / code / Atom feed
* zsh on QNX4
@ 1999-02-19 14:15 Philippe Robin
  1999-02-22  9:21 ` Peter Stephenson
  0 siblings, 1 reply; 2+ messages in thread
From: Philippe Robin @ 1999-02-19 14:15 UTC (permalink / raw)
  To: zsh-workers

Hi ,

I got zsh running on QNX 4.25 operating system. I have included the few
modifications I did to get it to work at the end of this mail if you want to
incorporate this...

Feel free to contact me if you have any queries.

Thanks,

Philippe
---------------
Philippe Robin
e-mail: probin@qnx.com

############################
zsh.h:

#define GETPGRP_VOID

#include <config.h>
#include <system.h>

#define QNX
#undef OXTABS

---------
zle_refresh.c line 231

#ifdef QNX
    oxtabs = 0;
#else
    oxtabs = ((SGTTYFLAG & SGTABTYPE) == SGTABTYPE);
#endif

----------
zle_main.c line 103 (XTABS and ONLCR flags not defined on QNX)

#  ifdef OXTABS
    ti.tio.c_oflag &= ~OXTABS;
#  else
//    ti.tio.c_oflag &= ~XTABS;
#  endif
# endif
//    ti.tio.c_oflag |= ONLCR;

--------------
compat.c line 109

#ifndef QNX
char *
zgetcwd(void)
{
    return getcwd(NULL, 0);
}
#else
char *
zgetcwd(void)
{
....
}
#endif
-----------------
halloc() is already defined on QNX with the following prototype:
void __huge *halloc( long int numb, size_t size );

so the halloc() function must either be renamed in files where it
is used so that it doesn't clash with the system one or alternatively
use the system function.

The files concerned are:
mem.c, subst.c, utils.c, zle_hist.c, zle_misc.c, zle_tricky.c,
zle_utils.c, zle_word.c




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: zsh on QNX4
  1999-02-19 14:15 zsh on QNX4 Philippe Robin
@ 1999-02-22  9:21 ` Peter Stephenson
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Stephenson @ 1999-02-22  9:21 UTC (permalink / raw)
  To: probin, Zsh hackers list

"Philippe Robin" wrote:
> I got zsh running on QNX 4.25 operating system. I have included the few
> modifications I did to get it to work at the end of this mail if you want to
> incorporate this...

This looks pretty easy to include, but it ought to be decided
automatically.  It's possible to put ad hoc code in configure if necessary,
though if there were some predefined preprocessor symbol that would be
better.

> #define GETPGRP_VOID

Does the configure test for this not work?  You should get something like

checking whether getpgrp takes no argument... yes

and config.log should say why it failed, if it did.

> #ifdef QNX
>     oxtabs = 0;
> #else
>     oxtabs = ((SGTTYFLAG & SGTABTYPE) == SGTABTYPE);
> #endif

Is it enough to test
#if defined(SGTTYFLAG) && defined(SGTABTYPE)
?

> #  ifdef OXTABS
>     ti.tio.c_oflag &= ~OXTABS;
> #  else
> //    ti.tio.c_oflag &= ~XTABS;
> #  endif
> # endif
> //    ti.tio.c_oflag |= ONLCR;

Likewise, can we just test directly for these flags being defined?

> #ifndef QNX
> char *
> zgetcwd(void)
> {
>     return getcwd(NULL, 0);
> }
> #else

This looks like something we need a preprocessor definition for.  If there
really isn't one (_QNX_, _QNX, __QNX__, ...?) the system as printed out
when configure starts should be enough to work on.

> halloc() is already defined on QNX with the following prototype:

That's an annoyance, but we can easily rename it to zhalloc().

-- 
Peter Stephenson <pws@ibmth.df.unipi.it>       Tel: +39 050 844536
WWW:  http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1999-02-22  9:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-02-19 14:15 zsh on QNX4 Philippe Robin
1999-02-22  9:21 ` Peter Stephenson

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

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 NNTP newsgroup(s).