add directory gnu

This commit is contained in:
gohigh
2024-02-19 00:24:47 -05:00
parent 32616db5a4
commit a40f4cadb0
5086 changed files with 1860970 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
# Copyright (C) 1992 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any later version.
# The GNU C Library 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
# Library General Public License for more details.
# You should have received a copy of the GNU Library General Public
# License along with the GNU C Library; see the file COPYING.LIB. If
# not, write to the Free Software Foundation, Inc., 675 Mass Ave,
# Cambridge, MA 02139, USA.
#
# Sub-makefile for I/O portion of the library.
#
subdir := io
headers := sys/stat.h gnu/stat.h fcntlbits.h filebits.h fcntl.h utime.h
routines := \
utime \
mkfifo \
__stat __fstat __lstat \
__umask __chmod __fchmod __mkdir \
__open __close __read __write __lseek __access __fcntl __flock \
__dup __dup2 __pipe \
creat \
__chdir getcwd getwd getdirname \
__chown __fchown \
ttyname __isatty \
__link __symlink __readlink \
__unlink __rmdir
routines := $(sort $(foreach f,$(routines),$f $(f:__%=%)))
others := pwd
include ../Rules

View File

@@ -0,0 +1,25 @@
/* Copyright (C) 1991 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <ansidecl.h>
#include <gnu-stabs.h>
#include <unistd.h>
#undef access
function_alias(access, __access, int, (file, type),
DEFUN(access, (file, type), CONST char *file AND int type))

View File

@@ -0,0 +1,26 @@
/* Copyright (C) 1991 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <ansidecl.h>
#include <unistd.h>
#include <gnu-stabs.h>
#undef chdir
function_alias(chdir, __chdir, int, (path),
DEFUN(chdir, (path), CONST char *path))

View File

@@ -0,0 +1,26 @@
/* Copyright (C) 1991 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <ansidecl.h>
#include <sys/stat.h>
#include <gnu-stabs.h>
#undef chmod
function_alias(chmod, __chmod, int, (file, mode),
DEFUN(chmod, (file, mode), CONST char *file AND int mode))

View File

@@ -0,0 +1,27 @@
/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <ansidecl.h>
#include <unistd.h>
#include <gnu-stabs.h>
#undef chown
function_alias(chown, __chown, int, (file, owner, group),
DEFUN(chown, (file, owner, group),
CONST char *file AND __uid_t owner AND __gid_t group))

View File

@@ -0,0 +1,25 @@
/* Copyright (C) 1991 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <ansidecl.h>
#include <gnu-stabs.h>
#include <unistd.h>
#undef close
function_alias(close, __close, int, (fd),
DEFUN(close, (fd), int fd))

View File

@@ -0,0 +1,30 @@
/* Copyright (C) 1991 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <ansidecl.h>
#include <fcntl.h>
#include <sys/types.h>
#undef creat
/* Create FILE with protections MODE. */
int
DEFUN(creat, (file, mode), CONST char *file AND mode_t mode)
{
return __open(file, O_WRONLY|O_CREAT|O_TRUNC, mode);
}

View File

@@ -0,0 +1,27 @@
/* Copyright (C) 1991 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <ansidecl.h>
#include <fcntl.h>
#include <unistd.h>
#include <gnu-stabs.h>
#undef dup
function_alias(dup, __dup, int, (fd),
DEFUN(dup, (fd), int fd))

View File

@@ -0,0 +1,28 @@
/* Copyright (C) 1991 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <ansidecl.h>
#include <errno.h>
#include <fcntl.h>
#include <unistd.h>
#include <gnu-stabs.h>
#undef dup2
function_alias(dup2, __dup2, int, (fd, fd2),
DEFUN(dup2, (fd, fd2), int fd AND int fd2))

View File

@@ -0,0 +1,27 @@
/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <ansidecl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <gnu-stabs.h>
#undef fchmod
function_alias(fchmod, __fchmod, int, (fd, mode),
DEFUN(fchmod, (fd, mode), int fd AND mode_ta mode))

View File

@@ -0,0 +1,28 @@
/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <ansidecl.h>
#include <sys/types.h>
#include <unistd.h>
#include <gnu-stabs.h>
#undef fchown
function_alias(fchown, __fchown, int, (fd, owner, group),
DEFUN(fchown, (fd, owner, group),
int fd AND uid_t owner AND gid_t group))

View File

@@ -0,0 +1,26 @@
/* Copyright (C) 1991 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <ansidecl.h>
#include <fcntl.h>
#include <gnu-stabs.h>
#undef fcntl
function_alias(fcntl, __fcntl, int, (fd, cmd),
DEFUN(fcntl, (fd, cmd), int fd AND int cmd DOTS))

View File

@@ -0,0 +1,126 @@
/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
/*
* POSIX Standard: 6.5 File Control Operations <fcntl.h>
*/
#ifndef _FCNTL_H
#define _FCNTL_H 1
#include <features.h>
#include <fcntlbits.h>
#include <filebits.h>
/* Values for the second argument to fcntl. */
#define F_DUPFD __F_DUPFD /* Duplicate file descriptor. */
#define F_GETFD __F_GETFD /* Get file descriptor flags. */
#define F_SETFD __F_SETFD /* Set file descriptor flags. */
#define F_GETFL __F_GETFL /* Get file status flags. */
#define F_SETFL __F_SETFL /* Set file status flags. */
#define F_SETLK __F_SETLK /* Set record locking info. */
#define F_SETLKW __F_SETLKW /* Set record locking, block. */
#ifdef __USE_BSD
#define F_GETOWN __F_GETOWN /* Get owner (receiver of SIGIO). */
#define F_SETOWN __F_SETOWN /* Set owner (receiver of SIGIO). */
#endif
/* File descriptor flags used with F_GETFD and F_SETFD. */
#define FD_CLOEXEC __FD_CLOEXEC /* Close on exec. */
/* File access modes for open and fcntl. */
#define O_RDONLY __O_RDONLY /* Open read-only. */
#define O_WRONLY __O_WRONLY /* Open write-only. */
#define O_RDWR __O_RDWR /* Open read/write. */
/* Bits OR'd into the second argument to open. */
#define O_CREAT __O_CREAT /* Create file if it doesn't exist. */
#define O_EXCL __O_EXCL /* Fail if file already exists. */
#define O_TRUNC __O_TRUNC /* Truncate file to zero length. */
#define O_NOCTTY __O_NOCTTY /* Don't assign a controlling tty. */
/* File status flags for `open' and `fcntl'. */
#define O_APPEND __O_APPEND /* Writes append to the file. */
#define O_NONBLOCK __O_NONBLOCK /* No delay when opening the file. */
#ifdef __USE_BSD
#define O_NDELAY __O_NDELAY
#endif
#ifdef __USE_MISC
/* Unix-style flags for `fcntl' F_GETFL and F_SETFL. */
#define FREAD 0x1 /* Read access. */
#define FWRITE 0x2 /* Write access. */
#define FNDELAY O_NONBLOCK
#define FAPPEND O_APPEND
#define FASYNC 0x40 /* Send SIGIO when data is ready. */
#define FCREAT O_CREAT
#define FTRUNC O_TRUNC
#define FEXCL O_EXCL
#define FSYNC 0x2000 /* Synchronous writes. */
#ifndef R_OK /* Verbatim from <unistd.h>. Ugh. */
/* Values for the second argument to access.
These may be OR'd together. */
#define R_OK 4 /* Test for read permission. */
#define W_OK 2 /* Test for write permission. */
#define X_OK 1 /* Test for execute permission. */
#define F_OK 0 /* Test for existence. */
#endif
#endif /* Use misc. */
/* Mask for file access modes. */
#define O_ACCMODE __O_ACCMODE
/* Do the file control operation described by CMD on FD.
The remaining arguments are interpreted depending on CMD. */
extern int EXFUN(__fcntl, (int __fd, int __cmd, ...));
/* Open FILE and return a new file descriptor for it, or -1 on error.
OFLAG determines the type of access used. If O_CREAT is on OFLAG,
the third argument is taken as a `mode_t', the mode of the created file. */
extern int EXFUN(__open, (CONST char *__file, int __oflag, ...));
#define fcntl __fcntl
#define open __open
/* Create and open FILE, with mode MODE.
This takes an `int' MODE argument because that is
what `mode_t' will be widened to. */
extern int EXFUN(creat, (CONST char *__file, __mode_t __mode));
#ifdef __OPTIMIZE__
#define creat(file, m) __open((file), O_WRONLY|O_CREAT|O_TRUNC, (m))
#endif /* Optimizing. */
#define flock __flock
#define F_RDLCK __F_RDLCK
#define F_WRLCK __F_WRLCK
#define F_UNLCK __F_UNLCK
#endif /* fcntl.h */

View File

@@ -0,0 +1,27 @@
/* Copyright (C) 1992 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <ansidecl.h>
#include <gnu-stabs.h>
#include <fcntl.h>
#include <sys/types.h>
#undef flock
function_alias(flock, __flock, int, (fd, operation),
DEFUN(flock, (fd, operation),
int fd AND int operation))

View File

@@ -0,0 +1,25 @@
/* Copyright (C) 1991 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <ansidecl.h>
#include <gnu-stabs.h>
#include <sys/stat.h>
#undef fstat
function_alias(fstat, __fstat, int, (fd, buf),
DEFUN(fstat, (fd, buf), int fd AND struct stat *buf))

View File

@@ -0,0 +1,45 @@
/* Copyright (C) 1992 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <ansidecl.h>
#include <unistd.h>
#include <sys/stat.h>
#include <stdlib.h>
#include <string.h>
/* Return a malloc'd string containing the current directory name.
If the environment variable `PWD' is set, and its value is correct,
that value is used. */
char *
DEFUN_VOID(get_current_dir_name)
{
char *pwd;
struct stat dotstat, pwdstat;
pwd = getenv ("PWD");
if (pwd != NULL &&
stat (".", &dotstat) == 0 &&
stat (pwd, &pwdstat) == 0 &&
pwdstat.st_dev == dotstat.st_dev &&
pwdstat.st_ino == dotstat.st_ino)
/* The PWD value is correct. Use it. */
return strdup (pwd);
return getcwd ((char *) NULL, 0);
}

View File

@@ -0,0 +1,44 @@
/* Copyright (C) 1991 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <ansidecl.h>
#include <errno.h>
#include <limits.h>
#include <string.h>
#include <unistd.h>
/* Put the absolute pathname of the current working direction in BUF.
If successful, return BUF. If not, put an error message in
BUF and return NULL. BUF should be at least PATH_MAX bytes long. */
char *
DEFUN(getwd, (buf), char *buf)
{
if (buf == NULL)
{
errno = EINVAL;
return NULL;
}
if (getcwd (buf, PATH_MAX) == NULL)
{
(void) strncpy (buf, strerror (errno), PATH_MAX);
return NULL;
}
return buf;
}

View File

@@ -0,0 +1,79 @@
/* Copyright (C) 1991 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#ifndef _GNU_STAT_H
#define _GNU_STAT_H 1
#include <gnu/types.h>
/* Structure describing file characteristics. */
struct __stat
{
__dev_t st_dev; /* Device containing the file. */
__ino_t st_ino; /* File serial number. */
__mode_t st_mode; /* File mode. */
__nlink_t st_nlink; /* Link count. */
/* These are shorts instead of uid_t/gid_t for compatibility with 4.3. */
unsigned short int st_uid; /* User ID of the file's owner. */
unsigned short int st_gid; /* Group ID of the file's group.*/
__dev_t st_rdev; /* Device number, if device. */
__off_t st_size; /* Size of file, in bytes. */
__time_t st_atime; /* Time of last access. */
unsigned long int st_atime_usec;
__time_t st_mtime; /* Time of last modification. */
unsigned long int st_mtime_usec;
__time_t st_ctime; /* Time of last status change. */
unsigned long int st_ctime_usec;
unsigned long int st_blksize;/* Size of blocks on disk. */
unsigned long int st_blocks;/* Number of blocks used. */
long int st_spare[2];
};
/* Encoding of the file mode. */
#define __S_IFMT 0170000 /* These bits determine file type. */
/* File types. */
#define __S_IFDIR 0040000 /* Directory. */
#define __S_IFCHR 0020000 /* Character device. */
#define __S_IFBLK 0060000 /* Block device. */
#define __S_IFREG 0100000 /* Regular file. */
#define __S_IFLNK 0120000 /* Symbolic link. */
#define __S_IFSOCK 0140000 /* Socket. */
#define __S_IFIFO 0010000 /* FIFO. */
/* Protection bits. */
#define __S_ISUID 04000 /* Set user ID on execution. */
#define __S_ISGID 02000 /* Set group ID on execution. */
#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */
#define __S_IREAD 0400 /* Read by owner. */
#define __S_IWRITE 0200 /* Write by owner. */
#define __S_IEXEC 0100 /* Execute by owner. */
#endif /* gnu/stat.h */

View File

@@ -0,0 +1,26 @@
/* Copyright (C) 1991 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <ansidecl.h>
#include <gnu-stabs.h>
#include <unistd.h>
#undef isatty
function_alias(isatty, __isatty, int, (fd),
DEFUN(isatty, (fd), int fd))

View File

@@ -0,0 +1,26 @@
/* Copyright (C) 1991 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <ansidecl.h>
#include <unistd.h>
#include <gnu-stabs.h>
#undef link
function_alias(link, __link, int, (from, to),
DEFUN(link, (from, to), CONST char *from AND CONST char *to))

View File

@@ -0,0 +1,26 @@
/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <ansidecl.h>
#include <gnu-stabs.h>
#include <unistd.h>
#include <sys/types.h>
#undef lseek
function_alias(lseek, __lseek, off_t, (fd, off, w),
DEFUN(lseek, (fd, off, w), int fd AND off_t off AND int w))

View File

@@ -0,0 +1,26 @@
/* Copyright (C) 1991 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <ansidecl.h>
#include <gnu-stabs.h>
#include <sys/stat.h>
#undef lstat
function_alias(lstat, __lstat, int, (file, buf),
DEFUN(lstat, (file, buf),
CONST char *file AND struct stat *buf))

View File

@@ -0,0 +1,25 @@
/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <ansidecl.h>
#include <sys/stat.h>
#include <gnu-stabs.h>
#undef mkdir
function_alias(mkdir, __mkdir, int, (path, mode),
DEFUN(mkdir, (path, mode), CONST char *path AND int mode))

View File

@@ -0,0 +1,52 @@
/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <ansidecl.h>
#include <fcntl.h>
/* The `open' function might take three arguments. */
#undef open
#ifdef HAVE_GNU_LD
#include <gnu-stabs.h>
symbol_alias(__open, open);
#else /* No GNU stabs. */
#include <stdarg.h>
int
DEFUN(open, (file, oflag), CONST char *file AND int oflag DOTS)
{
if (oflag & O_CREAT)
{
va_list args;
int mode;
va_start(args, oflag);
mode = va_arg(args, int);
va_end(args);
return __open(file, oflag, mode);
}
return __open(file, oflag);
}
#endif /* GNU stabs. */

View File

@@ -0,0 +1,27 @@
/* Copyright (C) 1991 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <ansidecl.h>
#include <errno.h>
#include <unistd.h>
#include <gnu-stabs.h>
#undef pipe
function_alias(pipe, __pipe, int, (pipedes),
DEFUN(pipe, (pipedes), int pipedes[2]))

View File

@@ -0,0 +1,38 @@
/* Copyright (C) 1991 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <ansidecl.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
int
DEFUN_VOID(main)
{
char *dir = getcwd((char *) NULL, 0);
if (dir == NULL)
perror("getcwd");
else
{
puts(dir);
free(dir);
}
exit(dir == NULL ? EXIT_FAILURE : EXIT_SUCCESS);
}

View File

@@ -0,0 +1,27 @@
/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <ansidecl.h>
#include <gnu-stabs.h>
#include <unistd.h>
#include <stddef.h>
#undef read
function_alias(read, __read, __ssize_t, (fd, buf, n),
DEFUN(read, (fd, buf, n),
int fd AND PTR buf AND size_t n))

View File

@@ -0,0 +1,27 @@
/* Copyright (C) 1991 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <ansidecl.h>
#include <unistd.h>
#include <gnu-stabs.h>
#undef readlink
function_alias(readlink, __readlink, int, (path, buf, len),
DEFUN(readlink, (path, buf, len),
CONST char *path AND char *buf AND size_t len))

View File

@@ -0,0 +1,26 @@
/* Copyright (C) 1991 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <ansidecl.h>
#include <unistd.h>
#include <gnu-stabs.h>
#undef rmdir
function_alias(rmdir, __rmdir, int, (path),
DEFUN(rmdir, (path), CONST char *path))

View File

@@ -0,0 +1,26 @@
/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <ansidecl.h>
#include <gnu-stabs.h>
#include <sys/stat.h>
#undef stat
function_alias(stat, __stat, int, (file, buf),
DEFUN(stat, (file, buf),
CONST char *file AND struct __stat *buf))

View File

@@ -0,0 +1,26 @@
/* Copyright (C) 1991 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <ansidecl.h>
#include <unistd.h>
#include <gnu-stabs.h>
#undef symlink
function_alias(symlink, __symlink, int, (from, to),
DEFUN(symlink, (from, to), CONST char *from AND CONST char *to))

View File

@@ -0,0 +1,153 @@
/* Copyright (C) 1991 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
/*
* POSIX Standard: 5.6 File Characteristics <sys/stat.h>
*/
#ifndef _SYS_STAT_H
#define _SYS_STAT_H 1
#include <features.h>
#include <gnu/stat.h>
#if defined(__USE_BSD) || defined(__USE_MISC)
#define S_IFMT __S_IFMT
#define S_IFDIR __S_IFDIR
#define S_IFCHR __S_IFCHR
#define S_IFBLK __S_IFBLK
#define S_IFREG __S_IFREG
#define S_IFLNK __S_IFLNK
#define S_IFSOCK __S_IFSOCK
#define S_IFIFO __S_IFIFO
#endif
/* Test macros for file types. */
#define __S_ISTYPE(mode, mask) (((mode) & __S_IFMT) == (mask))
#define S_ISDIR(mode) __S_ISTYPE((mode), __S_IFDIR)
#define S_ISCHR(mode) __S_ISTYPE((mode), __S_IFCHR)
#define S_ISBLK(mode) __S_ISTYPE((mode), __S_IFBLK)
#define S_ISREG(mode) __S_ISTYPE((mode), __S_IFREG)
#define S_ISFIFO(mode) __S_ISTYPE((mode), __S_IFIFO)
#ifdef __USE_GNU
#define S_ISLNK(mode) __S_ISTYPE((mode), __S_IFLNK)
#define S_ISSOCK(mode) __S_ISTYPE((mode), __S_IFSOCK)
#endif
/* Protection bits. */
#define S_ISUID __S_ISUID/* Set user ID on execution. */
#define S_ISGID __S_ISGID/* Set group ID on execution. */
#if defined(__USE_BSD) || defined(__USE_MISC)
#define S_ISVTX __S_ISVTX/* Save swapped text after use (sticky bit). */
#endif
#define S_IRUSR __S_IREAD /* Read by owner. */
#define S_IWUSR __S_IWRITE /* Write by owner. */
#define S_IXUSR __S_IEXEC /* Execute by owner. */
/* Read, write, and execute by owner. */
#define S_IRWXU (__S_IREAD|__S_IWRITE|__S_IEXEC)
#if defined(__USE_MISC) && defined(__USE_BSD)
#define S_IREAD S_IRUSR
#define S_IWRITE S_IWUSR
#define S_IEXEC S_IXUSR
#endif
#define S_IRGRP (S_IRUSR >> 3) /* Read by group. */
#define S_IWGRP (S_IWUSR >> 3) /* Write by group. */
#define S_IXGRP (S_IXUSR >> 3) /* Execute by group. */
/* Read, write, and execute by group. */
#define S_IRWXG (S_IRWXU >> 3)
#define S_IROTH (S_IRGRP >> 3) /* Read by others. */
#define S_IWOTH (S_IWGRP >> 3) /* Write by others. */
#define S_IXOTH (S_IXGRP >> 3) /* Execute by others. */
/* Read, write, and execute by others. */
#define S_IRWXO (S_IRXWG >> 3)
/* Get file attributes for FILE and put them in BUF. */
extern int EXFUN(__stat, (CONST char *__file, struct __stat *__buf));
/* Get file attributes for the file, device, pipe, or socket
that file descriptor FD is open on and put them in BUF. */
extern int EXFUN(__fstat, (int __fd, struct __stat *__buf));
/* Get file attributes about FILE and put them in BUF.
If FILE is a symbolic link, do not follow it. */
extern int EXFUN(__lstat, (CONST char *__file, struct __stat *__buf));
/* Set file access permissions for FILE to MODE.
This takes an `int' MODE argument because that
is what `mode_t's get widened to. */
extern int EXFUN(__chmod, (CONST char *__file, __mode_t __mode));
/* Set file access permissions of the file FD is open on to MODE. */
extern int EXFUN(__fchmod, (int __fd, int __mode));
/* Set the file creation mask of the current process to MASK,
and return the old creation mask. */
extern __mode_t EXFUN(__umask, (__mode_t __mask));
#ifdef __USE_GNU
/* Get the current `umask' value without changing it.
This function is only available under the GNU Hurd. */
extern __mode_t EXFUN(getumask, (NOARGS));
#endif
/* Create a new directory named PATH, with permission bits MODE. */
extern int EXFUN(__mkdir, (CONST char *__path, __mode_t __mode));
/* Create a device file named PATH, with permission and special bits MODE
and device number DEV (which can be constructed from major and minor
device numbers with the `makedev' macro above). */
extern int EXFUN(__mknod, (CONST char *__path, int __mode, int __dev));
#define stat __stat
#define fstat __fstat
#ifdef __USE_BSD
#define lstat __lstat
#endif /* Use BSD. */
#define chmod __chmod
#ifdef __USE_BSD
#define fchmod __fchmod
#endif
#define umask __umask
#define mkdir __mkdir
/* Create a new FIFO named PATH, with permission bits MODE. */
extern int EXFUN(mkfifo, (CONST char *__path, __mode_t __mode));
#if defined(__USE_MISC) || defined(__USE_BSD)
#define mknod __mknod
#endif
#endif /* sys/stat.h */

View File

@@ -0,0 +1,27 @@
/* Copyright (C) 1991 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <ansidecl.h>
#include <sys/stat.h>
#include <gnu-stabs.h>
#undef umask
function_alias(umask, __umask, int, (mask),
DEFUN(umask, (mask), int mask))

View File

@@ -0,0 +1,25 @@
/* Copyright (C) 1991 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <ansidecl.h>
#include <gnu-stabs.h>
#include <unistd.h>
#undef unlink
function_alias(unlink, __unlink, int, (name),
DEFUN(unlink, (name), CONST char *name))

View File

@@ -0,0 +1,44 @@
/* Copyright (C) 1991 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
/*
* POSIX Standard: 5.6.6 Set File Access and Modification Times <utime.h>
*/
#ifndef _UTIME_H
#define _UTIME_H 1
#include <features.h>
#define __need_NULL
#include <stddef.h>
#include <gnu/types.h>
/* Structure describing file times. */
struct utimbuf
{
__time_t actime; /* Access time. */
__time_t modtime; /* Modification time. */
};
/* Set the access and modification times of FILE to those given in TIMES.
If TIMES is NULL, set them to the current time. */
extern int EXFUN(utime, (CONST char *__file, CONST struct utimbuf *__times));
#endif /* utime.h */

View File

@@ -0,0 +1,27 @@
/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <ansidecl.h>
#include <gnu-stabs.h>
#include <unistd.h>
#include <stddef.h>
#undef write
function_alias(write, __write, __ssize_t, (d, b, n),
DEFUN(write, (d, b, n),
int d AND CONST PTR b AND size_t n))