[Alpine-info] QNX6 patches

Sean Boudreau seanb at qnx.com
Fri Apr 17 08:21:03 PDT 2009



Hi:

Here are some QNX6 patches against alpine-2.00.

Regards,

-seanb
-------------- next part --------------
--- imap/src/osdep/unix/os_nto.c.orig 2008-06-04 13:18:34.000000000 -0500
+++ imap/src/osdep/unix/os_nto.c
@@ -56,21 +56,12 @@ extern int errno; /* just in case */
#include "gethstid.c"
#include "flocksim.c"
#include "utime.c"
-
-/* QNX local readdir()
- * Accepts: directory structure
- * Returns: direct struct or NIL if failed
- */

-#undef readdir

-struct direct *Readdir (DIR *dirp)
+int
+ustat(dev_t dev, struct ustat *ub)
{
- static struct direct dc;
- struct dirent *de = readdir (dirp);
- if (!de) return NIL; /* end of data */
- dc.d_fileno = 0; /* could get from de->stat.st_ino */
- dc.d_namlen = strlen (strcpy (dc.d_name,de->d_name));
- dc.d_reclen = sizeof (dc);
- return &dc;
+ /* fstatvfs() should have been tried before this */
+ errno = ENOSYS;
+ return -1;
}
$NetBSD$

--- configure.orig 2008-08-21 20:41:04.000000000 -0500
+++ configure
@@ -33194,6 +33194,12 @@ cat >>confdefs.h <<\_ACEOF
_ACEOF

;;
+ *-*-nto-qnx*)
+ systype="QNX"
+ alpine_path_delim="/"
+ alpine_mode_readonly="(0600)"
+ alpine_c_client_target="nto"
+ ;;
*)
{ { echo "$as_me:$LINENO: error: Unrecognized system: $host" >&5
echo "$as_me: error: Unrecognized system: $host" >&2;}
--- imap/src/osdep/unix/os_nto.h.orig 2008-06-04 13:18:34.000000000 -0500
+++ imap/src/osdep/unix/os_nto.h
@@ -36,14 +36,13 @@
#include <sys/types.h>
#include <time.h>
#include <utime.h>
+#include <ustat.h>


-/* QNX gets these wrong */
+/* QNX gets this wrong */

#define setpgrp setpgid
-#define readdir Readdir
#define FNDELAY O_NONBLOCK
-#define d_ino d_fileno


/* Different names, equivalent things in BSD and SysV */
@@ -63,7 +62,6 @@
int portable_utime (char *file,time_t timep[2]);

long gethostid (void);
-struct direct *Readdir (DIR *dirp);
typedef int (*select_t) (struct direct *name);
typedef int (*compar_t) (void *d1,void *d2);

--- imap/src/osdep/unix/Makefile.orig 2008-06-04 13:18:34.000000000 -0500
+++ imap/src/osdep/unix/Makefile
@@ -550,7 +550,7 @@ nto: # QNX Neutrino RTP
SPOOLDIR=/var/spool \
ACTIVEFILE=/var/lib/news/active \
RSHPATH=/usr/bin/rsh \
- BASECFLAGS="-g -O"
+ BASECFLAGS="$(GCCCFLAGS)"

nxt: # NEXTSTEP
$(BUILD) `$(CAT) SPECIALS` OS=$@ \
--- pith/charconv/utf8.c.orig 2008-04-02 17:09:20.000000000 -0500
+++ pith/charconv/utf8.c
@@ -89,7 +89,7 @@ wcellwidth(UCS ucs)
return((w & U4W_ERROR) ? -1 : w);
}
}
-#ifndef _WINDOWS
+#ifdef HAVE_WCWIDTH
else
return(wcwidth((wchar_t) ucs));
#else


More information about the Alpine-info mailing list