Plan 9 from Bell Labs’s /usr/web/sources/patch/applied/ape_hdrs/bsd.h.orig

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


#ifndef __BSD_H__
#define __BSD_H__

#ifndef _BSD_EXTENSION
    This header file is an extension to ANSI/POSIX
#endif

#if defined(_INC_PREREQS) && !defined(__TYPES_H)
#include <sys/types.h>
#endif

#ifdef __cplusplus
extern "C" {
#endif

#pragma lib "/$M/lib/ape/libbsd.a"

#ifndef _SIZE_T
#define _SIZE_T
typedef unsigned long size_t;
#endif

/* ifndefs because X11 stuff (ugh) */
#ifndef bcopy
extern void	bcopy(void*, void*, size_t);
#endif
#ifndef bcmp
extern int	bcmp(void*, void*, size_t);
#endif
#ifndef bzero
extern void	bzero(void*, size_t);
#endif
extern int	ffs(unsigned int);
extern void	bhappy(void*);
extern int	rresvport(int*);
extern int	rcmd(char**, int, char*, char*, char*, int*);
extern char*	strdup(char*);
extern int	strcasecmp(char*, char*);
extern int 	putenv(char*);
extern int	strncasecmp(char*, char*,int);
extern void* memccpy(void*, void*, int, size_t);

extern int	getopt(int, char**, char*);
extern int	opterr;
extern int	optind;
extern int	optopt;
extern char	*optarg;
extern char	*mktemp(char *);
extern char	*sys_errlist[];
extern int		sys_nerr;


#ifdef __cplusplus
}
#endif

#endif /* !__BSD_H__ */

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].