8000 Refactor inet_ntop and inet_pton by sreimers · Pull Request #118 · baresip/re · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Refactor inet_ntop and inet_pton #118

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions include/re_sa.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ int sa_af(const struct sa *sa);
uint32_t sa_in(const struct sa *sa);
void sa_in6(const struct sa *sa, uint8_t *addr);
int sa_ntop(const struct sa *sa, char *buf, int size);
int sa_pton(const char *addr, struct sa *sa);
uint16_t sa_port(const struct sa *sa);
bool sa_isset(const struct sa *sa, int flag);
uint32_t sa_hash(const struct sa *sa, int flag);
Expand Down
11 changes: 1 addition & 10 deletions mk/re.mk
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ ifeq ($(OS),openbsd)
HAVE_ARC4RANDOM := 1
endif
ifeq ($(OS),win32)
CFLAGS += -DWIN32 -D_WIN32_WINNT=0x0501 -D__ssize_t_defined
CFLAGS += -DWIN32 -D_WIN32_WINNT=0x0600 -D__ssize_t_defined
LIBS += -lwsock32 -lws2_32 -liphlpapi
LFLAGS +=
SH_LFLAGS += -shared
Expand Down Expand Up @@ -555,20 +555,11 @@ ifneq ($(HAVE_SYSLOG),)
CFLAGS += -DHAVE_SYSLOG
endif

HAVE_INET_NTOP := 1

CFLAGS += -DHAVE_FORK

ifneq ($(HAVE_INET_NTOP),)
CFLAGS += -DHAVE_INET_NTOP
endif
CFLAGS += -DHAVE_PWD_H
ifneq ($(OS),darwin)
CFLAGS += -DHAVE_POLL # Darwin: poll() does not support devices
HAVE_INET_PTON := 1
endif
ifneq ($(HAVE_INET_PTON),)
CFLAGS += -DHAVE_INET_PTON
endif
CFLAGS += -DHAVE_SELECT -DHAVE_SELECT_H
CFLAGS += -DHAVE_SETRLIMIT
Expand Down
2 changes: 0 additions & 2 deletions src/lock/win32/lock.c
C9A2
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
*
* Copyright (C) 2010 Creytiv.com
*/
#undef _WIN32_WINNT
#define _WIN32_WINNT 0x0400
#include <windows.h>
#include <re_types.h>
#include <re_mem.h>
Expand Down
2 changes: 0 additions & 2 deletions src/sa/mod.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,5 @@
# Copyright (C) 2010 Creytiv.com
#

SRCS += sa/ntop.c
SRCS += sa/printaddr.c
SRCS += sa/pton.c
SRCS += sa/sa.c
222 changes: 0 additions & 222 deletions src/sa/ntop.c

This file was deleted.

Loading
0