winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
July
June
May
April
March
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
April 2020
----- 2025 -----
July 2025
June 2025
May 2025
April 2025
March 2025
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
1016 discussions
Start a n
N
ew thread
Zebediah Figura : mountmgr: Determine and store the filesystem type, label, and serial.
by Alexandre Julliard
06 Apr '20
06 Apr '20
Module: wine Branch: master Commit: 37ed6559034d47829fbb2e60eb93f7060476004f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=37ed6559034d47829fbb2e60…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Fri Mar 27 10:32:28 2020 -0500 mountmgr: Determine and store the filesystem type, label, and serial. Copied with minimal adaptation from kernel32/volume.c Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mountmgr.sys/device.c | 598 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 598 insertions(+) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=37ed6559034d47829fbb…
1
0
0
0
Chip Davis : iphlpapi: Implement GetUdp6Table() for Mac OS and FreeBSD.
by Alexandre Julliard
06 Apr '20
06 Apr '20
Module: wine Branch: master Commit: 73ad2954a3913743fa734f71774527dc6f879aa3 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=73ad2954a3913743fa734f71…
Author: Chip Davis <cdavis(a)codeweavers.com> Date: Sun Apr 5 17:29:02 2020 -0500 iphlpapi: Implement GetUdp6Table() for Mac OS and FreeBSD. Signed-off-by: Chip Davis <cdavis(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/iphlpapi/ipstats.c | 99 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) diff --git a/dlls/iphlpapi/ipstats.c b/dlls/iphlpapi/ipstats.c index ae6ccafbf4..efb4d64c90 100644 --- a/dlls/iphlpapi/ipstats.c +++ b/dlls/iphlpapi/ipstats.c @@ -3070,6 +3070,105 @@ DWORD build_udp6_table( UDP_TABLE_CLASS class, void **tablep, BOOL order, HANDLE } else ret = ERROR_NOT_SUPPORTED; } +#elif defined(HAVE_SYS_SYSCTL_H) && defined(HAVE_STRUCT_XINPGEN) + { + static const char zero[sizeof(IN6_ADDR)] = {0}; + + size_t len = 0; + char *buf = NULL; + struct xinpgen *xig, *orig_xig; + struct pid_map *map = NULL; + unsigned num_entries; + struct ipv6_addr_scope *addr_scopes = NULL; + unsigned int addr_scopes_size = 0; + + if (sysctlbyname( "net.inet.udp.pcblist", NULL, &len, NULL, 0 ) < 0) + { + ERR( "Failure to read net.inet.udp.pcblist via sysctlbyname!\n" ); + ret = ERROR_NOT_SUPPORTED; + goto done; + } + + buf = HeapAlloc( GetProcessHeap(), 0, len ); + if (!buf) + { + ret = ERROR_OUTOFMEMORY; + goto done; + } + + if (sysctlbyname( "net.inet.udp.pcblist", buf, &len, NULL, 0 ) < 0) + { + ERR ("Failure to read net.inet.udp.pcblist via sysctlbyname!\n"); + ret = ERROR_NOT_SUPPORTED; + goto done; + } + + addr_scopes = get_ipv6_addr_scope_table( &addr_scopes_size ); + if (!addr_scopes) + { + ret = ERROR_OUTOFMEMORY; + goto done; + } + + if (class >= UDP_TABLE_OWNER_PID) map = get_pid_map( &num_entries ); + + /* Might be nothing here; first entry is just a header it seems */ + if (len <= sizeof (struct xinpgen)) goto done; + + orig_xig = (struct xinpgen *)buf; + xig = orig_xig; + + for (xig = (struct xinpgen *)((char *)xig + xig->xig_len); + xig->xig_len > sizeof (struct xinpgen); + xig = (struct xinpgen *)((char *)xig + xig->xig_len)) + { +#if __FreeBSD_version >= 1200026 + struct xinpcb *in = (struct xinpcb *)xig; + struct xsocket *sock = &in->xi_socket; +#else + struct inpcb *in = &((struct xinpcb *)xig)->xi_inp; + struct xsocket *sock = &((struct xinpcb *)xig)->xi_socket; +#endif + + /* Ignore sockets for other protocols */ + if (sock->xso_protocol != IPPROTO_UDP) + continue; + + /* Ignore PCBs that were freed while generating the data */ + if (in->inp_gencnt > orig_xig->xig_gen) + continue; + + /* we're only interested in IPv6 addresses */ + if (!(in->inp_vflag & INP_IPV6) || + (in->inp_vflag & INP_IPV4)) + continue; + + /* If all 0's, skip it */ + if (!memcmp( &in->in6p_laddr.s6_addr, zero, sizeof(zero) ) && !in->inp_lport) + continue; + + /* Fill in structure details */ + memcpy(row.ucLocalAddr, &in->in6p_laddr.s6_addr, sizeof(row.ucLocalAddr)); + row.dwLocalPort = in->inp_lport; + row.dwLocalScopeId = find_ipv6_addr_scope((const IN6_ADDR *)&row.ucLocalAddr, addr_scopes, addr_scopes_size); + if (class >= UDP_TABLE_OWNER_PID) + row.dwOwningPid = find_owning_pid( map, num_entries, (UINT_PTR)sock->so_pcb ); + if (class >= UDP_TABLE_OWNER_MODULE) + { + row.liCreateTimestamp.QuadPart = 0; /* FIXME */ + row.u.dwFlags = 0; + row.u.SpecificPortBind = !(in->inp_flags & INP_ANONPORT); + memset( &row.OwningModuleInfo, 0, sizeof(row.OwningModuleInfo) ); + } + if (!(table = append_table_row( heap, flags, table, &table_size, &count, &row, row_size ))) + break; + } + + done: + HeapFree( GetProcessHeap(), 0, map ); + HeapFree( GetProcessHeap(), 0, buf ); + HeapFree( GetProcessHeap(), 0, addr_scopes ); + } #else FIXME( "not implemented\n" ); ret = ERROR_NOT_SUPPORTED;
1
0
0
0
Chip Davis : iphlpapi: Implement GetTcp6Table() for Mac OS and FreeBSD.
by Alexandre Julliard
06 Apr '20
06 Apr '20
Module: wine Branch: master Commit: 57fe49f8581a217a9581f491dd1bbea11902f7ff URL:
https://source.winehq.org/git/wine.git/?a=commit;h=57fe49f8581a217a9581f491…
Author: Chip Davis <cdavis(a)codeweavers.com> Date: Sun Apr 5 17:29:01 2020 -0500 iphlpapi: Implement GetTcp6Table() for Mac OS and FreeBSD. Signed-off-by: Chip Davis <cdavis(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/iphlpapi/ipstats.c | 166 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 165 insertions(+), 1 deletion(-) diff --git a/dlls/iphlpapi/ipstats.c b/dlls/iphlpapi/ipstats.c index f0b412c3a6..ae6ccafbf4 100644 --- a/dlls/iphlpapi/ipstats.c +++ b/dlls/iphlpapi/ipstats.c @@ -139,6 +139,9 @@ #ifdef HAVE_LIBPROC_H #include <libproc.h> #endif +#ifdef HAVE_IFADDRS_H +#include <ifaddrs.h> +#endif #ifndef ROUNDUP #define ROUNDUP(a) \ @@ -2652,7 +2655,7 @@ static int compare_udp6_rows(const void *a, const void *b) return rowA->dwLocalPort - rowB->dwLocalPort; } -#ifdef __linux__ +#if defined(__linux__) || (defined(HAVE_SYS_SYSCTL_H) && defined(HAVE_STRUCT_XINPGEN)) struct ipv6_addr_scope { IN6_ADDR addr; @@ -2663,12 +2666,17 @@ static struct ipv6_addr_scope *get_ipv6_addr_scope_table(unsigned int *size) { struct ipv6_addr_scope *table = NULL; unsigned int table_size = 0; +#ifdef __linux__ char buf[512], *ptr; FILE *fp; +#elif defined(HAVE_GETIFADDRS) + struct ifaddrs *addrs, *cur; +#endif if (!(table = HeapAlloc( GetProcessHeap(), 0, sizeof(table[0]) ))) return NULL; +#ifdef __linux__ if (!(fp = fopen( "/proc/net/if_inet6", "r" ))) goto failed; @@ -2705,6 +2713,40 @@ static struct ipv6_addr_scope *get_ipv6_addr_scope_table(unsigned int *size) } fclose(fp); +#elif defined(HAVE_GETIFADDRS) + if (getifaddrs(&addrs) == -1) + goto failed; + + for (cur = addrs; cur; cur = cur->ifa_next) + { + struct sockaddr_in6 *sin6; + struct ipv6_addr_scope *new_table; + struct ipv6_addr_scope *entry; + + if (cur->ifa_addr->sa_family != AF_INET6) + continue; + + sin6 = (struct sockaddr_in6 *)cur->ifa_addr; + + table_size++; + if (!(new_table = HeapReAlloc( GetProcessHeap(), 0, table, table_size * sizeof(table[0]) ))) + { + freeifaddrs(addrs); + goto failed; + } + + table = new_table; + entry = &table[table_size - 1]; + + memcpy(&entry->addr, &sin6->sin6_addr, sizeof(entry->addr)); + entry->scope = sin6->sin6_scope_id; + } + + freeifaddrs(addrs); +#else + FIXME( "not implemented\n" ); + goto failed; +#endif *size = table_size; return table; @@ -2822,6 +2864,128 @@ DWORD build_tcp6_table( TCP_TABLE_CLASS class, void **tablep, BOOL order, HANDLE } else ret = ERROR_NOT_SUPPORTED; } +#elif defined(HAVE_SYS_SYSCTL_H) && defined(HAVE_STRUCT_XINPGEN) + { + static const char zero[sizeof(IN6_ADDR)] = {0}; + + MIB_TCP6ROW_OWNER_MODULE row; + size_t len = 0; + char *buf = NULL; + struct xinpgen *xig, *orig_xig; + struct pid_map *map = NULL; + unsigned num_entries; + struct ipv6_addr_scope *addr_scopes = NULL; + unsigned int addr_scopes_size = 0; + + if (sysctlbyname( "net.inet.tcp.pcblist", NULL, &len, NULL, 0 ) < 0) + { + ERR( "Failure to read net.inet.tcp.pcblist via sysctlbyname!\n" ); + ret = ERROR_NOT_SUPPORTED; + goto done; + } + + buf = HeapAlloc( GetProcessHeap(), 0, len ); + if (!buf) + { + ret = ERROR_OUTOFMEMORY; + goto done; + } + + if (sysctlbyname( "net.inet.tcp.pcblist", buf, &len, NULL, 0 ) < 0) + { + ERR( "Failure to read net.inet.tcp.pcblist via sysctlbyname!\n" ); + ret = ERROR_NOT_SUPPORTED; + goto done; + } + + addr_scopes = get_ipv6_addr_scope_table( &addr_scopes_size ); + if (!addr_scopes) + { + ret = ERROR_OUTOFMEMORY; + goto done; + } + + if (class >= TCP_TABLE_OWNER_PID_LISTENER) map = get_pid_map( &num_entries ); + + /* Might be nothing here; first entry is just a header it seems */ + if (len <= sizeof (struct xinpgen)) goto done; + + orig_xig = (struct xinpgen *)buf; + xig = orig_xig; + + for (xig = (struct xinpgen *)((char *)xig + xig->xig_len); + xig->xig_len > sizeof (struct xinpgen); + xig = (struct xinpgen *)((char *)xig + xig->xig_len)) + { +#if __FreeBSD_version >= 1200026 + struct xtcpcb *tcp = (struct xtcpcb *)xig; + struct xinpcb *in = &tcp->xt_inp; + struct xsocket *sock = &in->xi_socket; +#else + struct tcpcb *tcp = &((struct xtcpcb *)xig)->xt_tp; + struct inpcb *in = &((struct xtcpcb *)xig)->xt_inp; + struct xsocket *sock = &((struct xtcpcb *)xig)->xt_socket; +#endif + + /* Ignore sockets for other protocols */ + if (sock->xso_protocol != IPPROTO_TCP) + continue; + + /* Ignore PCBs that were freed while generating the data */ + if (in->inp_gencnt > orig_xig->xig_gen) + continue; + + /* we're only interested in IPv6 addresses */ + if (!(in->inp_vflag & INP_IPV6) || + (in->inp_vflag & INP_IPV4)) + continue; + + /* If all 0's, skip it */ + if (!memcmp( &in->in6p_laddr, zero, sizeof(zero) ) && !in->inp_lport && + !memcmp( &in->in6p_faddr, zero, sizeof(zero) ) && !in->inp_fport) + continue; + + /* Fill in structure details */ + memcpy( &row.ucLocalAddr, &in->in6p_laddr.s6_addr, sizeof(row.ucLocalAddr) ); + row.dwLocalPort = in->inp_lport; + row.dwLocalScopeId = find_ipv6_addr_scope( (const IN6_ADDR *)&row.ucLocalAddr, addr_scopes, addr_scopes_size ); + memcpy( &row.ucRemoteAddr, &in->in6p_faddr.s6_addr, sizeof(row.ucRemoteAddr) ); + row.dwRemotePort = in->inp_fport; + row.dwLocalScopeId = find_ipv6_addr_scope( (const IN6_ADDR *)&row.ucRemoteAddr, addr_scopes, addr_scopes_size ); + row.dwState = TCPStateToMIBState( tcp->t_state ); + if (!match_class( class, row.dwState )) continue; + + if (class <= TCP_TABLE_BASIC_ALL) + { + /* MIB_TCP6ROW has a different field order */ + MIB_TCP6ROW basic_row; + basic_row.State = row.dwState; + memcpy( &basic_row.LocalAddr, &row.ucLocalAddr, sizeof(row.ucLocalAddr) ); + basic_row.dwLocalScopeId = row.dwLocalScopeId; + basic_row.dwLocalPort = row.dwLocalPort; + memcpy( &basic_row.RemoteAddr, &row.ucRemoteAddr, sizeof(row.ucRemoteAddr) ); + basic_row.dwRemoteScopeId = row.dwRemoteScopeId; + basic_row.dwRemotePort = row.dwRemotePort; + if (!(table = append_table_row( heap, flags, table, &table_size, &count, &basic_row, row_size ))) + break; + continue; + } + + row.dwOwningPid = find_owning_pid( map, num_entries, (UINT_PTR)sock->so_pcb ); + if (class >= TCP_TABLE_OWNER_MODULE_LISTENER) + { + row.liCreateTimestamp.QuadPart = 0; /* FIXME */ + memset( &row.OwningModuleInfo, 0, sizeof(row.OwningModuleInfo) ); + } + if (!(table = append_table_row( heap, flags, table, &table_size, &count, &row, row_size ))) + break; + } + + done: + HeapFree( GetProcessHeap(), 0, map ); + HeapFree( GetProcessHeap(), 0, buf ); + HeapFree( GetProcessHeap(), 0, addr_scopes ); + } #else FIXME( "not implemented\n" ); ret = ERROR_NOT_SUPPORTED;
1
0
0
0
Chip Davis : iphlpapi: Use res_getservers() if available to get the DNS server list.
by Alexandre Julliard
06 Apr '20
06 Apr '20
Module: wine Branch: master Commit: 39464e86a058ddc1ad199b80210dcf5467005018 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=39464e86a058ddc1ad199b80…
Author: Chip Davis <cdavis(a)codeweavers.com> Date: Sun Apr 5 17:29:00 2020 -0500 iphlpapi: Use res_getservers() if available to get the DNS server list. Signed-off-by: Chip Davis <cdavis(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- configure | 39 +++++++++++++++++++++++++++++++++++++ configure.ac | 14 ++++++++++++++ dlls/iphlpapi/iphlpapi_main.c | 45 ++++++++++++++++++++++++++++++++++++++++++- include/config.h.in | 3 +++ 4 files changed, 100 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 116825768c..6db2725807 100755 --- a/configure +++ b/configure @@ -14203,6 +14203,45 @@ $as_echo "#define HAVE_RESOLV 1" >>confdefs.h RESOLV_LIBS=$ac_cv_have_resolv ;; esac + + if test "x$ac_cv_have_resolv" != "xnot found" + then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_getservers" >&5 +$as_echo_n "checking for res_getservers... " >&6; } +if ${ac_cv_have_res_getservers+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_save_LIBS="$LIBS" + LIBS="$RESOLV_LIBS $LIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <resolv.h> +int +main () +{ +res_getservers(NULL, NULL, 0); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_have_res_getservers=yes +else + ac_cv_have_res_getservers=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$ac_save_LIBS" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_res_getservers" >&5 +$as_echo "$ac_cv_have_res_getservers" >&6; } + if test "$ac_cv_have_res_getservers" = "yes" + then + +$as_echo "#define HAVE_RES_GETSERVERS 1" >>confdefs.h + + fi + fi fi if test "x$with_cms" != "xno" diff --git a/configure.ac b/configure.ac index 76d5d5ed72..9e29234b42 100644 --- a/configure.ac +++ b/configure.ac @@ -1535,6 +1535,20 @@ then AC_DEFINE(HAVE_RESOLV, 1) AC_SUBST(RESOLV_LIBS,$ac_cv_have_resolv) ;; esac + + if test "x$ac_cv_have_resolv" != "xnot found" + then + AC_CACHE_CHECK([for res_getservers], ac_cv_have_res_getservers, + [ac_save_LIBS="$LIBS" + LIBS="$RESOLV_LIBS $LIBS" + AC_LINK_IFELSE([AC_LANG_PROGRAM( + [[#include <resolv.h>]],[[res_getservers(NULL, NULL, 0);]])],[ac_cv_have_res_getservers=yes],[ac_cv_have_res_getservers=no]) + LIBS="$ac_save_LIBS"]) + if test "$ac_cv_have_res_getservers" = "yes" + then + AC_DEFINE(HAVE_RES_GETSERVERS, 1, [Define to 1 if you have the `res_getservers' function.]) + fi + fi fi dnl **** Check for LittleCMS *** diff --git a/dlls/iphlpapi/iphlpapi_main.c b/dlls/iphlpapi/iphlpapi_main.c index b8ae327a13..e3ce21c44b 100644 --- a/dlls/iphlpapi/iphlpapi_main.c +++ b/dlls/iphlpapi/iphlpapi_main.c @@ -1249,7 +1249,8 @@ static void sockaddr_in_to_WS_storage( SOCKADDR_STORAGE *dst, const struct socka } #if defined(HAVE_STRUCT___RES_STATE__U__EXT_NSCOUNT6) || \ - (defined(HAVE___RES_GET_STATE) && defined(HAVE___RES_GETSERVERS)) + (defined(HAVE___RES_GET_STATE) && defined(HAVE___RES_GETSERVERS)) || \ + defined(HAVE_RES_GETSERVERS) static void sockaddr_in6_to_WS_storage( SOCKADDR_STORAGE *dst, const struct sockaddr_in6 *src ) { SOCKADDR_IN6 *s = (SOCKADDR_IN6 *)dst; @@ -1284,6 +1285,47 @@ static void initialise_resolver(void) LeaveCriticalSection(&res_init_cs); } +#ifdef HAVE_RES_GETSERVERS +static int get_dns_servers( SOCKADDR_STORAGE *servers, int num, BOOL ip4_only ) +{ + struct __res_state *state = &_res; + int i, found = 0, total; + SOCKADDR_STORAGE *addr = servers; + union res_sockaddr_union *buf; + + initialise_resolver(); + + total = res_getservers( state, NULL, 0 ); + + if ((!servers || !num) && !ip4_only) return total; + + buf = HeapAlloc( GetProcessHeap(), 0, total * sizeof(union res_sockaddr_union) ); + total = res_getservers( state, buf, total ); + + for (i = 0; i < total; i++) + { + if (buf[i].sin6.sin6_family == AF_INET6 && ip4_only) continue; + if (buf[i].sin.sin_family != AF_INET && buf[i].sin6.sin6_family != AF_INET6) continue; + + found++; + if (!servers || !num) continue; + + if (buf[i].sin6.sin6_family == AF_INET6) + { + sockaddr_in6_to_WS_storage( addr, &buf[i].sin6 ); + } + else + { + sockaddr_in_to_WS_storage( addr, &buf[i].sin ); + } + if (++addr >= servers + num) break; + } + + HeapFree( GetProcessHeap(), 0, buf ); + return found; +} +#else + static int get_dns_servers( SOCKADDR_STORAGE *servers, int num, BOOL ip4_only ) { int i, ip6_count = 0; @@ -1319,6 +1361,7 @@ static int get_dns_servers( SOCKADDR_STORAGE *servers, int num, BOOL ip4_only ) } return addr - servers; } +#endif #elif defined(HAVE___RES_GET_STATE) && defined(HAVE___RES_GETSERVERS) static int get_dns_servers( SOCKADDR_STORAGE *servers, int num, BOOL ip4_only ) diff --git a/include/config.h.in b/include/config.h.in index db9c7a1e7d..8ccbf0e7e5 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -761,6 +761,9 @@ /* Define to 1 if you have the <resolv.h> header file. */ #undef HAVE_RESOLV_H +/* Define to 1 if you have the `res_getservers' function. */ +#undef HAVE_RES_GETSERVERS + /* Define to 1 if you have the `rint' function. */ #undef HAVE_RINT
1
0
0
0
Alexandre Julliard : msxml3: Use standard dlopen() instead of the libwine wrappers.
by Alexandre Julliard
06 Apr '20
06 Apr '20
Module: wine Branch: master Commit: 7814da1fd4e691f5a8664b6e5dd5322692ca31b4 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7814da1fd4e691f5a8664b6e…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Apr 6 11:48:24 2020 +0200 msxml3: Use standard dlopen() instead of the libwine wrappers. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msxml3/main.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/dlls/msxml3/main.c b/dlls/msxml3/main.c index fb94bb2de0..ec204aeb3b 100644 --- a/dlls/msxml3/main.c +++ b/dlls/msxml3/main.c @@ -55,7 +55,6 @@ #include "wine/unicode.h" #include "wine/debug.h" -#include "wine/library.h" #include "msxml_private.h" @@ -190,12 +189,12 @@ static void init_libxslt(void) #ifdef SONAME_LIBXSLT void (*pxsltInit)(void); /* Missing in libxslt <= 1.1.14 */ - libxslt_handle = wine_dlopen(SONAME_LIBXSLT, RTLD_NOW, NULL, 0); + libxslt_handle = dlopen(SONAME_LIBXSLT, RTLD_NOW); if (!libxslt_handle) return; #define LOAD_FUNCPTR(f, needed) \ - if ((p##f = wine_dlsym(libxslt_handle, #f, NULL, 0)) == NULL) \ + if ((p##f = dlsym(libxslt_handle, #f)) == NULL) \ if (needed) { WARN("Can't find symbol %s\n", #f); goto sym_not_found; } LOAD_FUNCPTR(xsltInit, 0); LOAD_FUNCPTR(xsltApplyStylesheet, 1); @@ -225,7 +224,7 @@ static void init_libxslt(void) return; sym_not_found: - wine_dlclose(libxslt_handle, NULL, 0); + dlclose(libxslt_handle); libxslt_handle = NULL; #endif } @@ -435,7 +434,7 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID reserved) if (libxslt_handle) { pxsltCleanupGlobals(); - wine_dlclose(libxslt_handle, NULL, 0); + dlclose(libxslt_handle); } #endif /* Restore default Callbacks */
1
0
0
0
Alexandre Julliard : msgsm32.acm: Use standard dlopen() instead of the libwine wrappers.
by Alexandre Julliard
06 Apr '20
06 Apr '20
Module: wine Branch: master Commit: 4d0034e869a2a8754ee6d900b41609fd65a2b470 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=4d0034e869a2a8754ee6d900…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Apr 6 11:48:12 2020 +0200 msgsm32.acm: Use standard dlopen() instead of the libwine wrappers. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msgsm32.acm/msgsm32.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/dlls/msgsm32.acm/msgsm32.c b/dlls/msgsm32.acm/msgsm32.c index cbf396f3b4..bd54aa4fb3 100644 --- a/dlls/msgsm32.acm/msgsm32.c +++ b/dlls/msgsm32.acm/msgsm32.c @@ -42,7 +42,6 @@ #include "mmreg.h" #include "msacm.h" #include "msacmdrv.h" -#include "wine/library.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(gsm); @@ -58,8 +57,8 @@ FUNCPTR(gsm_encode); FUNCPTR(gsm_decode); #define LOAD_FUNCPTR(f) \ - if((p##f = wine_dlsym(libgsm_handle, #f, NULL, 0)) == NULL) { \ - wine_dlclose(libgsm_handle, NULL, 0); \ + if((p##f = dlsym(libgsm_handle, #f)) == NULL) { \ + dlclose(libgsm_handle); \ libgsm_handle = NULL; \ return FALSE; \ } @@ -69,9 +68,7 @@ FUNCPTR(gsm_decode); */ static BOOL GSM_drvLoad(void) { - char error[128]; - - libgsm_handle = wine_dlopen(SONAME_LIBGSM, RTLD_NOW, error, sizeof(error)); + libgsm_handle = dlopen(SONAME_LIBGSM, RTLD_NOW); if (libgsm_handle) { LOAD_FUNCPTR(gsm_create); @@ -83,7 +80,7 @@ static BOOL GSM_drvLoad(void) } else { - ERR("Couldn't load " SONAME_LIBGSM ": %s\n", error); + ERR("Couldn't load " SONAME_LIBGSM ": %s\n", dlerror()); return FALSE; } } @@ -94,7 +91,7 @@ static BOOL GSM_drvLoad(void) static LRESULT GSM_drvFree(void) { if (libgsm_handle) - wine_dlclose(libgsm_handle, NULL, 0); + dlclose(libgsm_handle); return 1; }
1
0
0
0
Alexandre Julliard : mountmgr.sys: Use standard dlopen() instead of the libwine wrappers.
by Alexandre Julliard
06 Apr '20
06 Apr '20
Module: wine Branch: master Commit: cf19a7ac4f6c01d2ac9516b5691a420b73fd1673 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=cf19a7ac4f6c01d2ac9516b5…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Apr 6 11:47:56 2020 +0200 mountmgr.sys: Use standard dlopen() instead of the libwine wrappers. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mountmgr.sys/dbus.c | 17 +++++++---------- dlls/mountmgr.sys/mountmgr.c | 1 - 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/dlls/mountmgr.sys/dbus.c b/dlls/mountmgr.sys/dbus.c index c6d5d0b7af..27b35acd9c 100644 --- a/dlls/mountmgr.sys/dbus.c +++ b/dlls/mountmgr.sys/dbus.c @@ -44,7 +44,6 @@ #include "ip2string.h" #include "dhcpcsdk.h" -#include "wine/library.h" #include "wine/exception.h" #include "wine/debug.h" @@ -116,20 +115,19 @@ HAL_FUNCS; static BOOL load_hal_functions(void) { void *hal_handle; - char error[128]; /* Load libhal with RTLD_GLOBAL so that the dbus symbols are available. * We can't load libdbus directly since libhal may have been built against a * different version but with the same soname. Binary compatibility is for wimps. */ - if (!(hal_handle = wine_dlopen(SONAME_LIBHAL, RTLD_NOW|RTLD_GLOBAL, error, sizeof(error)))) + if (!(hal_handle = dlopen( SONAME_LIBHAL, RTLD_NOW | RTLD_GLOBAL ))) goto failed; -#define DO_FUNC(f) if (!(p_##f = wine_dlsym( RTLD_DEFAULT, #f, error, sizeof(error) ))) goto failed +#define DO_FUNC(f) if (!(p_##f = dlsym( RTLD_DEFAULT, #f ))) goto failed DBUS_FUNCS; #undef DO_FUNC -#define DO_FUNC(f) if (!(p_##f = wine_dlsym( hal_handle, #f, error, sizeof(error) ))) goto failed +#define DO_FUNC(f) if (!(p_##f = dlsym( hal_handle, #f ))) goto failed HAL_FUNCS; #undef DO_FUNC @@ -137,7 +135,7 @@ static BOOL load_hal_functions(void) return TRUE; failed: - WARN( "failed to load HAL support: %s\n", error ); + WARN( "failed to load HAL support: %s\n", dlerror() ); return FALSE; } @@ -185,18 +183,17 @@ static GUID *parse_uuid( GUID *guid, const char *str ) static BOOL load_dbus_functions(void) { void *handle; - char error[128]; - if (!(handle = wine_dlopen(SONAME_LIBDBUS_1, RTLD_NOW, error, sizeof(error)))) + if (!(handle = dlopen( SONAME_LIBDBUS_1, RTLD_NOW ))) goto failed; -#define DO_FUNC(f) if (!(p_##f = wine_dlsym( handle, #f, error, sizeof(error) ))) goto failed +#define DO_FUNC(f) if (!(p_##f = dlsym( handle, #f ))) goto failed DBUS_FUNCS; #undef DO_FUNC return TRUE; failed: - WARN( "failed to load DBUS support: %s\n", error ); + WARN( "failed to load DBUS support: %s\n", dlerror() ); return FALSE; } diff --git a/dlls/mountmgr.sys/mountmgr.c b/dlls/mountmgr.sys/mountmgr.c index 3d84af47a6..21712dc9ce 100644 --- a/dlls/mountmgr.sys/mountmgr.c +++ b/dlls/mountmgr.sys/mountmgr.c @@ -34,7 +34,6 @@ #include "mountmgr.h" #include "winreg.h" -#include "wine/library.h" #include "wine/list.h" #include "wine/unicode.h" #include "wine/debug.h"
1
0
0
0
Alexandre Julliard : kernel32: Use standard dlopen() instead of the libwine wrappers.
by Alexandre Julliard
06 Apr '20
06 Apr '20
Module: wine Branch: master Commit: d9b6f26b7b6b4ed2a61967725575ce0aaa932843 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=d9b6f26b7b6b4ed2a6196772…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Apr 6 11:47:33 2020 +0200 kernel32: Use standard dlopen() instead of the libwine wrappers. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/term.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/dlls/kernel32/term.c b/dlls/kernel32/term.c index b8877d4035..581b6467da 100644 --- a/dlls/kernel32/term.c +++ b/dlls/kernel32/term.c @@ -41,7 +41,6 @@ #include <winnls.h> #include <wincon.h> #include "console_private.h" -#include "wine/library.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(console); @@ -175,17 +174,17 @@ static BOOL TERM_bind_libcurses(void) static const char ncname[] = SONAME_LIBCURSES; #endif - if (!(nc_handle = wine_dlopen(ncname, RTLD_NOW, NULL, 0))) + if (!(nc_handle = dlopen(ncname, RTLD_NOW))) { MESSAGE("Wine cannot find the " CURSES_NAME " library (%s).\n", ncname); return FALSE; } -#define LOAD_FUNCPTR(f) \ - if((p_##f = wine_dlsym(nc_handle, #f, NULL, 0)) == NULL) \ - { \ - WARN("Can't find symbol %s\n", #f); \ - goto sym_not_found; \ +#define LOAD_FUNCPTR(f) \ + if((p_##f = dlsym(nc_handle, #f)) == NULL) \ + { \ + WARN("Can't find symbol %s\n", #f); \ + goto sym_not_found; \ } LOAD_FUNCPTR(putp) @@ -202,7 +201,7 @@ sym_not_found: "Wine cannot find certain functions that it needs inside the " CURSES_NAME "\nlibrary. To enable Wine to use " CURSES_NAME " please upgrade your " CURSES_NAME "\nlibraries\n"); - wine_dlclose(nc_handle, NULL, 0); + dlclose(nc_handle); nc_handle = NULL; return FALSE; }
1
0
0
0
Alexandre Julliard : kerberos: Use standard dlopen() instead of the libwine wrappers.
by Alexandre Julliard
06 Apr '20
06 Apr '20
Module: wine Branch: master Commit: 64c89517250330618fddb4db75b1a84917cc0125 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=64c89517250330618fddb4db…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Apr 6 11:47:19 2020 +0200 kerberos: Use standard dlopen() instead of the libwine wrappers. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kerberos/krb5_ap.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/dlls/kerberos/krb5_ap.c b/dlls/kerberos/krb5_ap.c index f426290673..44d6b86e01 100644 --- a/dlls/kerberos/krb5_ap.c +++ b/dlls/kerberos/krb5_ap.c @@ -44,7 +44,6 @@ #include "ntsecpkg.h" #include "winternl.h" #include "wine/heap.h" -#include "wine/library.h" #include "wine/debug.h" #include "wine/unicode.h" @@ -119,14 +118,14 @@ MAKE_FUNCPTR(krb5_unparse_name_flags); static void load_krb5(void) { - if (!(libkrb5_handle = wine_dlopen(SONAME_LIBKRB5, RTLD_NOW, NULL, 0))) + if (!(libkrb5_handle = dlopen(SONAME_LIBKRB5, RTLD_NOW))) { WARN("Failed to load %s, Kerberos support will be disabled\n", SONAME_LIBKRB5); return; } #define LOAD_FUNCPTR(f) \ - if (!(p_##f = wine_dlsym(libkrb5_handle, #f, NULL, 0))) \ + if (!(p_##f = dlsym(libkrb5_handle, #f))) \ { \ ERR("Failed to load %s\n", #f); \ goto fail; \ @@ -161,7 +160,7 @@ static void load_krb5(void) return; fail: - wine_dlclose(libkrb5_handle, NULL, 0); + dlclose(libkrb5_handle); libkrb5_handle = NULL; } @@ -623,14 +622,14 @@ MAKE_FUNCPTR(gss_wrap_iov); static BOOL load_gssapi_krb5(void) { - if (!(libgssapi_krb5_handle = wine_dlopen( SONAME_LIBGSSAPI_KRB5, RTLD_NOW, NULL, 0 ))) + if (!(libgssapi_krb5_handle = dlopen( SONAME_LIBGSSAPI_KRB5, RTLD_NOW ))) { ERR_(winediag)( "Failed to load libgssapi_krb5, Kerberos SSP support will not be available.\n" ); return FALSE; } #define LOAD_FUNCPTR(f) \ - if (!(p##f = wine_dlsym( libgssapi_krb5_handle, #f, NULL, 0 ))) \ + if (!(p##f = dlsym( libgssapi_krb5_handle, #f ))) \ { \ ERR( "Failed to load %s\n", #f ); \ goto fail; \ @@ -658,14 +657,14 @@ static BOOL load_gssapi_krb5(void) return TRUE; fail: - wine_dlclose( libgssapi_krb5_handle, NULL, 0 ); + dlclose( libgssapi_krb5_handle ); libgssapi_krb5_handle = NULL; return FALSE; } static void unload_gssapi_krb5(void) { - wine_dlclose( libgssapi_krb5_handle, NULL, 0 ); + dlclose( libgssapi_krb5_handle ); libgssapi_krb5_handle = NULL; }
1
0
0
0
Alexandre Julliard : gphoto2.ds: Use standard dlopen() instead of the libwine wrappers.
by Alexandre Julliard
06 Apr '20
06 Apr '20
Module: wine Branch: master Commit: a18462424fd6cc20fefb364587611d2a86598a2d URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a18462424fd6cc20fefb3645…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Apr 6 11:46:38 2020 +0200 gphoto2.ds: Use standard dlopen() instead of the libwine wrappers. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gphoto2.ds/ds_image.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/dlls/gphoto2.ds/ds_image.c b/dlls/gphoto2.ds/ds_image.c index 32f526782e..e5df69f4a6 100644 --- a/dlls/gphoto2.ds/ds_image.c +++ b/dlls/gphoto2.ds/ds_image.c @@ -27,7 +27,6 @@ #include "gphoto2_i.h" #include "wingdi.h" #include "winuser.h" -#include "wine/library.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(twain); @@ -46,10 +45,10 @@ MAKE_FUNCPTR(jpeg_destroy_decompress); static void *load_libjpeg(void) { - if((libjpeg_handle = wine_dlopen(SONAME_LIBJPEG, RTLD_NOW, NULL, 0)) != NULL) { + if((libjpeg_handle = dlopen(SONAME_LIBJPEG, RTLD_NOW)) != NULL) { #define LOAD_FUNCPTR(f) \ - if((p##f = wine_dlsym(libjpeg_handle, #f, NULL, 0)) == NULL) { \ + if((p##f = dlsym(libjpeg_handle, #f)) == NULL) { \ libjpeg_handle = NULL; \ return NULL; \ }
1
0
0
0
← Newer
1
...
84
85
86
87
88
89
90
...
102
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
Results per page:
10
25
50
100
200