diff options
Diffstat (limited to 'cddl/contrib/opensolaris/tools/ctf/cvt/ctfmerge.c')
-rw-r--r-- | cddl/contrib/opensolaris/tools/ctf/cvt/ctfmerge.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/cddl/contrib/opensolaris/tools/ctf/cvt/ctfmerge.c b/cddl/contrib/opensolaris/tools/ctf/cvt/ctfmerge.c index 2def4904..546dcdf 100644 --- a/cddl/contrib/opensolaris/tools/ctf/cvt/ctfmerge.c +++ b/cddl/contrib/opensolaris/tools/ctf/cvt/ctfmerge.c @@ -176,16 +176,22 @@ #include <unistd.h> #include <pthread.h> #include <assert.h> +#if defined(sun) #include <synch.h> +#endif #include <signal.h> #include <libgen.h> #include <string.h> #include <errno.h> +#if defined(sun) #include <alloca.h> +#endif #include <sys/param.h> #include <sys/types.h> #include <sys/mman.h> +#if defined(sun) #include <sys/sysconf.h> +#endif #include "ctf_headers.h" #include "ctftools.h" @@ -226,6 +232,7 @@ usage(void) progname, progname); } +#if defined(sun) static void bigheap(void) { @@ -273,6 +280,7 @@ bigheap(void) (void) memcntl(NULL, 0, MC_HAT_ADVISE, (caddr_t)&mha, 0, 0); } +#endif static void finalize_phase_one(workqueue_t *wq) @@ -595,10 +603,12 @@ terminate_cleanup(void) if (outfile == NULL) return; +#if !defined(__FreeBSD__) if (dounlink) { fprintf(stderr, "Removing %s\n", outfile); unlink(outfile); } +#endif } static void @@ -697,9 +707,15 @@ start_threads(workqueue_t *wq) wq); } +#if defined(sun) sigset(SIGINT, handle_sig); sigset(SIGQUIT, handle_sig); sigset(SIGTERM, handle_sig); +#else + signal(SIGINT, handle_sig); + signal(SIGQUIT, handle_sig); + signal(SIGTERM, handle_sig); +#endif pthread_sigmask(SIG_UNBLOCK, &sets, NULL); } |