00001 //=========================================================================== 00002 //= _unix_io.h Agosto de 1998 = 00003 //=-------------------------------------------------------------------------= 00004 //= Definiciones especificas de Unix para comunicaciones asincronicas = 00005 //=-------------------------------------------------------------------------= 00006 //= ADVERTENCIA: ESTE SOFTWARE NO ESTA CONCEBIDO NI DISENNADO PARA EL USO = 00007 //= EN EQUIPO DE CONTROL EN LINEA EN ENTORNOS PELIGROSOS QUE REQUIERAN UN = 00008 //= DESEMPENNO LIBRE DE FALLAS, COMO LA OPERACION DE PLANTAS NUCLEARES, = 00009 //= SISTEMAS DE NAVEGACION O COMUNICACION EN AVIONES, TRAFICO AEREO, = 00010 //= EQUIPO MEDICO DEL CUAL DEPENDAN VIDAS HUMANAS O SISTEMAS DE ARMAMENTO, = 00011 //= EN LOS CUALES UNA FALLA EN EL SOFTWARE PUEDA IMPLICAR DIRECTAMENTE LA = 00012 //= MUERTE, DANNOS PERSONALES O DANNOS FISICOS Y/O AMBIENTALES GRAVES = 00013 //= ("ACTIVIDADES DE ALGO RIESGO"). = 00014 //=-------------------------------------------------------------------------= 00015 //= Autor original: Oscar J. Chavarro G. A.K.A. JEDILINK. Copyright (c), = 00016 //= 1997 - 2003, oscarchavarro@hotmail.com = 00017 //= AQUYNZA es software libre, y se rige bajo los terminos de la licencia = 00018 //= LGPL de GNU (http://www.gnu.org). Para mayor informacion respecto a la = 00019 //= licencia de uso, consulte el archivo ./doc/LICENCIA en la distribucion. = 00020 //=========================================================================== 00021 00022 // OJO: En SUN es importante que estos dos externs esten aqui y no mas abajo 00023 extern void instalar_sistema_asincronico(void); 00024 extern void registrar_entrada(int fd, void (*f)(void *, int), void *User_data); 00025 00026 #ifndef __UNIX_IO__ 00027 #define __UNIX_IO__ 00028 00029 #include "jed_defs.h" // Incluir antes que nada, en ese modulo se definen 00030 // aspectos importantes para la portabilidad del sistema 00031 00032 #if PLATAFORMA == i386_LINUX_GCC || PLATAFORMA == SPARC64_LINUX_GCC 00033 #ifndef __USE_BSD 00034 #define __USE_BSD 00035 #endif 00036 #ifndef __USE_SVID 00037 #define __USE_SVID 00038 #endif 00039 #ifndef __USE_POSIX 00040 #define __USE_POSIX 00041 #endif 00042 #ifndef __USE_MISC 00043 #define __USE_MISC 00044 #endif 00045 #endif 00046 00047 #ifdef UNIX_ENABLED 00048 #include <fcntl.h> 00049 #include <termio.h> 00050 #if PLATAFORMA != CRAY_J90 00051 #include <termios.h> 00052 #endif 00053 #include <unistd.h> 00054 #include <sys/ioctl.h> 00055 #include <sys/signal.h> 00056 #include <sys/time.h> 00057 #include <sys/types.h> 00058 #endif 00059 00060 #if PLATAFORMA == SUN || PLATAFORMA == SGI 00061 #include <signal.h> 00062 #endif 00063 00064 #if PLATAFORMA == SUN 00065 #include <sys/file.h> 00066 #endif 00067 00068 //- Definiciones del sistema de entrada/salida asincronica ------------------ 00074 class _ASYN_IO_SPEC { 00075 public: 00076 int fd; 00077 void (*f)(void *, int); 00078 void *User_data; 00079 }; 00080 00081 #define MAX_IO_DEVICES 16 00082 00083 #endif // __UNIX_IO__ 00084 00085 //=========================================================================== 00086 //= EOF = 00087 //=========================================================================== 00088