Add function init_backup_dir() to handle relative paths
correctly, use get_full_path() to get the canonical pathname,
and use tail() to get the filename if get_full_path() fails.
+ - Port to the Tandem NonStop Kernel (nsr-tandem-nsk). (Tom
+ Bates; minor tweaks by DLR)
- files.c:
add_open_files()
- Make the saving of marked status in open_files->file_flags
* *
**************************************************************************/
+#ifdef __TANDEM
+/* Tandem NonStop Kernel */
+#include <floss.h>
+#endif
+
#include "config.h"
#include <stdio.h>
#if !defined(ENABLE_NANORC) && defined(DISABLE_ROOTWRAP) && !defined(DISABLE_WRAPPING)
/* if we don't have rcfile support, we're root, and
--disable-wrapping-as-root is used, turn wrapping off */
- if (geteuid() == 0)
+ if (geteuid() == NANO_ROOT_UID)
SET(NO_WRAP);
#endif
flags |= flags_cpy;
}
#if defined(DISABLE_ROOTWRAP) && !defined(DISABLE_WRAPPING)
- else if (geteuid() == 0)
+ else if (geteuid() == NANO_ROOT_UID)
SET(NO_WRAP);
#endif
#endif /* ENABLE_NANORC */
#ifndef NANO_H
#define NANO_H 1
+#ifdef __TANDEM
+/* Tandem NonStop Kernel */
+#define NANO_ROOT_UID 65535
+#else
+#define NANO_ROOT_UID 0
+#endif
+
#ifdef HAVE_LIMITS_H
#include <limits.h>
#endif
#if defined(DISABLE_ROOTWRAP) && !defined(DISABLE_WRAPPING)
/* If we've already read SYSCONFDIR/nanorc (if it's there), we're
root, and --disable-wrapping-as-root is used, turn wrapping off */
- if (euid == 0)
+ if (euid == NANO_ROOT_UID)
SET(NO_WRAP);
#endif
if ((rcstream = fopen(nanorc, "r")) == NULL) {