__STDC__ is always defined on NetBSD.
This commit is contained in:
parent
738d04ecee
commit
143cf52f81
|
@ -1,26 +1,16 @@
|
|||
/* $NetBSD: Lint___syscall.c,v 1.1 2000/12/10 21:27:38 mycroft Exp $ */
|
||||
/* $NetBSD: Lint___syscall.c,v 1.2 2002/05/26 16:53:30 wiz Exp $ */
|
||||
|
||||
/*
|
||||
* This file placed in the public domain.
|
||||
* Chris Demetriou, November 5, 1997.
|
||||
*/
|
||||
|
||||
#include <unistd.h>
|
||||
#ifdef __STDC__
|
||||
#include <stdarg.h>
|
||||
#else
|
||||
#include <varargs.h>
|
||||
#endif
|
||||
#include <unistd.h>
|
||||
|
||||
/*ARGSUSED*/
|
||||
quad_t
|
||||
#ifdef __STDC__
|
||||
__syscall(quad_t arg1, ...)
|
||||
#else
|
||||
__syscall(arg1, va_alist)
|
||||
quad_t arg1;
|
||||
va_dcl
|
||||
#endif
|
||||
{
|
||||
return (0);
|
||||
}
|
||||
|
|
|
@ -1,26 +1,16 @@
|
|||
/* $NetBSD: Lint_syscall.c,v 1.2 2000/06/14 06:49:10 cgd Exp $ */
|
||||
/* $NetBSD: Lint_syscall.c,v 1.3 2002/05/26 16:53:30 wiz Exp $ */
|
||||
|
||||
/*
|
||||
* This file placed in the public domain.
|
||||
* Chris Demetriou, November 5, 1997.
|
||||
*/
|
||||
|
||||
#include <unistd.h>
|
||||
#ifdef __STDC__
|
||||
#include <stdarg.h>
|
||||
#else
|
||||
#include <varargs.h>
|
||||
#endif
|
||||
#include <unistd.h>
|
||||
|
||||
/*ARGSUSED*/
|
||||
int
|
||||
#ifdef __STDC__
|
||||
syscall(int arg1, ...)
|
||||
#else
|
||||
syscall(arg1, va_alist)
|
||||
int arg1;
|
||||
va_dcl
|
||||
#endif
|
||||
{
|
||||
return (0);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: __semctl13.c,v 1.3 2002/01/03 16:13:11 tron Exp $ */
|
||||
/* $NetBSD: __semctl13.c,v 1.4 2002/05/26 16:53:31 wiz Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2000 The NetBSD Foundation, Inc.
|
||||
|
@ -37,43 +37,26 @@
|
|||
*/
|
||||
#include <sys/cdefs.h>
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
__RCSID("$NetBSD: __semctl13.c,v 1.3 2002/01/03 16:13:11 tron Exp $");
|
||||
__RCSID("$NetBSD: __semctl13.c,v 1.4 2002/05/26 16:53:31 wiz Exp $");
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/ipc.h>
|
||||
#include <sys/sem.h>
|
||||
#if __STDC__
|
||||
#include <stdarg.h>
|
||||
#else
|
||||
#include <varargs.h>
|
||||
#endif
|
||||
|
||||
|
||||
/* The kernel version [... == union semun *] */
|
||||
int ____semctl13 __P((int, int, int, ...));
|
||||
/* The userland version [... == union semun] */
|
||||
int __semctl13 __P((int, int, int, ...));
|
||||
|
||||
#if __STDC__
|
||||
int __semctl13(int semid, int semnum, int cmd, ...)
|
||||
#else
|
||||
int __semctl13(va_alist)
|
||||
va_dcl
|
||||
#endif
|
||||
int
|
||||
__semctl13(int semid, int semnum, int cmd, ...)
|
||||
{
|
||||
va_list ap;
|
||||
union __semun semun;
|
||||
#if __STDC__
|
||||
|
||||
va_start(ap, cmd);
|
||||
#else
|
||||
int semid, semnum;
|
||||
int cmd;
|
||||
va_start(ap);
|
||||
semid = va_arg(ap, int);
|
||||
semnum = va_arg(ap, int);
|
||||
cmd = va_arg(ap, int);
|
||||
#endif
|
||||
switch (cmd) {
|
||||
case IPC_SET:
|
||||
case IPC_STAT:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: semctl.c,v 1.8 2000/06/14 17:25:07 cgd Exp $ */
|
||||
/* $NetBSD: semctl.c,v 1.9 2002/05/26 16:53:31 wiz Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1995 Christopher G. Demetriou
|
||||
|
@ -36,7 +36,7 @@
|
|||
|
||||
#include <sys/cdefs.h>
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
__RCSID("$NetBSD: semctl.c,v 1.8 2000/06/14 17:25:07 cgd Exp $");
|
||||
__RCSID("$NetBSD: semctl.c,v 1.9 2002/05/26 16:53:31 wiz Exp $");
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
#define __LIBC12_SOURCE__
|
||||
|
@ -45,14 +45,8 @@ __RCSID("$NetBSD: semctl.c,v 1.8 2000/06/14 17:25:07 cgd Exp $");
|
|||
#include <sys/ipc.h>
|
||||
#include <sys/sem.h>
|
||||
|
||||
#if __STDC__
|
||||
int semctl(int semid, int semnum, int cmd, union __semun semun)
|
||||
#else
|
||||
int semctl(semid, semnum, cmd, semun)
|
||||
int semid, semnum;
|
||||
int cmd;
|
||||
union __semun semun;
|
||||
#endif
|
||||
int
|
||||
semctl(int semid, int semnum, int cmd, union __semun semun)
|
||||
{
|
||||
return (__semctl(semid, semnum, cmd, &semun));
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ctrace.c,v 1.11 2001/09/24 13:22:30 wiz Exp $ */
|
||||
/* $NetBSD: ctrace.c,v 1.12 2002/05/26 17:01:38 wiz Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1992, 1993
|
||||
|
@ -38,18 +38,13 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)ctrace.c 8.2 (Berkeley) 10/5/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: ctrace.c,v 1.11 2001/09/24 13:22:30 wiz Exp $");
|
||||
__RCSID("$NetBSD: ctrace.c,v 1.12 2002/05/26 17:01:38 wiz Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
#ifdef DEBUG
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef __STDC__
|
||||
#include <stdarg.h>
|
||||
#else
|
||||
#include <varargs.h>
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
|
||||
#include <sys/time.h>
|
||||
#include <string.h>
|
||||
|
@ -64,13 +59,7 @@ __RCSID("$NetBSD: ctrace.c,v 1.11 2001/09/24 13:22:30 wiz Exp $");
|
|||
static FILE *tracefp; /* Curses debugging file descriptor. */
|
||||
|
||||
void
|
||||
#ifdef __STDC__
|
||||
__CTRACE(const char *fmt,...)
|
||||
#else
|
||||
__CTRACE(fmt, va_alist)
|
||||
char *fmt;
|
||||
va_dcl
|
||||
#endif
|
||||
{
|
||||
struct timeval tv;
|
||||
static int seencr = 1;
|
||||
|
@ -85,11 +74,7 @@ va_dcl
|
|||
gettimeofday(&tv, NULL);
|
||||
(void) fprintf(tracefp, "%lu.%06lu: ", tv.tv_sec, tv.tv_usec);
|
||||
}
|
||||
#ifdef __STDC__
|
||||
va_start(ap, fmt);
|
||||
#else
|
||||
va_start(ap);
|
||||
#endif
|
||||
(void) vfprintf(tracefp, fmt, ap);
|
||||
seencr = (strchr(fmt, '\n') != NULL);
|
||||
va_end(ap);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: printw.c,v 1.17 2001/09/24 13:22:30 wiz Exp $ */
|
||||
/* $NetBSD: printw.c,v 1.18 2002/05/26 17:01:38 wiz Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1981, 1993, 1994
|
||||
|
@ -38,24 +38,17 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)printw.c 8.3 (Berkeley) 5/4/94";
|
||||
#else
|
||||
__RCSID("$NetBSD: printw.c,v 1.17 2001/09/24 13:22:30 wiz Exp $");
|
||||
__RCSID("$NetBSD: printw.c,v 1.18 2002/05/26 17:01:38 wiz Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
#ifdef __STDC__
|
||||
#include <stdarg.h>
|
||||
#else
|
||||
#include <varargs.h>
|
||||
#endif
|
||||
|
||||
#include "curses.h"
|
||||
#include "curses_private.h"
|
||||
|
||||
/*
|
||||
* printw and friends.
|
||||
*
|
||||
* These routines make nonportable assumptions about varargs if __STDC__
|
||||
* is not in effect.
|
||||
*/
|
||||
|
||||
static int __winwrite __P((void *, const char *, int));
|
||||
|
@ -65,22 +58,12 @@ static int __winwrite __P((void *, const char *, int));
|
|||
* Printf on the standard screen.
|
||||
*/
|
||||
int
|
||||
#ifdef __STDC__
|
||||
printw(const char *fmt,...)
|
||||
#else
|
||||
printw(fmt, va_alist)
|
||||
const char *fmt;
|
||||
va_dcl
|
||||
#endif
|
||||
{
|
||||
va_list ap;
|
||||
int ret;
|
||||
|
||||
#ifdef __STDC__
|
||||
va_start(ap, fmt);
|
||||
#else
|
||||
va_start(ap);
|
||||
#endif
|
||||
ret = vwprintw(stdscr, fmt, ap);
|
||||
va_end(ap);
|
||||
return (ret);
|
||||
|
@ -90,23 +73,12 @@ va_dcl
|
|||
* Printf on the given window.
|
||||
*/
|
||||
int
|
||||
#ifdef __STDC__
|
||||
wprintw(WINDOW *win, const char *fmt,...)
|
||||
#else
|
||||
wprintw(win, fmt, va_alist)
|
||||
WINDOW *win;
|
||||
const char *fmt;
|
||||
va_dcl
|
||||
#endif
|
||||
{
|
||||
va_list ap;
|
||||
int ret;
|
||||
|
||||
#ifdef __STDC__
|
||||
va_start(ap, fmt);
|
||||
#else
|
||||
va_start(ap);
|
||||
#endif
|
||||
ret = vwprintw(win, fmt, ap);
|
||||
va_end(ap);
|
||||
return (ret);
|
||||
|
@ -117,40 +89,21 @@ va_dcl
|
|||
* arguments, they cannot be macros. Sigh....
|
||||
*/
|
||||
int
|
||||
#ifdef __STDC__
|
||||
mvprintw(int y, int x, const char *fmt,...)
|
||||
#else
|
||||
mvprintw(y, x, fmt, va_alist)
|
||||
int y, x;
|
||||
const char *fmt;
|
||||
va_dcl
|
||||
#endif
|
||||
{
|
||||
va_list ap;
|
||||
int ret;
|
||||
|
||||
if (move(y, x) != OK)
|
||||
return (ERR);
|
||||
#ifdef __STDC__
|
||||
va_start(ap, fmt);
|
||||
#else
|
||||
va_start(ap);
|
||||
#endif
|
||||
ret = vwprintw(stdscr, fmt, ap);
|
||||
va_end(ap);
|
||||
return (ret);
|
||||
}
|
||||
|
||||
int
|
||||
#ifdef __STDC__
|
||||
mvwprintw(WINDOW * win, int y, int x, const char *fmt,...)
|
||||
#else
|
||||
mvwprintw(win, y, x, fmt, va_alist)
|
||||
WINDOW *win;
|
||||
int y, x;
|
||||
const char *fmt;
|
||||
va_dcl
|
||||
#endif
|
||||
{
|
||||
va_list ap;
|
||||
int ret;
|
||||
|
@ -158,11 +111,7 @@ va_dcl
|
|||
if (wmove(win, y, x) != OK)
|
||||
return (ERR);
|
||||
|
||||
#ifdef __STDC__
|
||||
va_start(ap, fmt);
|
||||
#else
|
||||
va_start(ap);
|
||||
#endif
|
||||
ret = vwprintw(win, fmt, ap);
|
||||
va_end(ap);
|
||||
return (ret);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: scanw.c,v 1.15 2000/12/30 17:20:55 martin Exp $ */
|
||||
/* $NetBSD: scanw.c,v 1.16 2002/05/26 17:01:38 wiz Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1981, 1993, 1994
|
||||
|
@ -38,7 +38,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)scanw.c 8.3 (Berkeley) 5/4/94";
|
||||
#else
|
||||
__RCSID("$NetBSD: scanw.c,v 1.15 2000/12/30 17:20:55 martin Exp $");
|
||||
__RCSID("$NetBSD: scanw.c,v 1.16 2002/05/26 17:01:38 wiz Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -46,11 +46,7 @@ __RCSID("$NetBSD: scanw.c,v 1.15 2000/12/30 17:20:55 martin Exp $");
|
|||
* scanw and friends.
|
||||
*/
|
||||
|
||||
#ifdef __STDC__
|
||||
#include <stdarg.h>
|
||||
#else
|
||||
#include <varargs.h>
|
||||
#endif
|
||||
|
||||
#include "curses.h"
|
||||
|
||||
|
@ -59,22 +55,12 @@ __RCSID("$NetBSD: scanw.c,v 1.15 2000/12/30 17:20:55 martin Exp $");
|
|||
* Implement a scanf on the standard screen.
|
||||
*/
|
||||
int
|
||||
#ifdef __STDC__
|
||||
scanw(const char *fmt,...)
|
||||
#else
|
||||
scanw(fmt, va_alist)
|
||||
const char *fmt;
|
||||
va_dcl
|
||||
#endif
|
||||
{
|
||||
va_list ap;
|
||||
int ret;
|
||||
|
||||
#ifdef __STDC__
|
||||
va_start(ap, fmt);
|
||||
#else
|
||||
va_start(ap);
|
||||
#endif
|
||||
ret = vwscanw(stdscr, fmt, ap);
|
||||
va_end(ap);
|
||||
return (ret);
|
||||
|
@ -84,23 +70,12 @@ va_dcl
|
|||
* Implements a scanf on the given window.
|
||||
*/
|
||||
int
|
||||
#ifdef __STDC__
|
||||
wscanw(WINDOW *win, const char *fmt,...)
|
||||
#else
|
||||
wscanw(win, fmt, va_alist)
|
||||
WINDOW *win;
|
||||
const char *fmt;
|
||||
va_dcl
|
||||
#endif
|
||||
{
|
||||
va_list ap;
|
||||
int ret;
|
||||
|
||||
#ifdef __STDC__
|
||||
va_start(ap, fmt);
|
||||
#else
|
||||
va_start(ap);
|
||||
#endif
|
||||
ret = vwscanw(win, fmt, ap);
|
||||
va_end(ap);
|
||||
return (ret);
|
||||
|
@ -111,51 +86,28 @@ va_dcl
|
|||
* arguments, they cannot be macros. Another sigh....
|
||||
*/
|
||||
int
|
||||
#ifdef __STDC__
|
||||
mvscanw(int y, int x, const char *fmt,...)
|
||||
#else
|
||||
mvscanw(y, x, fmt, va_alist)
|
||||
int y, x;
|
||||
const char *fmt;
|
||||
va_dcl
|
||||
#endif
|
||||
{
|
||||
va_list ap;
|
||||
int ret;
|
||||
|
||||
if (move(y, x) != OK)
|
||||
return (ERR);
|
||||
#ifdef __STDC__
|
||||
va_start(ap, fmt);
|
||||
#else
|
||||
va_start(ap);
|
||||
#endif
|
||||
ret = vwscanw(stdscr, fmt, ap);
|
||||
va_end(ap);
|
||||
return (ret);
|
||||
}
|
||||
|
||||
int
|
||||
#ifdef __STDC__
|
||||
mvwscanw(WINDOW * win, int y, int x, const char *fmt,...)
|
||||
#else
|
||||
mvwscanw(win, y, x, fmt, va_alist)
|
||||
WINDOW *win;
|
||||
int y, x;
|
||||
const char *fmt;
|
||||
va_dcl
|
||||
#endif
|
||||
{
|
||||
va_list ap;
|
||||
int ret;
|
||||
|
||||
if (move(y, x) != OK)
|
||||
return (ERR);
|
||||
#ifdef __STDC__
|
||||
va_start(ap, fmt);
|
||||
#else
|
||||
va_start(ap);
|
||||
#endif
|
||||
ret = vwscanw(win, fmt, ap);
|
||||
va_end(ap);
|
||||
return (ret);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: tscroll.c,v 1.9 2000/04/27 00:27:56 jdc Exp $ */
|
||||
/* $NetBSD: tscroll.c,v 1.10 2002/05/26 17:01:38 wiz Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1992, 1993, 1994
|
||||
|
@ -40,7 +40,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)tscroll.c 8.4 (Berkeley) 7/27/94";
|
||||
#else
|
||||
__RCSID("$NetBSD: tscroll.c,v 1.9 2000/04/27 00:27:56 jdc Exp $");
|
||||
__RCSID("$NetBSD: tscroll.c,v 1.10 2002/05/26 17:01:38 wiz Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -81,13 +81,7 @@ __tscroll(const char *cap, int n1, int n2)
|
|||
* is also defined but we don't support it (yet).
|
||||
*/
|
||||
char *
|
||||
#if __STDC__
|
||||
__parse_cap (char const *cap, ...)
|
||||
#else
|
||||
__parse_cap (cap, va_alist)
|
||||
const char *cap;
|
||||
va_dcl
|
||||
#endif
|
||||
{
|
||||
va_list ap;
|
||||
static char result[MAXRETURNSIZE];
|
||||
|
@ -95,11 +89,7 @@ __parse_cap (cap, va_alist)
|
|||
char *dp;
|
||||
int have_input;
|
||||
|
||||
#if __STDC__
|
||||
va_start (ap, cap);
|
||||
#else
|
||||
va_start(ap);
|
||||
#endif
|
||||
n = 0; /* XXX gcc -Wuninitialized */
|
||||
|
||||
if (cap == NULL)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: kstream.c,v 1.3 2001/11/05 15:01:02 lukem Exp $ */
|
||||
/* $NetBSD: kstream.c,v 1.4 2002/05/26 17:04:44 wiz Exp $ */
|
||||
|
||||
/* Encrypted-stream implementation for MIT Kerberos.
|
||||
Written by Ken Raeburn (Raeburn@Cygnus.COM).
|
||||
|
@ -53,19 +53,8 @@
|
|||
#endif
|
||||
|
||||
#include <kerberosIV/kstream.h>
|
||||
#ifdef __STDC__
|
||||
int krb_net_write (int, char *, int);
|
||||
int krb_net_read (int, char *, int);
|
||||
#else
|
||||
int krb_net_write ();
|
||||
int krb_net_read ();
|
||||
void abort ();
|
||||
char *memmove ();
|
||||
void *memcpy ();
|
||||
char *malloc ();
|
||||
char *realloc ();
|
||||
void free ();
|
||||
#endif
|
||||
|
||||
#ifdef sun
|
||||
#ifndef solaris20
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
For copying and distribution information, please see the file
|
||||
<mit-copyright.h>.
|
||||
|
||||
$NetBSD: kstream.h,v 1.1.1.1 2000/06/17 06:24:28 thorpej Exp $
|
||||
$NetBSD: kstream.h,v 1.2 2002/05/26 17:04:44 wiz Exp $
|
||||
*/
|
||||
|
||||
#include <sys/types.h> /* for size_t */
|
||||
|
@ -15,11 +15,7 @@
|
|||
requested, output will be flushed before input is read, or when
|
||||
kstream_flush is called. */
|
||||
|
||||
#if defined (__STDC__) || defined (__cplusplus)
|
||||
typedef void *kstream_ptr;
|
||||
#else
|
||||
typedef char *kstream_ptr;
|
||||
#endif
|
||||
typedef struct kstream_rec *kstream;
|
||||
struct kstream_data_block {
|
||||
kstream_ptr ptr;
|
||||
|
@ -31,7 +27,6 @@ struct kstream_crypt_ctl_block {
|
|||
Right now, it's just a hack so we can bang out the interface
|
||||
in some form that lets us run both rcp and rlogin. This is also
|
||||
the only reason the contents of this structure are public. */
|
||||
#if defined (__STDC__) || defined (__cplusplus)
|
||||
int (*encrypt) (struct kstream_data_block *, /* output -- written */
|
||||
struct kstream_data_block*, /* input */
|
||||
kstream str
|
||||
|
@ -42,14 +37,9 @@ struct kstream_crypt_ctl_block {
|
|||
); /* ret val = # input bytes used */
|
||||
int (*init) (kstream str, kstream_ptr data);
|
||||
void (*destroy) (kstream str);
|
||||
#else
|
||||
int (*encrypt) (), (*decrypt) (), (*init) ();
|
||||
void (*destroy) ();
|
||||
#endif
|
||||
};
|
||||
|
||||
/* ctl==0 means no encryption. data is specific to crypt functions */
|
||||
#if defined (__STDC__) || defined (__cplusplus)
|
||||
kstream kstream_create_from_fd (int fd,
|
||||
const struct kstream_crypt_ctl_block *ctl,
|
||||
kstream_ptr data);
|
||||
|
@ -64,21 +54,11 @@ int kstream_read (kstream, void*, size_t);
|
|||
int kstream_flush (kstream);
|
||||
int kstream_destroy (kstream);
|
||||
void kstream_set_buffer_mode (kstream, int);
|
||||
#else
|
||||
kstream kstream_create_from_fd (),
|
||||
kstream_create_rlogin_from_fd (),
|
||||
kstream_create_rcp_from_fd ();
|
||||
void kstream_set_buffer_mode ();
|
||||
#endif
|
||||
|
||||
#if 0 /* Perhaps someday... */
|
||||
kstream kstream_create (principal, host, port, ...);
|
||||
#endif
|
||||
|
||||
#if !defined (__STDC__) && !defined (__cplusplus) && !defined (const)
|
||||
#define const /* empty */
|
||||
#endif
|
||||
|
||||
typedef struct fifo {
|
||||
char data[10*1024];
|
||||
size_t next_write, next_read;
|
||||
|
|
Loading…
Reference in New Issue