config_f.h revision 145479
1145479Smp/* $Header: /src/pub/tcsh/config_f.h,v 3.32 2005/03/04 13:46:04 christos Exp $ */ 259243Sobrien/* 359243Sobrien * config_f.h -- configure various defines for tcsh 459243Sobrien * 559243Sobrien * This is included by config.h. 659243Sobrien * 759243Sobrien * Edit this to match your particular feelings; this is set up to the 859243Sobrien * way I like it. 959243Sobrien */ 1059243Sobrien/*- 1159243Sobrien * Copyright (c) 1980, 1991 The Regents of the University of California. 1259243Sobrien * All rights reserved. 1359243Sobrien * 1459243Sobrien * Redistribution and use in source and binary forms, with or without 1559243Sobrien * modification, are permitted provided that the following conditions 1659243Sobrien * are met: 1759243Sobrien * 1. Redistributions of source code must retain the above copyright 1859243Sobrien * notice, this list of conditions and the following disclaimer. 1959243Sobrien * 2. Redistributions in binary form must reproduce the above copyright 2059243Sobrien * notice, this list of conditions and the following disclaimer in the 2159243Sobrien * documentation and/or other materials provided with the distribution. 22100616Smp * 3. Neither the name of the University nor the names of its contributors 2359243Sobrien * may be used to endorse or promote products derived from this software 2459243Sobrien * without specific prior written permission. 2559243Sobrien * 2659243Sobrien * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 2759243Sobrien * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2859243Sobrien * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2959243Sobrien * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 3059243Sobrien * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 3159243Sobrien * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 3259243Sobrien * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 3359243Sobrien * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 3459243Sobrien * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 3559243Sobrien * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 3659243Sobrien * SUCH DAMAGE. 3759243Sobrien */ 3859243Sobrien#ifndef _h_config_f 3959243Sobrien#define _h_config_f 4059243Sobrien 4159243Sobrien/* 42145479Smp * SHORT_STRINGS Use at least 16 bit characters instead of 8 bit chars 4359243Sobrien * This fixes up quoting problems and eases implementation 4459243Sobrien * of nls... 4559243Sobrien * 4659243Sobrien */ 4759243Sobrien#define SHORT_STRINGS 4859243Sobrien 4959243Sobrien/* 50145479Smp * WIDE_STRINGS Represent strings using wide characters 51145479Smp * Allows proper function in multibyte encodings like UTF-8 52145479Smp */ 53145479Smp#if defined (SHORT_STRINGS) && SIZEOF_WCHAR_T >= 4 && !defined (WINNT_NATIVE) && !defined(_OSD_POSIX) 54145479Smp# define WIDE_STRINGS 55145479Smp#endif 56145479Smp 57145479Smp/* 5859243Sobrien * NLS: Use Native Language System 5959243Sobrien * Routines like setlocale() are needed 6059243Sobrien * if you don't have <locale.h>, you don't want 6159243Sobrien * to define this. 6259243Sobrien */ 6359243Sobrien#define NLS 6459243Sobrien 6559243Sobrien/* 6659243Sobrien * NLS_CATALOGS:Use Native Language System catalogs for 6759243Sobrien * international messages. 6859243Sobrien * Routines like catopen() are needed 6959243Sobrien * if you don't have <nl_types.h>, you don't want 7059243Sobrien * to define this. 7159243Sobrien */ 7259243Sobrien#undef NLS_CATALOGS 7359243Sobrien 7459243Sobrien/* 7559243Sobrien * LOGINFIRST Source ~/.login before ~/.cshrc 7659243Sobrien */ 7759243Sobrien#undef LOGINFIRST 7859243Sobrien 7959243Sobrien/* 8059243Sobrien * VIDEFAULT Make the VI mode editor the default 8159243Sobrien */ 8259243Sobrien#undef VIDEFAULT 8359243Sobrien 8459243Sobrien/* 8559243Sobrien * KAI use "bye" command and rename "log" to "watchlog" 8659243Sobrien */ 8759243Sobrien#undef KAI 8859243Sobrien 8959243Sobrien/* 9059243Sobrien * TESLA drops DTR on logout. Historical note: 9159243Sobrien * tesla.ee.cornell.edu was a vax11/780 with a develcon 9259243Sobrien * switch that sometimes would not hang up. 9359243Sobrien */ 9459243Sobrien#undef TESLA 9559243Sobrien 9659243Sobrien/* 9759243Sobrien * DOTLAST put "." last in the default path, for security reasons 9859243Sobrien */ 9959243Sobrien#define DOTLAST 10059243Sobrien 10159243Sobrien/* 10259243Sobrien * NODOT Don't put "." in the default path, for security reasons 10359243Sobrien */ 10459243Sobrien#undef NODOT 10559243Sobrien 10659243Sobrien/* 10759243Sobrien * AUTOLOGOUT tries to determine if it should set autologout depending 10859243Sobrien * on the name of the tty, and environment. 10959243Sobrien * Does not make sense in the modern window systems! 11059243Sobrien */ 11159243Sobrien#define AUTOLOGOUT 11259243Sobrien 11359243Sobrien/* 11459243Sobrien * SUSPENDED Newer shells say 'Suspended' instead of 'Stopped'. 11559243Sobrien * Define to get the same type of messages. 11659243Sobrien */ 11759243Sobrien#define SUSPENDED 11859243Sobrien 11959243Sobrien/* 12059243Sobrien * KANJI Ignore meta-next, and the ISO character set. Should 121145479Smp * be used with SHORT_STRINGS (or WIDE_STRINGS) 12259243Sobrien * 12359243Sobrien */ 124131962Smp#define KANJI 12559243Sobrien 12659243Sobrien/* 12759243Sobrien * DSPMBYTE add variable "dspmbyte" and display multi-byte string at 12859243Sobrien * only output, when "dspmbyte" is set. Should be used with 12959243Sobrien * KANJI 13059243Sobrien */ 131145479Smp#if defined (SHORT_STRINGS) && !defined (WIDE_STRINGS) 132145479Smp# define DSPMBYTE 133145479Smp#endif 13459243Sobrien 13559243Sobrien/* 13659243Sobrien * MBYTEDEBUG when "dspmbyte" is changed, set multi-byte checktable to 13759243Sobrien * variable "mbytemap". 13859243Sobrien * (use for multi-byte table check) 13959243Sobrien */ 14059243Sobrien#undef MBYTEDEBUG 14159243Sobrien 14259243Sobrien/* 14359243Sobrien * NEWGRP Provide a newgrp builtin. 14459243Sobrien */ 14559243Sobrien#undef NEWGRP 14659243Sobrien 14759243Sobrien/* 14859243Sobrien * SYSMALLOC Use the system provided version of malloc and friends. 14959243Sobrien * This can be much slower and no memory statistics will be 15059243Sobrien * provided. 15159243Sobrien */ 15269408Sache#if defined(__MACHTEN__) || defined(PURIFY) || defined(MALLOC_TRACE) || defined(_OSD_POSIX) || defined(__MVS__) 15359243Sobrien# define SYSMALLOC 15459243Sobrien#else 15559243Sobrien# undef SYSMALLOC 15659243Sobrien#endif 15759243Sobrien 15859243Sobrien/* 15959243Sobrien * USE_ACCESS Use access(2) rather than stat(2) when POSIX is defined. 16059243Sobrien * POSIX says to use stat, but stat(2) is less accurate 16159243Sobrien * than access(2) for determining file access. 16259243Sobrien */ 16359243Sobrien#undef USE_ACCESS 16459243Sobrien 16559243Sobrien/* 16659243Sobrien * REMOTEHOST Try to determine the remote host that we logged in from 16759243Sobrien * using first getpeername, and then the utmp file. If 16859243Sobrien * successful, set $REMOTEHOST to the name or address of the 16959243Sobrien * host 17059243Sobrien */ 17159243Sobrien#define REMOTEHOST 17259243Sobrien 17359243Sobrien/* 17459243Sobrien * COLOR_LS_F Do you want to use builtin color ls-F ? 17559243Sobrien * 17659243Sobrien */ 17759243Sobrien#define COLOR_LS_F 17859243Sobrien 17959243Sobrien/* 18059243Sobrien * COLORCAT Do you want to colorful message ? 18159243Sobrien * 18259243Sobrien */ 18359243Sobrien#undef COLORCAT 18459243Sobrien 18559243Sobrien/* 186100616Smp * FILEC support for old style file completion 187100616Smp */ 188100616Smp#define FILEC 189100616Smp 190100616Smp/* 19159243Sobrien * RCSID This defines if we want rcs strings in the binary or not 19259243Sobrien * 19359243Sobrien */ 19459243Sobrien#if !defined(lint) && !defined(SABER) && !defined(__CLCC__) 19559243Sobrien# ifndef __GNUC__ 19659243Sobrien# define RCSID(id) static char *rcsid = (id); 19759243Sobrien# else 19859243Sobrien# define RCSID(id) static char *rcsid(const char *a) { return rcsid(a = id); } 19959243Sobrien# endif /* !__GNUC__ */ 20059243Sobrien#else 20159243Sobrien# define RCSID(id) /* Nothing */ 20259243Sobrien#endif /* !lint && !SABER */ 20359243Sobrien 204145479Smp/* Consistency checks */ 205145479Smp#ifdef WIDE_STRINGS 206145479Smp# if SIZEOF_WCHAR_T < 4 207145479Smp #error "wchar_t must be at least 4 bytes for WIDE_STRINGS" 208145479Smp# endif 209145479Smp 210145479Smp# ifdef WINNT_NATIVE 211145479Smp #error "WIDE_STRINGS cannot be used together with WINNT_NATIVE" 212145479Smp# endif 213145479Smp 214145479Smp# ifndef SHORT_STRINGS 215145479Smp #error "SHORT_STRINGS must be defined if WIDE_STRINGS is defined" 216145479Smp# endif 217145479Smp 218145479Smp# ifndef NLS 219145479Smp #error "NLS must be defined if WIDE_STRINGS is defined" 220145479Smp# endif 221145479Smp 222145479Smp# ifdef DSPMBYTE 223145479Smp #error "DSPMBYTE must not be defined if WIDE_STRINGS is defined" 224145479Smp# endif 225145479Smp#endif 226145479Smp 227145479Smp#if !defined (SHORT_STRINGS) && defined (DSPMBYTE) 228145479Smp #error "SHORT_STRINGS must be defined if DSPMBYTE is defined" 229145479Smp#endif 230145479Smp 23159243Sobrien#endif /* _h_config_f */ 232