[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Seriel-ports-rutine i C, sigaction?



Hej alle, jeg har med held kompileret/kørt nogle af programmerne fra http://www.ibiblio.org/pub/Linux/docs/HOWTO/other-formats/html_single/Serial-Programming-HOWTO.html
til at læse/skrive til/fra seriel-porten.


Desværre går det galt under "3.3. Asynchronous Input". Jeg får følgende fejl fra gcc "incompatible types in assignment" ved "saio.sa_mask = 0;".

Ved at kigge lidt i /usr/include/asm/signal.h finder jeg følgende:

typedef unsigned long sigset_t;

struct sigaction {
    union {
      __sighandler_t _sa_handler;
      void (*_sa_sigaction)(int, struct siginfo *, void *);
    } _u;
    sigset_t sa_mask;
    unsigned long sa_flags;
    void (*sa_restorer)(void);
};

og har i min egen kode

struct sigaction saio;

Det er et stykke tid siden at jeg har programmeret i C, men der burde da ikke være noget galt, eller?

Jeg bruger gcc (GCC) 3.2.2 (Mandrake Linux 9.1 3.2.2-3mdk)

Med venlig hilsen Preben



 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 22:43 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *