summaryrefslogtreecommitdiff
path: root/sysdeps/unix/bsd/sun
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/bsd/sun')
-rw-r--r--sysdeps/unix/bsd/sun/m68k/sigtramp.c25
-rw-r--r--sysdeps/unix/bsd/sun/sparc/sigtramp.c29
-rw-r--r--sysdeps/unix/bsd/sun/sunos4/speed.c29
-rw-r--r--sysdeps/unix/bsd/sun/sunos4/tcsetattr.c11
4 files changed, 51 insertions, 43 deletions
diff --git a/sysdeps/unix/bsd/sun/m68k/sigtramp.c b/sysdeps/unix/bsd/sun/m68k/sigtramp.c
index 32a2c2047e..db9ffb5135 100644
--- a/sysdeps/unix/bsd/sun/m68k/sigtramp.c
+++ b/sysdeps/unix/bsd/sun/m68k/sigtramp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1996 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
@@ -16,8 +16,6 @@ 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>
-
#ifndef __GNUC__
#error This file uses GNU C extensions; you must compile with GCC.
#endif
@@ -52,8 +50,8 @@ Cambridge, MA 02139, USA. */
#include <errno.h>
/* Defined in __sigvec.S. */
-extern int EXFUN(__raw_sigvec, (int sig, CONST struct sigvec *vec,
- struct sigvec *ovec));
+extern int __raw_sigvec (int sig, const struct sigvec *vec,
+ struct sigvec *ovec);
/* User-specified signal handlers. */
#define mytramp 1
@@ -70,8 +68,11 @@ extern __sighandler_t _sigfunc[];
Saves and restores the general regs %g2-%g7, the %y register, and
all the FPU regs (including %fsr), around calling the user's handler. */
static void
-DEFUN(trampoline, (sig, code, context, addr),
- int sig AND int code AND struct sigcontext *context AND PTR addr)
+trampoline (sig, code, context, addr)
+ int sig;
+ int code;
+ struct sigcontext *context;
+ void *addr;
{
int save[4];
@@ -81,7 +82,7 @@ DEFUN(trampoline, (sig, code, context, addr),
/* XXX should save/restore FP regs */
/* Call the user's handler. */
- (*((void EXFUN((*), (int sig, int code, struct sigcontext *context,
+ (*((void (*) __P ((int sig, int code, struct sigcontext *context,
PTR addr))) handlers[sig]))
(sig, code, context, addr);
@@ -95,8 +96,10 @@ DEFUN(trampoline, (sig, code, context, addr),
#endif
int
-DEFUN(__sigvec, (sig, vec, ovec),
- int sig AND CONST struct sigvec *vec AND struct sigvec *ovec)
+__sigvec (sig, vec, ovec)
+ int sig;
+ const struct sigvec *vec;
+ struct sigvec *ovec;
{
#ifndef mytramp
extern void _sigtramp (int);
@@ -108,7 +111,7 @@ DEFUN(__sigvec, (sig, vec, ovec),
if (sig <= 0 || sig >= NSIG)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
diff --git a/sysdeps/unix/bsd/sun/sparc/sigtramp.c b/sysdeps/unix/bsd/sun/sparc/sigtramp.c
index 54f62933a8..11ce1945ff 100644
--- a/sysdeps/unix/bsd/sun/sparc/sigtramp.c
+++ b/sysdeps/unix/bsd/sun/sparc/sigtramp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1994, 1996 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
@@ -16,8 +16,6 @@ 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>
-
#ifndef __GNUC__
#error This file uses GNU C extensions; you must compile with GCC.
#endif
@@ -52,8 +50,8 @@ Cambridge, MA 02139, USA. */
#include <errno.h>
/* Defined in __sigvec.S. */
-extern int EXFUN(__raw_sigvec, (int sig, CONST struct sigvec *vec,
- struct sigvec *ovec));
+extern int __raw_sigvec __P ((int sig, CONST struct sigvec *vec,
+ struct sigvec *ovec));
/* User-specified signal handlers. */
#define mytramp 1
@@ -70,7 +68,8 @@ extern __sighandler_t _sigfunc[];
Saves and restores the general regs %g2-%g7, the %y register, and
all the FPU regs (including %fsr), around calling the user's handler. */
static void
-DEFUN(trampoline, (sig), int sig)
+trampoline (sig)
+ int sig;
{
/* We use `double' and `long long int' so `std' (store doubleword) insns,
which might be faster than single-word stores, will be generated. */
@@ -97,7 +96,7 @@ DEFUN(trampoline, (sig), int sig)
int code;
register struct sigcontext *context asm("%i0"); /* See end of fn. */
- PTR addr;
+ void *addr;
int y;
double fpsave[16];
int fsr;
@@ -147,8 +146,8 @@ DEFUN(trampoline, (sig), int sig)
glsave[2] = g6;
/* Call the user's handler. */
- (*((void EXFUN((*), (int sig, int code, struct sigcontext *context,
- PTR addr))) handlers[sig]))
+ (*((void (*) __P ((int sig, int code, struct sigcontext *context,
+ void *addr))) handlers[sig]))
(sig, code, context, addr);
/* Restore the Y register. */
@@ -199,8 +198,10 @@ DEFUN(trampoline, (sig), int sig)
#endif
int
-DEFUN(__sigvec, (sig, vec, ovec),
- int sig AND CONST struct sigvec *vec AND struct sigvec *ovec)
+__sigvec (sig, vec, ovec)
+ int sig;
+ const struct sigvec *vec;
+ struct sigvec *ovec;
{
#ifndef mytramp
extern void _sigtramp (int);
@@ -212,11 +213,11 @@ DEFUN(__sigvec, (sig, vec, ovec),
if (sig <= 0 || sig >= NSIG)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
- mask = __sigblock(sigmask(sig));
+ mask = __sigblock (sigmask(sig));
ohandler = handlers[sig];
@@ -240,7 +241,7 @@ DEFUN(__sigvec, (sig, vec, ovec),
if (ovec != NULL && ovec->sv_handler == trampoline)
ovec->sv_handler = ohandler;
- (void) __sigsetmask(mask);
+ (void) __sigsetmask (mask);
return 0;
}
diff --git a/sysdeps/unix/bsd/sun/sunos4/speed.c b/sysdeps/unix/bsd/sun/sunos4/speed.c
index 1c09d55dab..de6870a51d 100644
--- a/sysdeps/unix/bsd/sun/sunos4/speed.c
+++ b/sysdeps/unix/bsd/sun/sunos4/speed.c
@@ -1,5 +1,5 @@
/* `struct termios' speed frobnication functions. SunOS 4 version.
-Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
+Copyright (C) 1991, 1992, 1993, 1996 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
@@ -17,12 +17,11 @@ 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 <stddef.h>
#include <errno.h>
#include <termios.h>
-static CONST speed_t speeds[] =
+static const speed_t speeds[] =
{
0,
50,
@@ -45,28 +44,31 @@ static CONST speed_t speeds[] =
/* Return the output baud rate stored in *TERMIOS_P. */
speed_t
-DEFUN(cfgetospeed, (termios_p), CONST struct termios *termios_p)
+cfgetospeed (termios_p)
+ const struct termios *termios_p;
{
return termios_p->c_cflag & CBAUD;
}
/* Return the input baud rate stored in *TERMIOS_P. */
speed_t
-DEFUN(cfgetispeed, (termios_p), CONST struct termios *termios_p)
+cfgetispeed (termios_p)
+ const struct termios *termios_p;
{
return (termios_p->c_cflag & CIBAUD) >> IBSHIFT;
}
/* Set the output baud rate stored in *TERMIOS_P to SPEED. */
int
-DEFUN(cfsetospeed, (termios_p, speed),
- struct termios *termios_p AND speed_t speed)
+cfsetospeed (termios_p, speed)
+ struct termios *termios_p;
+ speed_t speed;
{
register unsigned int i;
if (termios_p == NULL)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
@@ -82,20 +84,21 @@ DEFUN(cfsetospeed, (termios_p, speed),
return 0;
}
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
/* Set the input baud rate stored in *TERMIOS_P to SPEED. */
int
-DEFUN(cfsetispeed, (termios_p, speed),
- struct termios *termios_p AND speed_t speed)
+cfsetispeed (termios_p, speed)
+ struct termios *termios_p;
+ speed_t speed;
{
register unsigned int i;
if (termios_p == NULL)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
@@ -108,6 +111,6 @@ DEFUN(cfsetispeed, (termios_p, speed),
return 0;
}
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
diff --git a/sysdeps/unix/bsd/sun/sunos4/tcsetattr.c b/sysdeps/unix/bsd/sun/sunos4/tcsetattr.c
index f88951ff9d..f825d41ab8 100644
--- a/sysdeps/unix/bsd/sun/sunos4/tcsetattr.c
+++ b/sysdeps/unix/bsd/sun/sunos4/tcsetattr.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1996 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
@@ -16,7 +16,6 @@ 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 <stddef.h>
#include <termios.h>
@@ -24,8 +23,10 @@ Cambridge, MA 02139, USA. */
/* Set the state of FD to *TERMIOS_P. */
int
-DEFUN(tcsetattr, (fd, optional_actions, termios_p),
- int fd AND int optional_actions AND CONST struct termios *termios_p)
+tcsetattr (fd, optional_actions, termios_p)
+ int fd;
+ int optional_actions;
+ const struct termios *termios_p;
{
unsigned long cmd;
@@ -41,7 +42,7 @@ DEFUN(tcsetattr, (fd, optional_actions, termios_p),
cmd = TCSETSF;
break;
default:
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}