/* System dependent declarations. Requires sys/types.h.
Copyright (C) 1992 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#if defined(STDC_HEADERS) || defined(HAVE_STRING_H)
#define bcmp(s1, s2, n) memcmp ((s1), (s2), (n))
#define bzero(s, n) memset ((s), 0, (n))
/* Since major is a function on SVR4, we can't use `ifndef major'. */
#ifdef MAJOR_IN_SYSMACROS
#include <sys/sysmacros.h>
#ifdef major /* Might be defined in sys/types.h. */
#define major(dev) (((dev) >> 8) & 0xff)
#define minor(dev) ((dev) & 0xff)
#define makedev(ma, mi) (((ma) << 8) | (mi))
#if defined(__MSDOS__) || defined(_POSIX_VERSION) || defined(HAVE_FCNTL_H)
#ifdef __EMX__ /* gcc on OS/2. */
#define CONSOLE "/dev/tty"
/* On most systems symlink() always creates links with rwxrwxrwx
protection modes, but on some (HP/UX 8.07; I think maybe DEC's OSF
on MIPS too) symlink() uses the value of umask, so links' protection modes
aren't always rwxrwxrwx. There doesn't seem to be any way to change
the modes of a link (no system call like, say, lchmod() ), it seems
the only way to set the modes right is to set umask before calling
#ifndef SYMLINK_USES_UMASK
#define UMASKED_SYMLINK(name1,name2,mode) symlink(name1,name2)
#define UMASKED_SYMLINK(name1,name2,mode) umasked_symlink(name1,name2,mode)
#endif /* SYMLINK_USES_UMASK */