// Find the longest match if we are doing completion:
if (completion)
{
+ long i;
// compare all entries to a copy of the first entry
strcpy(filebuf, &bufptr[long(vec[0])]);
- for (long i = 1; i < vec.size(); i++)
+ for (i = 1; i < vec.size(); i++)
{
register char *ref = filebuf;
register char *ptr = &bufptr[long(vec[i])];
#include <bms/stringbuf.h>
#include <termios.h>
-#if !defined(linux)
+#if !defined(linux) && !defined(CSRG_BASED)
#include <sys/termio.h>
#endif
#include <codelibs/stringx.h>
"OCRNL", OCRNL,
"ONOCR", ONOCR,
"ONLRET", ONLRET,
+#if !defined(CSRG_BASED)
"OFILL", OFILL,
"OFDEL", OFDEL,
"NLDLY", NLDLY,
"FFDLY", FFDLY,
"FF0", FF0,
"FF1", FF1,
+#endif
END_OF_LIST, 0
};
#ifdef __apollo
#include "/sys5/usr/include/sys/termio.h"
#else
-#include <termio.h>
+#include <termios.h>
#endif
#include <errno.h>
#include <unistd.h>
if (commandPid == 0)
{
-#if defined(__hp_osf) || defined(__osf__)
+#if defined(__hp_osf) || defined(__osf__) || defined(CSRG_BASED)
setsid() ;
#else
(void) setpgrp ();
extern int _DtDtsNextDCSeq(void);
extern int _DtDtsNextDASeq(void);
+char **_DtsDbListDb(void);
+
int use_in_memory_db = False;
static void
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
-#include <values.h>
#include <sys/mman.h>
#include <stdio.h>
#include <fcntl.h>
* On HP MAXINT is defined in both <values.h> and <sys/param.h>
*/
#undef MAXINT
+#elif defined(CSRG_BASED)
+#define MAXINT INT_MAX
+#else
+#include <values.h>
#endif
#include <sys/param.h>
#include <sys/errno.h>
/* then look up version number of execution host */
if (ret_AppExecEnvVersion)
{
-#if defined(sun) || defined(_AIX) || defined(USL) || defined(__uxp__) || defined(__osf__) || defined(linux)
+#if defined(sun) || defined(_AIX) || defined(USL) || defined(__uxp__) || defined(__osf__) || defined(linux) || defined(CSRG_BASED)
char version[SYS_NMLN+SYS_NMLN+2];
#else
char version[UTSLEN+UTSLEN+2];
#error OSMAJORVERSION and/or OSMINORVERSION not defined
#endif
-#if defined(linux)
+#if defined(linux) || defined(CSRG_BASED)
sprintf(buf,"%s%s%s", STR(OSMAJORVERSION),
nl_langinfo('.'), STR(OSMINORVERSION));
#else
/************************************************************************/
/* Domain/OS BSD has bzero(), bcmp(), and bcopy() defined. */
-#if !defined(apollo) || !defined(__bsd)
+#if !(defined(apollo) && defined(__bsd)) && !defined(CSRG_BASED)
#if defined(__STDC__)
#if !defined(linux) && !defined(__osf__) && !defined(_XFUNCS_H_)
#ifndef __DYNARRAY_H_
#define __DYNARRAY_H_
-#if !defined(linux)
+#if !defined(linux) && !defined(CSRG_BASED)
#include <generic.h>
#endif
-#if defined(USL) || defined(__uxp__) || defined(__osf__) || defined(sun) || defined(linux)
+#if defined(USL) || defined(__uxp__) || defined(__osf__) || defined(sun) || defined(linux) || defined(CSRG_BASED)
#define _DELETE_ARRAY(sz) delete[]
#else
#define _DELETE_ARRAY(sz) delete[(sz)]
#include <stddef.h>
#include <stdlib.h>
-#if defined(__osf__) || defined(sun) || defined(linux)
+#if defined(__osf__) || defined(sun) || defined(linux) || defined(CSRG_BASED)
// The DEC C++ compiler rejects valid inline declarations, claiming
// they have both internal and external linkage.
#else
#ifdef __cplusplus
char *strtokx(char *&ptr, const char *sep);
-# if !defined(__osf__) && !defined(linux)
+# if !defined(__osf__) && !defined(linux) && !defined(CSRG_BASED)
char **strsep(const char *str, const char *sep,
boolean whsp = TRUE, int *num = NULL);
# if !defined(__osf__)
#else /* __STDC__ */
char *strtokx(char **ptr, const char *sep);
-# if !defined(linux)
+# if !defined(linux) && !defined(CSRG_BASED)
char **strsep(const char *str, const char *sep,
boolean whsp, int *num);
#endif
{ if (s != NULL) free((char *)s); }
#else
inline void strfree(const char *s)
-#if defined(__hpux) || defined(__osf__)
+#if defined(__hpux) || defined(__osf__) || defined(CSRG_BASED)
{ if (s != NULL) free((void *)s); }
#else
{ if (s != NULL) free((const void *)s); }