|
Packit |
575503 |
/*
|
|
Packit |
575503 |
* protos.h -- function prototypes for when the headers don't have them.
|
|
Packit |
575503 |
*/
|
|
Packit |
575503 |
|
|
Packit |
575503 |
/*
|
|
Packit |
575503 |
* Copyright (C) 1991 - 2002, 2011 the Free Software Foundation, Inc.
|
|
Packit |
575503 |
*
|
|
Packit |
575503 |
* This file is part of GAWK, the GNU implementation of the
|
|
Packit |
575503 |
* AWK Programming Language.
|
|
Packit |
575503 |
*
|
|
Packit |
575503 |
* GAWK is free software; you can redistribute it and/or modify
|
|
Packit |
575503 |
* it under the terms of the GNU General Public License as published by
|
|
Packit |
575503 |
* the Free Software Foundation; either version 3 of the License, or
|
|
Packit |
575503 |
* (at your option) any later version.
|
|
Packit |
575503 |
*
|
|
Packit |
575503 |
* GAWK is distributed in the hope that it will be useful,
|
|
Packit |
575503 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
575503 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
Packit |
575503 |
* GNU General Public License for more details.
|
|
Packit |
575503 |
*
|
|
Packit |
575503 |
* You should have received a copy of the GNU General Public License
|
|
Packit |
575503 |
* along with this program; if not, write to the Free Software
|
|
Packit |
575503 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
|
Packit |
575503 |
*/
|
|
Packit |
575503 |
|
|
Packit |
575503 |
#ifndef STDC_HEADERS
|
|
Packit |
575503 |
|
|
Packit |
575503 |
#define aptr_t void * /* arbitrary pointer type */
|
|
Packit |
575503 |
extern aptr_t malloc(size_t);
|
|
Packit |
575503 |
extern aptr_t realloc(aptr_t, size_t);
|
|
Packit |
575503 |
extern aptr_t calloc(size_t, size_t);
|
|
Packit |
575503 |
|
|
Packit |
575503 |
extern void free(aptr_t);
|
|
Packit |
575503 |
extern char *getenv(const char *);
|
|
Packit |
575503 |
|
|
Packit |
575503 |
#if ! defined(HAVE_STRING_H) && ! defined(HAVE_STRINGS_H)
|
|
Packit |
575503 |
extern char *strcpy(char *, const char *);
|
|
Packit |
575503 |
extern char *strcat(char *, const char *);
|
|
Packit |
575503 |
extern char *strncpy(char *, const char *, size_t);
|
|
Packit |
575503 |
extern int strcmp(const char *, const char *);
|
|
Packit |
575503 |
extern int strncmp(const char *, const char *, size_t);
|
|
Packit |
575503 |
extern char *strchr(const char *, int);
|
|
Packit |
575503 |
extern char *strrchr(const char *, int);
|
|
Packit |
575503 |
extern char *strstr(const char *s1, const char *s2);
|
|
Packit |
575503 |
extern size_t strlen(const char *);
|
|
Packit |
575503 |
extern long strtol(const char *, char **, int);
|
|
Packit |
575503 |
|
|
Packit |
575503 |
extern aptr_t memset(aptr_t, int, size_t);
|
|
Packit |
575503 |
extern aptr_t memcpy(aptr_t, const aptr_t, size_t);
|
|
Packit |
575503 |
extern aptr_t memmove(aptr_t, const aptr_t, size_t);
|
|
Packit |
575503 |
extern aptr_t memchr(const aptr_t, int, size_t);
|
|
Packit |
575503 |
extern int memcmp(const aptr_t, const aptr_t, size_t);
|
|
Packit |
575503 |
#endif /* ! defined(HAVE_STRING_H) && ! defined(HAVE_STRINGS_H) */
|
|
Packit |
575503 |
|
|
Packit |
575503 |
#ifndef VMS
|
|
Packit |
575503 |
extern char *strerror(int);
|
|
Packit |
575503 |
#else
|
|
Packit |
575503 |
extern char *strerror(int,...);
|
|
Packit |
575503 |
#endif
|
|
Packit |
575503 |
|
|
Packit |
575503 |
#if ! defined(__GNU_LIBRARY__)
|
|
Packit |
575503 |
extern size_t strftime(char *, size_t, const char *, const struct tm *);
|
|
Packit |
575503 |
#endif
|
|
Packit |
575503 |
extern time_t time(time_t *);
|
|
Packit |
575503 |
|
|
Packit |
575503 |
extern FILE *fdopen(int, const char *);
|
|
Packit |
575503 |
extern int fprintf(FILE *, const char *, ...);
|
|
Packit |
575503 |
#if ! defined(__GNU_LIBRARY__)
|
|
Packit |
575503 |
extern size_t fwrite(const aptr_t, size_t, size_t, FILE *);
|
|
Packit |
575503 |
#endif
|
|
Packit |
575503 |
extern int fputs(const char *, FILE *);
|
|
Packit |
575503 |
extern int unlink(const char *);
|
|
Packit |
575503 |
extern int fflush(FILE *);
|
|
Packit |
575503 |
extern int fclose(FILE *);
|
|
Packit |
575503 |
extern FILE *popen(const char *, const char *);
|
|
Packit |
575503 |
extern int pclose(FILE *);
|
|
Packit |
575503 |
extern void abort();
|
|
Packit |
575503 |
extern int isatty(int);
|
|
Packit |
575503 |
extern void exit(int);
|
|
Packit |
575503 |
extern int system(const char *);
|
|
Packit |
575503 |
extern int sscanf(const char *, const char *, ...);
|
|
Packit |
575503 |
#ifndef toupper
|
|
Packit |
575503 |
extern int toupper(int);
|
|
Packit |
575503 |
#endif
|
|
Packit |
575503 |
#ifndef tolower
|
|
Packit |
575503 |
extern int tolower(int);
|
|
Packit |
575503 |
#endif
|
|
Packit |
575503 |
|
|
Packit |
575503 |
extern double pow(double x, double y);
|
|
Packit |
575503 |
extern double atof(const char *);
|
|
Packit |
575503 |
extern double strtod(const char *, char **);
|
|
Packit |
575503 |
extern int fstat(int, struct stat *);
|
|
Packit |
575503 |
extern int stat(const char *, struct stat *);
|
|
Packit |
575503 |
extern off_t lseek(int, off_t, int);
|
|
Packit |
575503 |
extern int close(int);
|
|
Packit |
575503 |
extern int creat(const char *, mode_t);
|
|
Packit |
575503 |
extern int open(const char *, int, ...);
|
|
Packit |
575503 |
extern int pipe(int *);
|
|
Packit |
575503 |
extern int dup(int);
|
|
Packit |
575503 |
extern int dup2(int,int);
|
|
Packit |
575503 |
extern int fork();
|
|
Packit |
575503 |
extern int execl(const char *, const char *, ...);
|
|
Packit |
575503 |
#ifndef HAVE_SYS_WAIT_H
|
|
Packit |
575503 |
extern int wait(int *);
|
|
Packit |
575503 |
#endif
|
|
Packit |
575503 |
extern void _exit(int);
|
|
Packit |
575503 |
|
|
Packit |
575503 |
#undef aptr_t
|
|
Packit |
575503 |
|
|
Packit |
575503 |
#endif /* STDC_HEADERS */
|
|
Packit |
575503 |
|
|
Packit |
575503 |
|
|
Packit |
575503 |
/* prototypes for missing functions defined in missing_d/ */
|
|
Packit |
575503 |
|
|
Packit |
575503 |
#ifndef HAVE_STRNCASECMP
|
|
Packit |
575503 |
extern int strcasecmp(const char *s1, const char *s2);
|
|
Packit |
575503 |
extern int strncasecmp(const char *s1, const char *s2, register size_t n);
|
|
Packit |
575503 |
#endif
|
|
Packit |
575503 |
|
|
Packit |
575503 |
#ifndef HAVE_STRTOUL
|
|
Packit |
575503 |
extern unsigned long int strtoul(const char *, char **endptr, int base);
|
|
Packit |
575503 |
#endif
|
|
Packit |
575503 |
|
|
Packit |
575503 |
#ifndef HAVE_TZSET
|
|
Packit |
575503 |
extern void tzset();
|
|
Packit |
575503 |
#endif
|
|
Packit |
575503 |
|
|
Packit |
575503 |
#ifndef HAVE_MKTIME
|
|
Packit |
575503 |
extern time_t mktime(struct tm *tp);
|
|
Packit |
575503 |
#endif
|
|
Packit |
575503 |
|
|
Packit |
575503 |
#ifndef HAVE_SNPRINTF
|
|
Packit |
575503 |
extern int snprintf(char *restrict buf, size_t len, const char *restrict fmt, ...);
|
|
Packit |
575503 |
#endif
|
|
Packit |
575503 |
|
|
Packit |
575503 |
#ifndef HAVE_USLEEP
|
|
Packit |
575503 |
extern int usleep(unsigned int);
|
|
Packit |
575503 |
#endif
|
|
Packit |
575503 |
|
|
Packit |
575503 |
#ifndef HAVE_SETENV
|
|
Packit |
575503 |
extern int setenv(const char *, const char *, int);
|
|
Packit |
575503 |
extern int unsetenv(const char *);
|
|
Packit |
575503 |
#endif
|
|
Packit |
575503 |
|
|
Packit |
575503 |
#if !defined(HAVE_STRCOLL)
|
|
Packit |
575503 |
extern int strcoll(const char *, const char *);
|
|
Packit |
575503 |
#endif
|
|
Packit |
575503 |
|