--- rpl/src/instructions_o1.c 2010/03/09 10:18:47 1.8 +++ rpl/src/instructions_o1.c 2010/08/06 15:33:01 1.18 @@ -1,6 +1,6 @@ /* ================================================================================ - RPL/2 (R) version 4.0.13 + RPL/2 (R) version 4.0.18 Copyright (C) 1989-2010 Dr. BERTRAND Joël This file is part of RPL/2. @@ -20,7 +20,7 @@ */ -#include "rpl.conv.h" +#include "rpl-conv.h" /* @@ -934,7 +934,9 @@ instruction_open(struct_processus *s_eta struct sockaddr_un socket_unix; struct sockaddr_in socket_ipv4; +# ifdef IPV6 struct sockaddr_in6 socket_ipv6; +# endif struct_objet *s_objet_argument; struct_objet *s_objet_resultat; @@ -1017,6 +1019,7 @@ instruction_open(struct_processus *s_eta "\"file name\" } \"protection\" } OPEN\n"); printf(" { \"sockettype\" { \"name\" \"local name\" } } OPEN\n"); printf(" { \"sockettype\" \"socketdomain\" \"protection\" } OPEN\n"); + printf(" \"/semaphore\" OPEN\n"); printf(" File type : NEW/OLD/REPLACE/UNKNOWN/SCRATCH\n"); printf(" File access : SEQUENTIAL/DIRECT/KEYED\n"); @@ -4081,6 +4084,10 @@ instruction_open(struct_processus *s_eta strcpy((*((struct_socket *) (*s_objet_resultat).objet)). type, "ROBUST DATAGRAM"); break; + + default : + BUG(1, printf("type_socket=%c\n", type_socket)); + break; } if ((protection != 'N') && ((type_socket != 'S') && @@ -4334,6 +4341,7 @@ instruction_open(struct_processus *s_eta } else { // Accès en IPv6 +# ifdef IPV6 resolution_courante = resolution; while(resolution_courante != NULL) @@ -4431,6 +4439,8 @@ instruction_open(struct_processus *s_eta (*resolution_courante).ai_addr)) .sin6_addr.s6_addr[i]); } +# else +# endif } freeaddrinfo(resolution); @@ -4518,6 +4528,7 @@ instruction_open(struct_processus *s_eta } else { // Accès en IPv6 +# ifdef IPV6 if (((*((struct_socket *) (*s_objet_resultat) .objet)).adresse = malloc(55 * sizeof(unsigned char))) == NULL) @@ -4588,6 +4599,8 @@ instruction_open(struct_processus *s_eta d_ex_erreur_acces_fichier; return; } +# else +# endif } } @@ -4846,6 +4859,7 @@ instruction_open(struct_processus *s_eta } else { // Accès en IPv6 +# ifdef IPV6 resolution_courante = resolution; while(resolution_courante != NULL) @@ -4945,6 +4959,8 @@ instruction_open(struct_processus *s_eta (*resolution_courante).ai_addr)) .sin6_addr.s6_addr[i]); } +# else +# endif } freeaddrinfo(resolution); @@ -5053,6 +5069,7 @@ instruction_open(struct_processus *s_eta } else if (strcmp(protocole, "IPV6") == 0) { // Accès en IPv6 +# ifdef IPV6 if (type_adresse == '6') { if (((*((struct_socket *) (*s_objet_resultat) @@ -5144,6 +5161,8 @@ instruction_open(struct_processus *s_eta (*((struct_socket *) (*s_objet_resultat).objet)) .socket_en_ecoute = 'N'; } +# else +# endif } else { // Socket UNIX @@ -5260,6 +5279,8 @@ instruction_open(struct_processus *s_eta (*s_etat_processus).erreur_systeme = d_es_allocation_memoire; return; } + + liberation(s_etat_processus, s_objet_argument); } else {