summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormuffin <none@none>2005-10-19 15:27:38 -0700
committermuffin <none@none>2005-10-19 15:27:38 -0700
commitbe10f7d91e42e379302ee5ead703b5f0bf8b47c6 (patch)
treef5ca6d6cb43971f0d1f8d1092c901f133266947f
parentf1f2d3ff14a8e180130feab20f9f275d089dd99c (diff)
downloadillumos-gate-be10f7d91e42e379302ee5ead703b5f0bf8b47c6.tar.gz
6273899 gcc and cmd/sunpc don't get along
6309267 gcc and ucblib don't get along 6309383 gcc and aoutexec don't get along
-rw-r--r--usr/src/cmd/sunpc/other/dos2unix.c10
-rw-r--r--usr/src/cmd/sunpc/other/unix2dos.c10
-rw-r--r--usr/src/ucblib/libucb/sparc/sys/signal.c10
-rw-r--r--usr/src/uts/common/exec/aout/aout.c4
4 files changed, 15 insertions, 19 deletions
diff --git a/usr/src/cmd/sunpc/other/dos2unix.c b/usr/src/cmd/sunpc/other/dos2unix.c
index c381000489..5ad03f1036 100644
--- a/usr/src/cmd/sunpc/other/dos2unix.c
+++ b/usr/src/cmd/sunpc/other/dos2unix.c
@@ -20,7 +20,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 1999-2003 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -98,10 +98,8 @@ static int tmpfd = -1;
* ENTRY POINTS
******************************************************************************/
-
-void main(argc, argv)
-int argc;
-char **argv;
+int
+main(int argc, char **argv)
{
FILE *in_stream = NULL;
FILE *out_stream = NULL;
@@ -473,7 +471,7 @@ char **argv;
fclose(in_stream);
unlink(out_file_name);
}
- exit(0);
+ return (0);
}
void error(format, args)
diff --git a/usr/src/cmd/sunpc/other/unix2dos.c b/usr/src/cmd/sunpc/other/unix2dos.c
index 802c58c131..9845980e54 100644
--- a/usr/src/cmd/sunpc/other/unix2dos.c
+++ b/usr/src/cmd/sunpc/other/unix2dos.c
@@ -20,7 +20,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 1999-2003 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -99,10 +99,8 @@ static int tmpfd = -1;
* ENTRY POINTS
*/
-void
-main(argc, argv)
-int argc;
-char **argv;
+int
+main(int argc, char **argv)
{
FILE *in_stream = NULL;
FILE *out_stream = NULL;
@@ -479,7 +477,7 @@ char **argv;
fclose(in_stream);
unlink(out_file_name);
}
- exit(0);
+ return (0);
}
void
diff --git a/usr/src/ucblib/libucb/sparc/sys/signal.c b/usr/src/ucblib/libucb/sparc/sys/signal.c
index 4ade237db6..3e8d414f85 100644
--- a/usr/src/ucblib/libucb/sparc/sys/signal.c
+++ b/usr/src/ucblib/libucb/sparc/sys/signal.c
@@ -128,7 +128,7 @@ ucbsigvechandler(int sig, siginfo_t *sip, ucontext_t *ucp)
* on sparc machines. (5.x does not increment the PC.)
*/
ucp->uc_mcontext.gregs[REG_PC] =
- ucp->uc_mcontext.gregs[REG_nPC];
+ ucp->uc_mcontext.gregs[REG_nPC];
ucp->uc_mcontext.gregs[REG_nPC] += 4;
}
sc.sc_sp = ucp->uc_mcontext.gregs[REG_SP];
@@ -154,7 +154,7 @@ ucbsigvechandler(int sig, siginfo_t *sip, ucontext_t *ucp)
* ucontext_t isn't available to sigcleanup.
*/
sc.sc_wbcnt = (int)(sizeof (*ucp));
- sc.sc_spbuf[0] = (char *)sig;
+ sc.sc_spbuf[0] = (char *)(uintptr_t)sig;
sc.sc_spbuf[1] = (char *)ucp;
#ifdef NEVER
/*
@@ -347,7 +347,7 @@ __sigcleanup(struct sigcontext *scp)
* such as the original "out" registers when the signal occurred.
*/
if (scp->sc_wbcnt == sizeof (*ucp)) {
- sig = (int)scp->sc_spbuf[0];
+ sig = (int)(uintptr_t)scp->sc_spbuf[0];
ucp = (ucontext_t *)scp->sc_spbuf[1];
} else {
/*
@@ -510,7 +510,7 @@ ucbsigvec(int sig, struct sigvec *nvec, struct sigvec *ovec)
if (oact.sa_handler == SIG_DFL || oact.sa_handler == SIG_IGN)
ovec->sv_handler =
(void (*) (int, int, struct sigcontext *, char *))
- oact.sa_handler;
+ oact.sa_handler;
else
ovec->sv_handler = ohandler;
ovec->sv_mask = set2mask(&oact.sa_mask);
@@ -574,7 +574,7 @@ ucbsignal(int s, void (*a)(int)))(int)
if (nsv.sv_mask != osv.sv_mask || nsv.sv_flags != osv.sv_flags) {
mask[s] = nsv.sv_mask = osv.sv_mask;
flags[s] = nsv.sv_flags =
- osv.sv_flags & ~(SV_RESETHAND|SV_INTERRUPT);
+ osv.sv_flags & ~(SV_RESETHAND|SV_INTERRUPT);
if (ucbsigvec(s, &nsv, (struct sigvec *)0) < 0)
return (SIG_ERR);
}
diff --git a/usr/src/uts/common/exec/aout/aout.c b/usr/src/uts/common/exec/aout/aout.c
index dae94a9560..5c7b6b1773 100644
--- a/usr/src/uts/common/exec/aout/aout.c
+++ b/usr/src/uts/common/exec/aout/aout.c
@@ -20,7 +20,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 1990-2003 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -331,7 +331,7 @@ get_aout_head(struct vnode **vpp, struct exdata *edp, long *execsz, int *isdyn)
edp->ux_doffset = getdfile(&filhdr);
edp->ux_txtorg = gettmem(&filhdr);
edp->ux_datorg = getdmem(&filhdr);
- edp->ux_entloc = (caddr_t)filhdr.a_entry;
+ edp->ux_entloc = (caddr_t)(uintptr_t)filhdr.a_entry;
edp->vp = vp;
*isdyn = filhdr.a_dynamic;