c++ grab in position signal

More
30 Aug 2014 18:03 - 30 Aug 2014 21:24 #50512 by ArcEye
Replied by ArcEye on topic c++ grab in position signal
Should be quite simple.

Just read the whole file into memory, an array of char buff[80] say, allocated dynamically according to the size of the file, then you can just read it with an incrementing index.

If you have different files for different positions, just means multi-dimensional arrays, one index for the physical position and another for the position in the file for that place.

Mine was just a very simple example, to show that feeding lines through a component worked.

regards
Last edit: 30 Aug 2014 21:24 by ArcEye.
The following user(s) said Thank You: bkt

Please Log in or Create an account to join the conversation.

More
30 Aug 2014 21:27 #50520 by ArcEye
Replied by ArcEye on topic c++ grab in position signal
This is a simple example of what I mean, using the previous example as the basis.
It is just using a single dimemsional array of char* each holding a line from the file.

It compiles, but I haven't had time to test it
component mdipump2                     "This component reads a file and pushes MDI commands to Linuxcnc";

pin in bit commandfinished = 0        "signal last command completed - connect to motion.in-position";
pin in bit homed = 0                  "signal that machine is homed and ready for commands - connect to last axis to home - halui.joint.2.is-homed";
pin in bit machineon = 0              "signal to ensure machine is on - connect to halui.machine.is-on"; 
option singleton yes;               
option userspace yes;

author "ArcEye <arceyeATmgwareDOTcoDOTuk>";
license "GPL";
;;

#include <stdio.h>    /* Standard input/output definitions */
#include <stdlib.h> 
#include <stdint.h>   /* Standard types */
#include <string.h>   /* String function definitions */
#include <unistd.h>   /* UNIX standard function definitions */
#include <fcntl.h>    /* File control definitions */
#include <errno.h>    /* Error number definitions */
#include <signal.h>
#include <pwd.h>

int done = 0;

void adios(int sig) { done = 1; }


void user_mainloop(void)
{
char filepath[80];
int progress = 0;
char line[80];
char cmdline[80];
char *linearray[20];  // max 20 lines to keep it simple
char *lineptr;

    // get user home dir
struct passwd *pw = getpwuid(getuid());
const char *homedir = pw->pw_dir;

sprintf(filepath, "%s/linuxcnc/gcode.ngc", homedir);
FILE *fp1;
fp1 = fopen(filepath, "r");
int arraylen = 0, arrayindex = 0;

while(!feof(fp1))
    {
    fgets(line, sizeof(line), fp1);     
    lineptr = (char *)malloc(sizeof(line) + 1);
    memcpy(lineptr, line, sizeof(line));    
    linearray[arraylen++] = lineptr;
    }
    
signal(SIGINT, adios);
signal(SIGTERM, adios);
      
    while(!done)
        {
        usleep(250000);
        
        FOR_ALL_INSTS()  
            { 
            if(homed && machineon)
                {
                switch(progress)
                    {
                    case 0: 
                            if(arrayindex <= arraylen)
                                {
                                memcpy(line, linearray[arrayindex], sizeof(linearray[arrayindex]));  
                                arrayindex++;
                                fprintf(stderr,"Line:- %s ", line);// debug
                                sprintf(cmdline, "axis-remote --mdi '%s'", line);
                                system(cmdline);
                                progress = 1;
                                break;
                                }
                            else
                                {
                                done = 1;
                                fprintf(stderr,"Output completed");
                                break;
                                }
                
                    case 1: if(!commandfinished)
                                break;
                            else
                                progress = 0;
                        
                    default:
                            break;               
                
                    }
                }
            }
        }
    exit(0);
}
The following user(s) said Thank You: bkt

Please Log in or Create an account to join the conversation.

More
01 Sep 2014 23:28 #50583 by andypugh

the idea of ​​reading an external file to mycomponent.comp is very good but does not work in my case.
In fact in my case I write only one xyz position at a time.
This means that at each new location, the system waits the time of writing and reading of the pc. This generates a time when the axes are still waiting for a new command.
I need a lot lower this time.


It is possible that you don't want to use the G-code interpreter at all.

A userspace component that calculates axis positions can command axis moves directly.

But even that might be too high-level. It is perfectly possible to pass axis positions directly to stepgen (for example) and just have the motors go there. The internal acell and velocity limits mean that stepgen is itself a very simple motion planner for one axis at a time.

If your code is calculating positions on the fly, then outputting those positions directly to HAL can work.

Please Log in or Create an account to join the conversation.

More
03 Sep 2014 20:17 #50685 by bkt
Replied by bkt on topic c++ grab in position signal
sorry for late reply .... but I have my holiday.

to in an attempt to follow the ideas that came from the suggestions of ArkEye ... I mek this code on new mycomp
#ifdef RTAPI
#define _POSIX_C_SOURCE 
#include "rtapi_math.h"
#include "rtapi.h"		/* RTAPI realtime OS API */
#include "rtapi_app.h"		/* RTAPI realtime module decls */
#include "hal.h"
#include <linux/unistd.h>
#include <linux/posix_types.h>
#include <linux/types.h>
#include <linux/signal.h>




void myMDIrow ( int idp){ 
    idp = 3012;
    if (*(haldata->sig1)) {kill(idp, SIGUSR1);}
    /*return */
}

#endif

this is incomplete and put the pid of my applycation manually now ... it's only a test ..... I grab motion.in-position signal by hal and transform it in to UNIX signal USR1 ... In my QT application I use this signal to generate new mdi row with xyz pos and send it to linuxcnc ..... every new motion.in-position send a new mdi row ....

Unfortunately, I have this error during compilation:
error: implicit declaration of function ‘kill’

I don't Know how to solve this ....
-D_POSIX_C_SOURCE
flag is not a solution ... I need some suggestion ....

@ andypugh ..... thanks ... But eventually I should send positions found directly to mydeltakins-withlimitfunc.comp .... I think is possible pass the position to hal and than to mydeltakins-withlimitfunc.comp but how to? .... how to send new position to hal from qt program? Is possible to comunicate with deltakins.comp whit a standard C/C++ pipe?

Please Log in or Create an account to join the conversation.

More
03 Sep 2014 22:37 #50691 by ArcEye
Replied by ArcEye on topic c++ grab in position signal
Hi

kill() seems to be one system command that varies from system to system and kernel version to version

This is a simple program adapted from the GNU examples which builds and runs on Wheezy 3.2.0-4-rt-amd64

You don't need <sys/posix_types.h> just these headers and don't have to set _POSIX_C_SOURCE
#include <stdlib.h> 
    #include <stdint.h>   /* Standard types */
    #include <string.h>   /* String function definitions */
    #include <fcntl.h>    /* File control definitions */
    #include <errno.h>    /* Error number definitions */

     
     #include <signal.h>
     #include <stdio.h>
     #include <sys/types.h>
     #include <unistd.h>
     
     /* When a SIGUSR1 signal arrives, set this variable. */
     volatile sig_atomic_t usr_interrupt = 0;
     
     void
     synch_signal (int sig)
     {
       usr_interrupt = 1;
     }
     
     /* The child process executes this function. */
     void
     child_function (void)
     {
       /* Perform initialization. */
       printf ("I'm here!!!  My pid is %d.\n", (int) getpid ());
     
       /* Let parent know you're done. */
       kill (getppid (), SIGUSR1);
     
       /* Continue with execution. */
       puts ("Bye, now....");
       exit (0);
     }
     
     int
     main (void)
     {
       struct sigaction usr_action;
       sigset_t block_mask;
       pid_t child_id;
     
       /* Establish the signal handler. */
       sigfillset (&block_mask);
       usr_action.sa_handler = synch_signal;
       usr_action.sa_mask = block_mask;
       usr_action.sa_flags = 0;
       sigaction (SIGUSR1, &usr_action, NULL);
     
       /* Create the child process. */
       child_id = fork ();
       if (child_id == 0)
         child_function ();          /* Does not return. */
     
       /* Busy wait for the child to send a signal. */
       while (!usr_interrupt)
         ;
     
       /* Now continue execution. */
       puts ("That's all, folks!");
     
       return 0;
     }

Be aware that after kernels 2.6.38 ish, the headers started to be moved around

Both Wheezy and Ubuntu 12.04 have a directory called /usr/include/x86_64_linux_gnu (or i386_linux_gnu depending upon system type)

This directory contains /sys /bits /asm etc

I always symlink the contents back to the parent directory or a lot of older code will not build.

regards
The following user(s) said Thank You: bkt

Please Log in or Create an account to join the conversation.

More
04 Sep 2014 22:25 - 04 Sep 2014 22:51 #50766 by bkt
Replied by bkt on topic c++ grab in position signal
First - I use ubuntu 10.04.... second - Sorry but I have some real problem with my idea .... I create a new myUNIXsignal-sender.c and I install it with:
sudo comp --install '/home/k1/linuxcnc/myUNIXsignal-sender.c'

The code that I use is only for testing ..... I don't now if is correctly written ... i Think is only a botched ..... but I use it for some experiments ....
/*#define _POSIX_C_SOURCE*/
/*#include "kinematics.h"*/             /* these decls */
#include "rtapi_math.h"
#include "rtapi.h"		/* RTAPI realtime OS API */
#include "rtapi_app.h"		/* RTAPI realtime module decls */
#include "hal.h"
/*#include "stdint.h"
#include "stdlib.h"
#include "fcntl.h"
#include "string.h"
#include "sys/types.h"
#include "signal.h"
#include "stdio.h"
#include "unistd.h"*/
/*#include </usr/include/stdio.h>    
#include </usr/include/stdlib.h> 
#include </usr/include/stdint.h>   */
/*#include "stdint.h"
#include "stdlib.h"*/
/*#include "linux/fcntl.h"
#include "linux/string.h"  
#include <linux/unistd.h>  
#include <linux/fcntl.h>   
#include <linux/errno.h>    
#include <linux/types.h>
#include "linux/signal.h"*/
/*#include "fcntl.h"
#include "string.h"
#include "unistd.h"  
#include "fcntl.h"   
#include "errno.h"    
#include "sys/types.h"
#include "stdio.h"
#include "unistd.h"*/
/*#include "signal.h"*/


struct haldata {  hal_bit_t *sig1, *sig2;
} *haldata = 0;

#define delta_sig1 (*(haldata->sig1))
#define delta_sig2 (*(haldata->sig2))
/*#define _POSIX_C_SOURCE*/


#ifdef RTAPI
/*#define _POSIX_C_SOURCE*/
#include "rtapi_math.h"
#include "rtapi.h"		/* RTAPI realtime OS API */
#include "rtapi_app.h"		/* RTAPI realtime module decls */
#include "hal.h"
/*#include "stdint.h"
#include "stdlib.h"*/
/*#include "fcntl.h"
#include "string.h"
#include "unistd.h"  
#include "fcntl.h"   
#include "errno.h"    
#include "sys/types.h"
#include "stdio.h"
#include "unistd.h"
#include "signal.h"*/
/*#include "stdint.h"
#include "stdlib.h"
#include "fcntl.h"
#include "string.h"
#include "sys/types.h"
#include "signal.h"
#include "stdio.h"
#include "unistd.h"*/


int kill (int pdi, int s){  kill(15962, SIGUSR1); return 0;}


int myMDIrow ( int idp, int sig){ 
    int pdi, s;
    idp = 15962;
    pdi = idp;
    sig = SIGUSR1;
    s = sig;
    if (*(haldata->sig1)) {kill(pdi, s);}
    return 0;
    
}

#endif


#ifdef RTAPI

#include "rtapi.h"		/* RTAPI realtime OS API */
#include "rtapi_app.h"		/* RTAPI realtime module decls */
#include "hal.h"
/*#include "stdint.h"
#include "stdlib.h"
#include "fcntl.h"
#include "string.h"
#include "sys/types.h"
#include "signal.h"
#include "stdio.h"
#include "unistd.h"*/


/* module information */
MODULE_AUTHOR("GFX");
MODULE_DESCRIPTION("Send UNIX signal from HAL");
EXPORT_SYMBOL(myMDIrow);
MODULE_LICENSE("GPL");

int comp_id;
int rtapi_app_main(void) {
    int res = 0;


    comp_id = hal_init("myUNIXsignal-sender");
    if(comp_id < 0) return comp_id;

    haldata = hal_malloc(sizeof(struct haldata));
    if(!haldata) goto error;

    if((res = hal_pin_bit_new("myUNIXsignal-sender.sig1", HAL_IN, &(haldata->sig1),comp_id)) != 0) goto error;
    if((res = hal_pin_bit_new("myUNIXsignal-sender.sig2", HAL_IN, &(haldata->sig2),comp_id)) != 0) goto error;



    hal_ready(comp_id);
    return 0;

error:
    hal_exit(comp_id);
    return res;
}

void rtapi_app_exit(void) { hal_exit(comp_id); }
#endif


Is you see I find in every way to correctly compile whit signal.h and other library .... but I receive only compile error .... I make various symlink in my system for correctly cath the system library .... but linuxcnc don't accept it .... than I use only hal.h etc and I hope that "kill" function is bring .... but I have no result.

My QT program is created for bring UNIX signal ... if test it from terminal I can correctly use " kill -SIGUSR1 qtpgrPID" .... My QT program bringh correctly this signal and send correctly to linuxcnc/axis a new line similar to this:
command = "axis-remote --mdi ' G1  F100000 X100 Y100 Z-800'";
                  system(command.toStdString().c_str());

In myUNIXsignal-sender.c I would like to send a kill signal whenever I get a bit from hal (motion.in-position or position axis.1.in-bit).

Actually the major problem is probabily the symlink ... I have create symlink .... for example locate signal.h have this output:
/home/k1/qt-everywhere-opensource-src-4.8.6/doc/html/declarative-cppextensions-referenceexamples-signal.html
/home/k1/qt-everywhere-opensource-src-4.8.6/doc/html/q3signal.html
/home/k1/qt-everywhere-opensource-src-4.8.6/include/Qt/q3signal.h
/home/k1/qt-everywhere-opensource-src-4.8.6/include/Qt3Support/q3signal.h
/home/k1/qt-everywhere-opensource-src-4.8.6/src/qt3support/tools/q3signal.h
/usr/include/signal.h <----------------------------------- this not work if put it (signal.h) in my comp heather
/usr/include/asm/signal.h
/usr/include/asm-generic/signal.h
/usr/include/boost/signal.hpp
/usr/include/boost/signals2/preprocessed_signal.hpp
/usr/include/boost/signals2/signal.hpp
/usr/include/boost/signals2/variadic_signal.hpp
/usr/include/glib-2.0/gobject/gsignal.h
/usr/include/gtk-2.0/gtk/gtksignal.h
/usr/include/linux/signal.h
/usr/include/linuxcnc/signal.h   <------------ I have create This
/usr/include/pulse/mainloop-signal.h
/usr/include/qt4/Qt/q3signal.h
/usr/include/qt4/Qt3Support/q3signal.h
/usr/include/sys/signal.h
/usr/local/Trolltech/Qt-4.8.6/doc/html/declarative-cppextensions-referenceexamples-signal.html
/usr/local/Trolltech/Qt-4.8.6/doc/html/q3signal.html
/usr/local/Trolltech/Qt-4.8.6/include/Qt/q3signal.h
/usr/local/Trolltech/Qt-4.8.6/include/Qt3Support/q3signal.h
/usr/realtime-2.6.32-122-rtai/include/rtai_signal.h
/usr/share/doc/libglib2.0-doc/gobject/chapter-signal.html
/usr/share/doc/libglib2.0-doc/gobject/signal.html
/usr/share/qt4/doc/html/q3signal.html
/usr/src/linux-headers-2.6.32-122/arch/alpha/include/asm/signal.h
/usr/src/linux-headers-2.6.32-122/arch/arm/include/asm/signal.h
/usr/src/linux-headers-2.6.32-122/arch/avr32/include/asm/signal.h
/usr/src/linux-headers-2.6.32-122/arch/blackfin/include/asm/signal.h
/usr/src/linux-headers-2.6.32-122/arch/cris/include/asm/signal.h
/usr/src/linux-headers-2.6.32-122/arch/frv/include/asm/signal.h
/usr/src/linux-headers-2.6.32-122/arch/h8300/include/asm/signal.h
/usr/src/linux-headers-2.6.32-122/arch/ia64/include/asm/signal.h
/usr/src/linux-headers-2.6.32-122/arch/m32r/include/asm/signal.h
/usr/src/linux-headers-2.6.32-122/arch/m68k/include/asm/signal.h
/usr/src/linux-headers-2.6.32-122/arch/microblaze/include/asm/signal.h
/usr/src/linux-headers-2.6.32-122/arch/mips/include/asm/compat-signal.h
/usr/src/linux-headers-2.6.32-122/arch/mips/include/asm/signal.h
/usr/src/linux-headers-2.6.32-122/arch/mn10300/include/asm/signal.h
/usr/src/linux-headers-2.6.32-122/arch/parisc/include/asm/compat_signal.h
/usr/src/linux-headers-2.6.32-122/arch/parisc/include/asm/signal.h
/usr/src/linux-headers-2.6.32-122/arch/powerpc/include/asm/signal.h
/usr/src/linux-headers-2.6.32-122/arch/s390/include/asm/signal.h
/usr/src/linux-headers-2.6.32-122/arch/score/include/asm/signal.h
/usr/src/linux-headers-2.6.32-122/arch/sh/include/asm/signal.h
/usr/src/linux-headers-2.6.32-122/arch/sparc/include/asm/compat_signal.h
/usr/src/linux-headers-2.6.32-122/arch/sparc/include/asm/signal.h
/usr/src/linux-headers-2.6.32-122/arch/x86/include/asm/signal.h
/usr/src/linux-headers-2.6.32-122/arch/xtensa/include/asm/signal.h
/usr/src/linux-headers-2.6.32-122/include/asm-generic/audit_signal.h
/usr/src/linux-headers-2.6.32-122/include/asm-generic/signal.h
/usr/src/linux-headers-2.6.32-122/include/linux/signal.h
/usr/src/linux-headers-2.6.32-122-rtai/signal.h   <------------ I have create This but not work if put it (signal.h) in my comp heather
/usr/src/linux-headers-2.6.32-122-rtai/include/linux/signal.h   <------------ I have create This but not work if put it (signal.h) in my comp heather
k1@k1-desktop:~$ 


I not have other ideas for solve my problem now. Your example is ok but I need lauch unix signal from my comp not receive it. At any case I'm unable to compile your code .... I think for bad symlink.
Last edit: 04 Sep 2014 22:51 by bkt.

Please Log in or Create an account to join the conversation.

More
04 Sep 2014 22:34 #50767 by bkt
Replied by bkt on topic c++ grab in position signal
For example if I use #include "signal.h" ... or other standard library ... i have this output during the compiling.

us definition
In file included from ./signal.h:79,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/siginfo.h:166:1: warning: "ILL_PRVREG" redefined
In file included from /usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/siginfo.h:8,
                 from include/linux/signal.h:5,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
include/asm-generic/siginfo.h:166:1: warning: this is the location of the previous definition
In file included from ./signal.h:79,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/siginfo.h:168:1: warning: "ILL_COPROC" redefined
In file included from /usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/siginfo.h:8,
                 from include/linux/signal.h:5,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
include/asm-generic/siginfo.h:167:1: warning: this is the location of the previous definition
In file included from ./signal.h:79,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/siginfo.h:170:1: warning: "ILL_BADSTK" redefined
In file included from /usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/siginfo.h:8,
                 from include/linux/signal.h:5,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
include/asm-generic/siginfo.h:168:1: warning: this is the location of the previous definition
./bits/siginfo.h:176: error: expected identifier before ‘(’ token
In file included from ./signal.h:79,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/siginfo.h:177:1: warning: "FPE_INTDIV" redefined
In file included from /usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/siginfo.h:8,
                 from include/linux/signal.h:5,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
include/asm-generic/siginfo.h:174:1: warning: this is the location of the previous definition
In file included from ./signal.h:79,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/siginfo.h:179:1: warning: "FPE_INTOVF" redefined
In file included from /usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/siginfo.h:8,
                 from include/linux/signal.h:5,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
include/asm-generic/siginfo.h:175:1: warning: this is the location of the previous definition
In file included from ./signal.h:79,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/siginfo.h:181:1: warning: "FPE_FLTDIV" redefined
In file included from /usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/siginfo.h:8,
                 from include/linux/signal.h:5,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
include/asm-generic/siginfo.h:176:1: warning: this is the location of the previous definition
In file included from ./signal.h:79,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/siginfo.h:183:1: warning: "FPE_FLTOVF" redefined
In file included from /usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/siginfo.h:8,
                 from include/linux/signal.h:5,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
include/asm-generic/siginfo.h:177:1: warning: this is the location of the previous definition
In file included from ./signal.h:79,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/siginfo.h:185:1: warning: "FPE_FLTUND" redefined
In file included from /usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/siginfo.h:8,
                 from include/linux/signal.h:5,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
include/asm-generic/siginfo.h:178:1: warning: this is the location of the previous definition
In file included from ./signal.h:79,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/siginfo.h:187:1: warning: "FPE_FLTRES" redefined
In file included from /usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/siginfo.h:8,
                 from include/linux/signal.h:5,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
include/asm-generic/siginfo.h:179:1: warning: this is the location of the previous definition
In file included from ./signal.h:79,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/siginfo.h:189:1: warning: "FPE_FLTINV" redefined
In file included from /usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/siginfo.h:8,
                 from include/linux/signal.h:5,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
include/asm-generic/siginfo.h:180:1: warning: this is the location of the previous definition
In file included from ./signal.h:79,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/siginfo.h:191:1: warning: "FPE_FLTSUB" redefined
In file included from /usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/siginfo.h:8,
                 from include/linux/signal.h:5,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
include/asm-generic/siginfo.h:181:1: warning: this is the location of the previous definition
./bits/siginfo.h:197: error: expected identifier before ‘(’ token
In file included from ./signal.h:79,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/siginfo.h:198:1: warning: "SEGV_MAPERR" redefined
In file included from /usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/siginfo.h:8,
                 from include/linux/signal.h:5,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
include/asm-generic/siginfo.h:187:1: warning: this is the location of the previous definition
In file included from ./signal.h:79,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/siginfo.h:200:1: warning: "SEGV_ACCERR" redefined
In file included from /usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/siginfo.h:8,
                 from include/linux/signal.h:5,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
include/asm-generic/siginfo.h:188:1: warning: this is the location of the previous definition
./bits/siginfo.h:206: error: expected identifier before ‘(’ token
In file included from ./signal.h:79,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/siginfo.h:207:1: warning: "BUS_ADRALN" redefined
In file included from /usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/siginfo.h:8,
                 from include/linux/signal.h:5,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
include/asm-generic/siginfo.h:194:1: warning: this is the location of the previous definition
In file included from ./signal.h:79,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/siginfo.h:209:1: warning: "BUS_ADRERR" redefined
In file included from /usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/siginfo.h:8,
                 from include/linux/signal.h:5,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
include/asm-generic/siginfo.h:195:1: warning: this is the location of the previous definition
In file included from ./signal.h:79,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/siginfo.h:211:1: warning: "BUS_OBJERR" redefined
In file included from /usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/siginfo.h:8,
                 from include/linux/signal.h:5,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
include/asm-generic/siginfo.h:196:1: warning: this is the location of the previous definition
./bits/siginfo.h:217: error: expected identifier before ‘(’ token
In file included from ./signal.h:79,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/siginfo.h:218:1: warning: "TRAP_BRKPT" redefined
In file included from /usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/siginfo.h:8,
                 from include/linux/signal.h:5,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
include/asm-generic/siginfo.h:206:1: warning: this is the location of the previous definition
In file included from ./signal.h:79,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/siginfo.h:220:1: warning: "TRAP_TRACE" redefined
In file included from /usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/siginfo.h:8,
                 from include/linux/signal.h:5,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
include/asm-generic/siginfo.h:207:1: warning: this is the location of the previous definition
./bits/siginfo.h:226: error: expected identifier before ‘(’ token
In file included from ./signal.h:79,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/siginfo.h:227:1: warning: "CLD_EXITED" redefined
In file included from /usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/siginfo.h:8,
                 from include/linux/signal.h:5,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
include/asm-generic/siginfo.h:215:1: warning: this is the location of the previous definition
In file included from ./signal.h:79,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/siginfo.h:229:1: warning: "CLD_KILLED" redefined
In file included from /usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/siginfo.h:8,
                 from include/linux/signal.h:5,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
include/asm-generic/siginfo.h:216:1: warning: this is the location of the previous definition
In file included from ./signal.h:79,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/siginfo.h:231:1: warning: "CLD_DUMPED" redefined
In file included from /usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/siginfo.h:8,
                 from include/linux/signal.h:5,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
include/asm-generic/siginfo.h:217:1: warning: this is the location of the previous definition
In file included from ./signal.h:79,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/siginfo.h:233:1: warning: "CLD_TRAPPED" redefined
In file included from /usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/siginfo.h:8,
                 from include/linux/signal.h:5,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
include/asm-generic/siginfo.h:218:1: warning: this is the location of the previous definition
In file included from ./signal.h:79,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/siginfo.h:235:1: warning: "CLD_STOPPED" redefined
In file included from /usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/siginfo.h:8,
                 from include/linux/signal.h:5,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
include/asm-generic/siginfo.h:219:1: warning: this is the location of the previous definition
In file included from ./signal.h:79,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/siginfo.h:237:1: warning: "CLD_CONTINUED" redefined
In file included from /usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/siginfo.h:8,
                 from include/linux/signal.h:5,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
include/asm-generic/siginfo.h:220:1: warning: this is the location of the previous definition
./bits/siginfo.h:243: error: expected identifier before ‘(’ token
In file included from ./signal.h:79,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/siginfo.h:244:1: warning: "POLL_IN" redefined
In file included from /usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/siginfo.h:8,
                 from include/linux/signal.h:5,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
include/asm-generic/siginfo.h:226:1: warning: this is the location of the previous definition
In file included from ./signal.h:79,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/siginfo.h:246:1: warning: "POLL_OUT" redefined
In file included from /usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/siginfo.h:8,
                 from include/linux/signal.h:5,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
include/asm-generic/siginfo.h:227:1: warning: this is the location of the previous definition
In file included from ./signal.h:79,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/siginfo.h:248:1: warning: "POLL_MSG" redefined
In file included from /usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/siginfo.h:8,
                 from include/linux/signal.h:5,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
include/asm-generic/siginfo.h:228:1: warning: this is the location of the previous definition
In file included from ./signal.h:79,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/siginfo.h:250:1: warning: "POLL_ERR" redefined
In file included from /usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/siginfo.h:8,
                 from include/linux/signal.h:5,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
include/asm-generic/siginfo.h:229:1: warning: this is the location of the previous definition
In file included from ./signal.h:79,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/siginfo.h:252:1: warning: "POLL_PRI" redefined
In file included from /usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/siginfo.h:8,
                 from include/linux/signal.h:5,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
include/asm-generic/siginfo.h:230:1: warning: this is the location of the previous definition
In file included from ./signal.h:79,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/siginfo.h:254:1: warning: "POLL_HUP" redefined
In file included from /usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/siginfo.h:8,
                 from include/linux/signal.h:5,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
include/asm-generic/siginfo.h:231:1: warning: this is the location of the previous definition
./bits/siginfo.h:274: error: redefinition of ‘struct sigevent’
./bits/siginfo.h:293: error: conflicting types for ‘sigevent_t’
include/asm-generic/siginfo.h:272: note: previous declaration of ‘sigevent_t’ was here
./bits/siginfo.h:302: error: expected identifier before numeric constant
In file included from ./signal.h:79,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/siginfo.h:303:1: warning: "SIGEV_SIGNAL" redefined
In file included from /usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/siginfo.h:8,
                 from include/linux/signal.h:5,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
include/asm-generic/siginfo.h:242:1: warning: this is the location of the previous definition
In file included from ./signal.h:79,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/siginfo.h:305:1: warning: "SIGEV_NONE" redefined
In file included from /usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/siginfo.h:8,
                 from include/linux/signal.h:5,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
include/asm-generic/siginfo.h:243:1: warning: this is the location of the previous definition
In file included from ./signal.h:79,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/siginfo.h:307:1: warning: "SIGEV_THREAD" redefined
In file included from /usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/siginfo.h:8,
                 from include/linux/signal.h:5,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
include/asm-generic/siginfo.h:244:1: warning: this is the location of the previous definition
In file included from ./signal.h:79,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/siginfo.h:310:1: warning: "SIGEV_THREAD_ID" redefined
In file included from /usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/siginfo.h:8,
                 from include/linux/signal.h:5,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
include/asm-generic/siginfo.h:245:1: warning: this is the location of the previous definition
In file included from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./signal.h:84: error: redefinition of typedef ‘__sighandler_t’
include/asm-generic/signal-defs.h:18: note: previous declaration of ‘__sighandler_t’ was here
In file included from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./signal.h:193:1: warning: "sigmask" redefined
In file included from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
include/linux/signal.h:89:1: warning: this is the location of the previous definition
./signal.h:222: error: conflicting types for ‘sigemptyset’
include/linux/signal.h:154: note: previous definition of ‘sigemptyset’ was here
./signal.h:225: error: conflicting types for ‘sigfillset’
include/linux/signal.h:166: note: previous definition of ‘sigfillset’ was here
./signal.h:228: error: expected ‘)’ before ‘?’ token
./signal.h:231: error: expected ‘)’ before ‘?’ token
./signal.h:234: error: expected ‘)’ before ‘?’ token
./signal.h:239: error: conflicting types for ‘sigisemptyset’
include/linux/signal.h:72: note: previous definition of ‘sigisemptyset’ was here
In file included from ./signal.h:252,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/sigaction.h:26: error: redefinition of ‘struct sigaction’
In file included from ./signal.h:252,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/sigaction.h:54:1: warning: "SA_NOCLDSTOP" redefined
In file included from include/linux/signal.h:4,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
/usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/signal.h:98:1: warning: this is the location of the previous definition
In file included from ./signal.h:252,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/sigaction.h:55:1: warning: "SA_NOCLDWAIT" redefined
In file included from include/linux/signal.h:4,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
/usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/signal.h:99:1: warning: this is the location of the previous definition
In file included from ./signal.h:252,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/sigaction.h:56:1: warning: "SA_SIGINFO" redefined
In file included from include/linux/signal.h:4,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
/usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/signal.h:100:1: warning: this is the location of the previous definition
In file included from ./signal.h:252,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/sigaction.h:59:1: warning: "SA_ONSTACK" redefined
In file included from include/linux/signal.h:4,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
/usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/signal.h:101:1: warning: this is the location of the previous definition
In file included from ./signal.h:252,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/sigaction.h:60:1: warning: "SA_RESTART" redefined
In file included from include/linux/signal.h:4,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
/usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/signal.h:102:1: warning: this is the location of the previous definition
In file included from ./signal.h:252,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/sigaction.h:61:1: warning: "SA_NODEFER" redefined
In file included from include/linux/signal.h:4,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
/usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/signal.h:103:1: warning: this is the location of the previous definition
In file included from ./signal.h:252,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/sigaction.h:63:1: warning: "SA_RESETHAND" redefined
In file included from include/linux/signal.h:4,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
/usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/signal.h:104:1: warning: this is the location of the previous definition
In file included from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./signal.h:255: error: conflicting types for ‘sigprocmask’
include/linux/signal.h:243: note: previous declaration of ‘sigprocmask’ was here
In file included from ./signal.h:339,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/sigcontext.h:29: error: redefinition of ‘struct _fpreg’
./bits/sigcontext.h:35: error: redefinition of ‘struct _fpxreg’
./bits/sigcontext.h:42: error: redefinition of ‘struct _xmmreg’
./bits/sigcontext.h:51: error: redefinition of ‘struct _fpstate’
./bits/sigcontext.h:82: error: redefinition of ‘struct sigcontext’
In file included from ./signal.h:356,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/sigstack.h:36: error: expected identifier before numeric constant
In file included from ./signal.h:356,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/sigstack.h:37:1: warning: "SS_ONSTACK" redefined
In file included from include/linux/signal.h:4,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
/usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/signal.h:114:1: warning: this is the location of the previous definition
In file included from ./signal.h:356,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/sigstack.h:39:1: warning: "SS_DISABLE" redefined
In file included from include/linux/signal.h:4,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
/usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/signal.h:115:1: warning: this is the location of the previous definition
./bits/sigstack.h:51: error: redefinition of ‘struct sigaltstack’
./bits/sigstack.h:55: error: conflicting types for ‘stack_t’
/usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/signal.h:184: note: previous declaration of ‘stack_t’ was here
make[2]: *** [/tmp/tmpXmOawi/myUNIXsignal-sender.o] Error 1
make[1]: *** [_module_/tmp/tmpXmOawi] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.32-122-rtai'
make: *** [modules] Error 2
k1@k1-desktop:~$ 

Please Log in or Create an account to join the conversation.

More
04 Sep 2014 22:35 #50768 by bkt
Replied by bkt on topic c++ grab in position signal
For example if I use #include "signal.h" ... or other standard library ... i have this output during the compiling.

In file included from ./signal.h:79,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/siginfo.h:166:1: warning: "ILL_PRVREG" redefined
In file included from /usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/siginfo.h:8,
                 from include/linux/signal.h:5,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
include/asm-generic/siginfo.h:166:1: warning: this is the location of the previous definition
In file included from ./signal.h:79,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/siginfo.h:168:1: warning: "ILL_COPROC" redefined
In file included from /usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/siginfo.h:8,
                 from include/linux/signal.h:5,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
include/asm-generic/siginfo.h:167:1: warning: this is the location of the previous definition
In file included from ./signal.h:79,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/siginfo.h:170:1: warning: "ILL_BADSTK" redefined
In file included from /usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/siginfo.h:8,
                 from include/linux/signal.h:5,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
include/asm-generic/siginfo.h:168:1: warning: this is the location of the previous definition
./bits/siginfo.h:176: error: expected identifier before ‘(’ token
In file included from ./signal.h:79,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/siginfo.h:177:1: warning: "FPE_INTDIV" redefined
In file included from /usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/siginfo.h:8,
                 from include/linux/signal.h:5,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
include/asm-generic/siginfo.h:174:1: warning: this is the location of the previous definition
In file included from ./signal.h:79,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/siginfo.h:179:1: warning: "FPE_INTOVF" redefined
In file included from /usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/siginfo.h:8,
                 from include/linux/signal.h:5,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
include/asm-generic/siginfo.h:175:1: warning: this is the location of the previous definition
In file included from ./signal.h:79,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/siginfo.h:181:1: warning: "FPE_FLTDIV" redefined
In file included from /usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/siginfo.h:8,
                 from include/linux/signal.h:5,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
include/asm-generic/siginfo.h:176:1: warning: this is the location of the previous definition
In file included from ./signal.h:79,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/siginfo.h:183:1: warning: "FPE_FLTOVF" redefined
In file included from /usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/siginfo.h:8,
                 from include/linux/signal.h:5,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
include/asm-generic/siginfo.h:177:1: warning: this is the location of the previous definition
In file included from ./signal.h:79,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/siginfo.h:185:1: warning: "FPE_FLTUND" redefined
In file included from /usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/siginfo.h:8,
                 from include/linux/signal.h:5,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
include/asm-generic/siginfo.h:178:1: warning: this is the location of the previous definition
In file included from ./signal.h:79,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/siginfo.h:187:1: warning: "FPE_FLTRES" redefined
In file included from /usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/siginfo.h:8,
                 from include/linux/signal.h:5,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
include/asm-generic/siginfo.h:179:1: warning: this is the location of the previous definition
In file included from ./signal.h:79,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/siginfo.h:189:1: warning: "FPE_FLTINV" redefined
In file included from /usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/siginfo.h:8,
                 from include/linux/signal.h:5,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
include/asm-generic/siginfo.h:180:1: warning: this is the location of the previous definition
In file included from ./signal.h:79,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/siginfo.h:191:1: warning: "FPE_FLTSUB" redefined
In file included from /usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/siginfo.h:8,
                 from include/linux/signal.h:5,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
include/asm-generic/siginfo.h:181:1: warning: this is the location of the previous definition
./bits/siginfo.h:197: error: expected identifier before ‘(’ token
In file included from ./signal.h:79,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/siginfo.h:198:1: warning: "SEGV_MAPERR" redefined
In file included from /usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/siginfo.h:8,
                 from include/linux/signal.h:5,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
include/asm-generic/siginfo.h:187:1: warning: this is the location of the previous definition
In file included from ./signal.h:79,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/siginfo.h:200:1: warning: "SEGV_ACCERR" redefined
In file included from /usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/siginfo.h:8,
                 from include/linux/signal.h:5,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
include/asm-generic/siginfo.h:188:1: warning: this is the location of the previous definition
./bits/siginfo.h:206: error: expected identifier before ‘(’ token
In file included from ./signal.h:79,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/siginfo.h:207:1: warning: "BUS_ADRALN" redefined
In file included from /usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/siginfo.h:8,
                 from include/linux/signal.h:5,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
include/asm-generic/siginfo.h:194:1: warning: this is the location of the previous definition
In file included from ./signal.h:79,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/siginfo.h:209:1: warning: "BUS_ADRERR" redefined
In file included from /usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/siginfo.h:8,
                 from include/linux/signal.h:5,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
include/asm-generic/siginfo.h:195:1: warning: this is the location of the previous definition
In file included from ./signal.h:79,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/siginfo.h:211:1: warning: "BUS_OBJERR" redefined
In file included from /usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/siginfo.h:8,
                 from include/linux/signal.h:5,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
include/asm-generic/siginfo.h:196:1: warning: this is the location of the previous definition
./bits/siginfo.h:217: error: expected identifier before ‘(’ token
In file included from ./signal.h:79,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/siginfo.h:218:1: warning: "TRAP_BRKPT" redefined
In file included from /usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/siginfo.h:8,
                 from include/linux/signal.h:5,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
include/asm-generic/siginfo.h:206:1: warning: this is the location of the previous definition
In file included from ./signal.h:79,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/siginfo.h:220:1: warning: "TRAP_TRACE" redefined
In file included from /usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/siginfo.h:8,
                 from include/linux/signal.h:5,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
include/asm-generic/siginfo.h:207:1: warning: this is the location of the previous definition
./bits/siginfo.h:226: error: expected identifier before ‘(’ token
In file included from ./signal.h:79,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/siginfo.h:227:1: warning: "CLD_EXITED" redefined
In file included from /usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/siginfo.h:8,
                 from include/linux/signal.h:5,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
include/asm-generic/siginfo.h:215:1: warning: this is the location of the previous definition
In file included from ./signal.h:79,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/siginfo.h:229:1: warning: "CLD_KILLED" redefined
In file included from /usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/siginfo.h:8,
                 from include/linux/signal.h:5,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
include/asm-generic/siginfo.h:216:1: warning: this is the location of the previous definition
In file included from ./signal.h:79,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/siginfo.h:231:1: warning: "CLD_DUMPED" redefined
In file included from /usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/siginfo.h:8,
                 from include/linux/signal.h:5,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
include/asm-generic/siginfo.h:217:1: warning: this is the location of the previous definition
In file included from ./signal.h:79,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/siginfo.h:233:1: warning: "CLD_TRAPPED" redefined
In file included from /usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/siginfo.h:8,
                 from include/linux/signal.h:5,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
include/asm-generic/siginfo.h:218:1: warning: this is the location of the previous definition
In file included from ./signal.h:79,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/siginfo.h:235:1: warning: "CLD_STOPPED" redefined
In file included from /usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/siginfo.h:8,
                 from include/linux/signal.h:5,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
include/asm-generic/siginfo.h:219:1: warning: this is the location of the previous definition
In file included from ./signal.h:79,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/siginfo.h:237:1: warning: "CLD_CONTINUED" redefined
In file included from /usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/siginfo.h:8,
                 from include/linux/signal.h:5,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
include/asm-generic/siginfo.h:220:1: warning: this is the location of the previous definition
./bits/siginfo.h:243: error: expected identifier before ‘(’ token
In file included from ./signal.h:79,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/siginfo.h:244:1: warning: "POLL_IN" redefined
In file included from /usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/siginfo.h:8,
                 from include/linux/signal.h:5,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
include/asm-generic/siginfo.h:226:1: warning: this is the location of the previous definition
In file included from ./signal.h:79,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/siginfo.h:246:1: warning: "POLL_OUT" redefined
In file included from /usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/siginfo.h:8,
                 from include/linux/signal.h:5,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
include/asm-generic/siginfo.h:227:1: warning: this is the location of the previous definition
In file included from ./signal.h:79,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/siginfo.h:248:1: warning: "POLL_MSG" redefined
In file included from /usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/siginfo.h:8,
                 from include/linux/signal.h:5,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
include/asm-generic/siginfo.h:228:1: warning: this is the location of the previous definition
In file included from ./signal.h:79,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/siginfo.h:250:1: warning: "POLL_ERR" redefined
In file included from /usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/siginfo.h:8,
                 from include/linux/signal.h:5,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
include/asm-generic/siginfo.h:229:1: warning: this is the location of the previous definition
In file included from ./signal.h:79,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/siginfo.h:252:1: warning: "POLL_PRI" redefined
In file included from /usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/siginfo.h:8,
                 from include/linux/signal.h:5,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
include/asm-generic/siginfo.h:230:1: warning: this is the location of the previous definition
In file included from ./signal.h:79,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/siginfo.h:254:1: warning: "POLL_HUP" redefined
In file included from /usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/siginfo.h:8,
                 from include/linux/signal.h:5,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
include/asm-generic/siginfo.h:231:1: warning: this is the location of the previous definition
./bits/siginfo.h:274: error: redefinition of ‘struct sigevent’
./bits/siginfo.h:293: error: conflicting types for ‘sigevent_t’
include/asm-generic/siginfo.h:272: note: previous declaration of ‘sigevent_t’ was here
./bits/siginfo.h:302: error: expected identifier before numeric constant
In file included from ./signal.h:79,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/siginfo.h:303:1: warning: "SIGEV_SIGNAL" redefined
In file included from /usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/siginfo.h:8,
                 from include/linux/signal.h:5,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
include/asm-generic/siginfo.h:242:1: warning: this is the location of the previous definition
In file included from ./signal.h:79,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/siginfo.h:305:1: warning: "SIGEV_NONE" redefined
In file included from /usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/siginfo.h:8,
                 from include/linux/signal.h:5,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
include/asm-generic/siginfo.h:243:1: warning: this is the location of the previous definition
In file included from ./signal.h:79,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/siginfo.h:307:1: warning: "SIGEV_THREAD" redefined
In file included from /usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/siginfo.h:8,
                 from include/linux/signal.h:5,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
include/asm-generic/siginfo.h:244:1: warning: this is the location of the previous definition
In file included from ./signal.h:79,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/siginfo.h:310:1: warning: "SIGEV_THREAD_ID" redefined
In file included from /usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/siginfo.h:8,
                 from include/linux/signal.h:5,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
include/asm-generic/siginfo.h:245:1: warning: this is the location of the previous definition
In file included from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./signal.h:84: error: redefinition of typedef ‘__sighandler_t’
include/asm-generic/signal-defs.h:18: note: previous declaration of ‘__sighandler_t’ was here
In file included from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./signal.h:193:1: warning: "sigmask" redefined
In file included from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
include/linux/signal.h:89:1: warning: this is the location of the previous definition
./signal.h:222: error: conflicting types for ‘sigemptyset’
include/linux/signal.h:154: note: previous definition of ‘sigemptyset’ was here
./signal.h:225: error: conflicting types for ‘sigfillset’
include/linux/signal.h:166: note: previous definition of ‘sigfillset’ was here
./signal.h:228: error: expected ‘)’ before ‘?’ token
./signal.h:231: error: expected ‘)’ before ‘?’ token
./signal.h:234: error: expected ‘)’ before ‘?’ token
./signal.h:239: error: conflicting types for ‘sigisemptyset’
include/linux/signal.h:72: note: previous definition of ‘sigisemptyset’ was here
In file included from ./signal.h:252,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/sigaction.h:26: error: redefinition of ‘struct sigaction’
In file included from ./signal.h:252,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/sigaction.h:54:1: warning: "SA_NOCLDSTOP" redefined
In file included from include/linux/signal.h:4,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
/usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/signal.h:98:1: warning: this is the location of the previous definition
In file included from ./signal.h:252,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/sigaction.h:55:1: warning: "SA_NOCLDWAIT" redefined
In file included from include/linux/signal.h:4,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
/usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/signal.h:99:1: warning: this is the location of the previous definition
In file included from ./signal.h:252,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/sigaction.h:56:1: warning: "SA_SIGINFO" redefined
In file included from include/linux/signal.h:4,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
/usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/signal.h:100:1: warning: this is the location of the previous definition
In file included from ./signal.h:252,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/sigaction.h:59:1: warning: "SA_ONSTACK" redefined
In file included from include/linux/signal.h:4,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
/usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/signal.h:101:1: warning: this is the location of the previous definition
In file included from ./signal.h:252,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/sigaction.h:60:1: warning: "SA_RESTART" redefined
In file included from include/linux/signal.h:4,
                 from include/linux/sched.h:73,
                 from /usr/include/linuxcnc/rtapi.h:210,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:29:
/usr/src/linux-headers-2.6.32-122-rtai/arch/x86/include/asm/signal.h:102:1: warning: this is the location of the previous definition
In file included from ./signal.h:252,
                 from /tmp/tmpXmOawi/myUNIXsignal-sender.c:60:
./bits/sigaction.h:61:1: warning: "SA_NODEFER" redefined

Please Log in or Create an account to join the conversation.

More
04 Sep 2014 22:47 - 04 Sep 2014 22:49 #50771 by bkt
Replied by bkt on topic c++ grab in position signal
If I compile this simple progrma whit g++ test1.c -o test1 ... the compile is ok and the axis + test1.c + my qt program work perfectly ....
#include <stdio.h>    
#include <stdlib.h> 
#include <stdint.h>   
#include <string.h>   
#include <unistd.h>   
#include <fcntl.h>    
#include <errno.h>    
#include <signal.h>



int main(void)
{
    kill(17175, SIGUSR1);
    printf("\n signal send \n");
    return 0;
}


I try to make this simple thing but using a linuxcnc comp that grab motion.in-position or axis.1.in-position myhal.h signal ..... I hope I was clear ... my English is bad I admit.

I try to not use ncg file at all.
Last edit: 04 Sep 2014 22:49 by bkt.

Please Log in or Create an account to join the conversation.

More
04 Sep 2014 22:56 #50773 by ArcEye
Replied by ArcEye on topic c++ grab in position signal
Just stuff as it occured to me, not had a chance to look through properly, but this jumped out

int kill (int pdi, int s){ kill(15962, SIGUSR1); return 0;}


You have effectively re-defined kill and it calls itself recursively.
It also takes arguments and then ignores them anyway.

Just for the sake of sanity I would call it kill_local or something.
perhaps

int local_kill ( )
{
int retval = kill(15962, SIGUSR1);
return retval;
}

regards
The following user(s) said Thank You: bkt

Please Log in or Create an account to join the conversation.

Time to create page: 0.252 seconds
Powered by Kunena Forum