[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Axiom-developer] Re: MAC OSX port

From: Martin Snelgrove
Subject: [Axiom-developer] Re: MAC OSX port
Date: Mon, 14 Feb 2005 19:11:15 -0500


I'll split my response into a couple of mails, to reduce my own confusion. Here's the result of looking around in my
Mac 10.3.8 +Fink + darwinports for sigaction in includes. Next mail runs the requested compile.

sigaction appears in /usr/include/signal.h and also /usr/include/sys/signal.h (which have the Apple&BSD license stuff at the top):
I'll paste in extracts in the general area below. Re Fink, I didn't find it in grepping /sw/include/*.h, and there is no /sw/include/sys.

I see -I/usr/include/sys but not -I/usr/include in the transcript file.

As to Fink; first off I should point out that there's also the "" project, which I believe puts things in /opt. Here's
a clip of me looking for signal.h in both /opt and /sw:

include $ find /opt -name signal.h
include $ find /sw -name signal.h

which I interpret to mean that the Fink gcc and g77 compilers have their own ideas about signal.h, or don't trust Apple.


here's the head of /usr/include/signal.h after the comments:

#ifndef _USER_SIGNAL_H
#define _USER_SIGNAL_H

#include <sys/types.h>
#include <sys/cdefs.h>
#include <sys/signal.h>

#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE)
extern __const char *__const sys_signame[NSIG];
extern __const char *__const sys_siglist[NSIG];

int raise(int);
#ifndef _ANSI_SOURCE
int kill(pid_t, int);
int sigaction(int, const struct sigaction *, struct sigaction *);

--------------------- CUT -------------------------------

and here's the piece in /usr/include/sys/signal.h

/* union for signal handlers */
union __sigaction_u {
void (*__sa_handler)(int);
void (*__sa_sigaction)(int, struct __siginfo *,
void *);

/* Signal vector template for Kernel user boundary */
struct __sigaction {
union __sigaction_u __sigaction_u; /* signal handler */
void (*sa_tramp)(void *, int, int, siginfo_t *, void *);
sigset_t sa_mask; /* signal mask to apply */
int sa_flags; /* see signal options below */

* Signal vector "template" used in sigaction call.
struct sigaction {
union __sigaction_u __sigaction_u; /* signal handler */
sigset_t sa_mask; /* signal mask to apply */
int sa_flags; /* see signal options below */
/* if SA_SIGINFO is set, sa_sigaction is to be used instead of sa_handler. */
#define sa_handler __sigaction_u.__sa_handler
#define sa_sigaction __sigaction_u.__sa_sigaction

On Feb 14, 2005, at 01.19, root wrote:


It appears from the warning messages that there are incomplete include files.
The message:

bsdsignal.c:68: warning: implicit declaration of function `sigaction'

implies that there was no declaration of the 'sigaction' function. The
declarations are normally in include files and sigaction is fundamental
so it would come from a system include file. From your environment strings
I can see the options for the CCFLAGS and it appears that the include
files are all found but they don't seem to declare sigaction.

Please try the following and send the output:

cd /Users/snelgar/downloads/axiom/int/lib
gcc -E -Wall -D_GNU_SOURCE -DMACOSXplatform -I/usr/X11/include -I/usr/include/sys bsdsignal.c

The -E flag run the preprocessor and inline all of the include files.
If sigaction is not declared then we have to figure out where the MAC
would hide the declaration.

Does Fink have a special directory which has include files?
If so, grep for sigaction and let me know what files contain it.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]