~ubuntu-branches/ubuntu/saucy/ng/saucy

« back to all changes in this revision

Viewing changes to sys/unix/sysdef.h

  • Committer: Bazaar Package Importer
  • Author(s): Masayuki Hatta (mhatta)
  • Date: 2008-07-17 08:10:34 UTC
  • mfrom: (4.1.2 hardy)
  • Revision ID: james.westby@ubuntu.com-20080717081034-s7iitiihm9hl4jjg
Tags: 1.5~beta1-3
Bumped to Standards-Version: 3.8.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* $Id: sysdef.h,v 1.5.2.1 2003/02/23 13:58:14 amura Exp $ */
 
2
/*
 
3
 *      unix based systems (for configure)
 
4
 */
 
5
 
 
6
/*
 
7
 * $Log: sysdef.h,v $
 
8
 * Revision 1.5.2.1  2003/02/23 13:58:14  amura
 
9
 * canna_init() must be called after setttysize() on ttyio.c
 
10
 *
 
11
 * Revision 1.5  2001/03/02 08:48:32  amura
 
12
 * now AUTOSAVE feature implemented almost all (except for WIN32
 
13
 *
 
14
 * Revision 1.4  2001/02/18 19:29:04  amura
 
15
 * split dir.c to port depend/independ
 
16
 *
 
17
 * Revision 1.3  2000/12/14 18:14:12  amura
 
18
 * filename length become flexible
 
19
 *
 
20
 * Revision 1.2  2000/12/01 10:07:09  amura
 
21
 * edit for Minix
 
22
 *
 
23
 * Revision 1.1  2000/11/19 18:35:00  amura
 
24
 * support GNU configure system
 
25
 *
 
26
 */
 
27
 
 
28
#include <stdio.h>
 
29
#ifdef HAVE_UNISTD_H
 
30
#include <sys/types.h>
 
31
#include <unistd.h>
 
32
#endif
 
33
#ifdef HAVE_SYS_PARAM_H
 
34
#include <sys/param.h>
 
35
#endif
 
36
 
 
37
/* for use alloca() */
 
38
#ifndef __GNUC__
 
39
# ifdef HAVE_ALLOCA_H
 
40
#  include <alloca.h>
 
41
# else
 
42
#  ifdef _AIX
 
43
#   pragma alloca
 
44
#  else
 
45
#   ifndef alloca /* predefined by HP cc +Olibcalls */
 
46
char *alloca ();
 
47
#   endif
 
48
#  endif
 
49
# endif
 
50
#endif  /* __GNUC__ */
 
51
 
 
52
#define KBLOCK          8192            /* Kill grow.                   */
 
53
#define GOOD            0               /* Good exit status.            */
 
54
#ifndef NO_SHELL
 
55
#define CMDLINELENGTH   NFILEN          /* Maximum length of shell command. */
 
56
#endif  /* NO_SHELL */
 
57
#define BSMAP           FALSE           /* Bs map feature can use.      */
 
58
                                        /* (default mode is bsmap off)  */
 
59
#define MAKEBACKUP      TRUE            /* Making backup file is on.    */
 
60
#define ITIMER          TRUE            /* Interval timer support       */
 
61
 
 
62
typedef long    RSIZE;                  /* Type for file/region sizes   */
 
63
typedef short   KCHAR;                  /* Type for internal keystrokes */
 
64
 
 
65
#ifndef FD_SET
 
66
#  define FD_SET(fd,fdsp)       ((*fdsp) |= (1<<(fd)))
 
67
#  define FD_ZERO(fdsp)         ((*fdsp) = 0)
 
68
#endif
 
69
 
 
70
/*
 
71
 * Macros used by the buffer name making code.
 
72
 * Start at the end of the file name, scan to the left
 
73
 * until BDC1 (or BDC2, if defined) is reached. The buffer
 
74
 * name starts just to the right of that location, and
 
75
 * stops at end of string (or at the next BDC3 character,
 
76
 * if defined). BDC2 and BDC3 are mainly for VMS.
 
77
 */
 
78
#define BDC1    '/'                     /* Buffer names.                */
 
79
 
 
80
#define MALLOCROUND(m)  (m+=7,m&=~7)    /* round up to 8 byte boundry   */
 
81
 
 
82
#define fncmp           strcmp          /* file name comparison         */
 
83
#ifndef HAVE_BCOPY
 
84
#define bcopy(s,d,n)    memcpy(d,s,n)
 
85
#endif
 
86
#ifndef HAVE_BZERO
 
87
#define bzero(s,n)      memset(s,0,n)
 
88
#endif
 
89
#ifndef HAVE_BCMP
 
90
#define bcmp(s,d,n)     memcmp(s,d,n)
 
91
#endif
 
92
#ifdef  HAVE_RMDIR
 
93
#define unlinkdir(fn)   rmdir(fn)       /* unlink directory             */
 
94
#endif
 
95
char *getenv();
 
96
#define gettermtype()   getenv("TERM")  /* determine terminal type      */
 
97
#ifndef NO_DIR
 
98
#define dirend()        (VOID)0
 
99
#endif