проблема с enum "не называет тип"

g++ (Ubuntu/Linaro 4.4.4-14ubuntu5) 4.4.5

У меня проблема, и я, кажется, выясняю, как я получаю эту ошибку.

файл statemachine.h

#ifndef STATEMACHINE_H_INCLUDED
#define STATEMACHINE_H_INCLUDED

#include "port.h"

enum state {
    ST_UNINITIALIZED = 0x01,
    ST_INITIALIZED   = 0x02,
    ST_OPENED        = 0x03,
    ST_UNBLOCKED     = 0x04,
    ST_DISPOSED      = 0x05
};

void state_machine(event evt, port_t *port);

#endif /* STATEMACHINE_H_INCLUDED */

файл port.h

#ifndef PORT_H_INCLUDED
#define PORT_H_INCLUDED

#include <stdio.h>

#include "statemachine.h"

struct port_t {
    state current_state; /* Error 'state does not name a type */
    .
    .
};
#endif /* PORT_H_INCLUDED */

Большое спасибо за любые предложения,

5
задан ant2009 18 April 2011 в 10:00
поделиться