From 0246b35efb922a5a1040f577434d2f6e8cd1a7e3 Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Wed, 17 Jul 2013 03:33:07 +0200 Subject: [PATCH] Using AF_* constants instead of PF_* (for POSIX compliance) --- src/transport/tcp.c | 6 +++--- src/transport/tcp4.c | 4 ++-- src/transport/tcp6.c | 4 ++-- src/transport/udp.c | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/transport/tcp.c b/src/transport/tcp.c index c7f7360..ba3fae1 100644 --- a/src/transport/tcp.c +++ b/src/transport/tcp.c @@ -45,7 +45,7 @@ /* for tcp4 and tcp6 */ #ifndef TCP_FAMILY -# define TCP_FAMILY PF_UNSPEC +# define TCP_FAMILY AF_UNSPEC #endif @@ -255,7 +255,7 @@ static int _init_client(TCP * tcp, char const * name) if(_tcp_socket_init(&tcp->u.client, aip->ai_family, tcp) != 0) continue; #ifdef DEBUG - if(aip->ai_family == PF_INET) + if(aip->ai_family == AF_INET) { sa = (struct sockaddr_in *)aip->ai_addr; fprintf(stderr, "DEBUG: %s() %s (%s:%u)\n", __func__, @@ -316,7 +316,7 @@ static int _init_server(TCP * tcp, char const * name) tcp->u.server.fd = tcpsocket.fd; /* accept incoming connections */ #ifdef DEBUG - if(aip->ai_family == PF_INET) + if(aip->ai_family == AF_INET) { sa = (struct sockaddr_in *)aip->ai_addr; fprintf(stderr, "DEBUG: %s() %s (%s:%u)\n", __func__, diff --git a/src/transport/tcp4.c b/src/transport/tcp4.c index f04651f..c00ab61 100644 --- a/src/transport/tcp4.c +++ b/src/transport/tcp4.c @@ -1,5 +1,5 @@ /* $Id$ */ -/* Copyright (c) 2012 Pierre Pronchery */ +/* Copyright (c) 2012-2013 Pierre Pronchery */ /* This file is part of DeforaOS System libApp */ /* This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -15,5 +15,5 @@ -#define TCP_FAMILY PF_INET +#define TCP_FAMILY AF_INET #include "tcp.c" diff --git a/src/transport/tcp6.c b/src/transport/tcp6.c index cd2a0ce..d2a570c 100644 --- a/src/transport/tcp6.c +++ b/src/transport/tcp6.c @@ -1,5 +1,5 @@ /* $Id$ */ -/* Copyright (c) 2012 Pierre Pronchery */ +/* Copyright (c) 2012-2013 Pierre Pronchery */ /* This file is part of DeforaOS System libApp */ /* This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -15,5 +15,5 @@ -#define TCP_FAMILY PF_INET6 +#define TCP_FAMILY AF_INET6 #include "tcp.c" diff --git a/src/transport/udp.c b/src/transport/udp.c index 2aba471..1c6807a 100644 --- a/src/transport/udp.c +++ b/src/transport/udp.c @@ -1,5 +1,5 @@ /* $Id$ */ -/* Copyright (c) 2012 Pierre Pronchery */ +/* Copyright (c) 2012-2013 Pierre Pronchery */ /* This file is part of DeforaOS System libApp */ /* This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -276,7 +276,7 @@ static int _udp_send(UDP * udp, AppMessage * message, int acknowledge) #endif #ifdef DEBUG - if(udp->aip->ai_family == PF_INET) + if(udp->aip->ai_family == AF_INET) { sa = (struct sockaddr_in *)udp->aip->ai_addr; fprintf(stderr, "DEBUG: %s() %s (%s:%u)\n", __func__,