From 9972bf87b4f27d9c8f358ef8414ac1ab957a2f0f Mon Sep 17 00:00:00 2001 From: Jo Shields Date: Wed, 19 Feb 2014 22:12:43 +0000 Subject: Imported Upstream version 3.2.8+dfsg --- support/Makefile.am | 5 -- support/Makefile.in | 78 +++++++++-------------- support/mac-reachability.c | 153 --------------------------------------------- 3 files changed, 29 insertions(+), 207 deletions(-) delete mode 100644 support/mac-reachability.c (limited to 'support') diff --git a/support/Makefile.am b/support/Makefile.am index b24739fa68..c339ebced7 100644 --- a/support/Makefile.am +++ b/support/Makefile.am @@ -32,7 +32,6 @@ MPH_UNIX_SOURCE = \ fstab.c \ grp.c \ macros.c \ - mac-reachability.c \ nl.c \ nl.h \ old-map.c \ @@ -116,10 +115,6 @@ libMonoPosixHelper_la_LIBADD = \ libMonoPosixHelper_la_LDFLAGS = -no-undefined -avoid-version libMonoSupportW_la_LDFLAGS = -no-undefined -avoid-version -if PLATFORM_DARWIN -libMonoPosixHelper_la_LDFLAGS += -framework CoreFoundation -framework SystemConfiguration -endif - libMonoSupportW_la_SOURCES = \ supportw.c \ support-heap.c \ diff --git a/support/Makefile.in b/support/Makefile.in index 76d4d658ac..d809268137 100644 --- a/support/Makefile.in +++ b/support/Makefile.in @@ -1,8 +1,9 @@ -# Makefile.in generated by automake 1.12.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2012 Free Software Foundation, Inc. - +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -51,10 +52,8 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ -@PLATFORM_DARWIN_TRUE@am__append_1 = -framework CoreFoundation -framework SystemConfiguration subdir = support -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(top_srcdir)/depcomp $(top_srcdir)/mkinstalldirs ChangeLog +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ @@ -108,22 +107,22 @@ libMonoPosixHelper_la_DEPENDENCIES = $(am__DEPENDENCIES_2) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) am__libMonoPosixHelper_la_SOURCES_DIST = errno.c map.c map.h mph.h \ signal.c stdio.c string.c stdlib.c fakepoll.h dirent.c fcntl.c \ - fstab.c grp.c macros.c mac-reachability.c nl.c nl.h old-map.c \ - old-map.h pwd.c serial.c sys-mman.c sys-sendfile.c sys-stat.c \ - sys-statvfs.c sys-time.c sys-uio.c sys-utsname.c sys-wait.c \ - sys-xattr.c syslog.c time.c unistd.c utime.c x-struct-str.c \ - zlib-helper.c adler32.c compress.c crc32.c uncompr.c deflate.c \ - trees.c zutil.c inflate.c infback.c inftrees.c inffast.c \ - crc32.h deflate.h inffast.h inffixed.h inflate.h inftrees.h \ - trees.h zconf.h zlib.h zutil.h minizip/crypt.h minizip/ioapi.c \ + fstab.c grp.c macros.c nl.c nl.h old-map.c old-map.h pwd.c \ + serial.c sys-mman.c sys-sendfile.c sys-stat.c sys-statvfs.c \ + sys-time.c sys-uio.c sys-utsname.c sys-wait.c sys-xattr.c \ + syslog.c time.c unistd.c utime.c x-struct-str.c zlib-helper.c \ + adler32.c compress.c crc32.c uncompr.c deflate.c trees.c \ + zutil.c inflate.c infback.c inftrees.c inffast.c crc32.h \ + deflate.h inffast.h inffixed.h inflate.h inftrees.h trees.h \ + zconf.h zlib.h zutil.h minizip/crypt.h minizip/ioapi.c \ minizip/ioapi.h minizip/unzip.c minizip/unzip.h minizip/zip.c \ minizip/zip.h am__objects_1 = errno.lo map.lo signal.lo stdio.lo string.lo stdlib.lo -am__objects_2 = dirent.lo fcntl.lo fstab.lo grp.lo macros.lo \ - mac-reachability.lo nl.lo old-map.lo pwd.lo serial.lo \ - sys-mman.lo sys-sendfile.lo sys-stat.lo sys-statvfs.lo \ - sys-time.lo sys-uio.lo sys-utsname.lo sys-wait.lo sys-xattr.lo \ - syslog.lo time.lo unistd.lo utime.lo x-struct-str.lo +am__objects_2 = dirent.lo fcntl.lo fstab.lo grp.lo macros.lo nl.lo \ + old-map.lo pwd.lo serial.lo sys-mman.lo sys-sendfile.lo \ + sys-stat.lo sys-statvfs.lo sys-time.lo sys-uio.lo \ + sys-utsname.lo sys-wait.lo sys-xattr.lo syslog.lo time.lo \ + unistd.lo utime.lo x-struct-str.lo @HOST_WIN32_FALSE@am__objects_3 = $(am__objects_1) $(am__objects_2) @HOST_WIN32_TRUE@am__objects_3 = $(am__objects_1) am__objects_4 = adler32.lo compress.lo crc32.lo uncompr.lo deflate.lo \ @@ -159,7 +158,7 @@ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) -am__v_CC_0 = @echo " CC " $@; +am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ @@ -169,10 +168,10 @@ LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) -am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libMonoPosixHelper_la_SOURCES) \ $(libMonoSupportW_la_SOURCES) DIST_SOURCES = $(am__libMonoPosixHelper_la_SOURCES_DIST) \ @@ -417,7 +416,6 @@ MPH_UNIX_SOURCE = \ fstab.c \ grp.c \ macros.c \ - mac-reachability.c \ nl.c \ nl.h \ old-map.c \ @@ -491,8 +489,7 @@ libMonoPosixHelper_la_LIBADD = \ # libMonoPosixHelper_la_LDFLAGS = -no-undefined -version-info 1:0:1 -libMonoPosixHelper_la_LDFLAGS = -no-undefined -avoid-version \ - $(am__append_1) +libMonoPosixHelper_la_LDFLAGS = -no-undefined -avoid-version libMonoSupportW_la_LDFLAGS = -no-undefined -avoid-version libMonoSupportW_la_SOURCES = \ supportw.c \ @@ -562,14 +559,12 @@ uninstall-libLTLIBRARIES: clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; \ - locs=`for p in $$list; do echo $$p; done | \ - sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ - sort -u`; \ - test -z "$$locs" || { \ - echo rm -f $${locs}; \ - rm -f $${locs}; \ - } + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done minizip/$(am__dirstamp): @$(MKDIR_P) minizip @: > minizip/$(am__dirstamp) @@ -612,7 +607,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inffast.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inflate.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inftrees.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mac-reachability.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/macros.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/map.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nl.Plo@am__quote@ @@ -727,20 +721,6 @@ GTAGS: && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" -cscopelist: $(HEADERS) $(SOURCES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP)'; \ - case "$(srcdir)" in \ - [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ - *) sdir=$(subdir)/$(srcdir) ;; \ - esac; \ - for i in $$list; do \ - if test -f "$$i"; then \ - echo "$(subdir)/$$i"; \ - else \ - echo "$$sdir/$$i"; \ - fi; \ - done >> $(top_builddir)/cscope.files - distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -887,7 +867,7 @@ uninstall-am: uninstall-libLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libLTLIBRARIES clean-libtool cscopelist ctags distclean \ + clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ diff --git a/support/mac-reachability.c b/support/mac-reachability.c deleted file mode 100644 index c2499f515c..0000000000 --- a/support/mac-reachability.c +++ /dev/null @@ -1,153 +0,0 @@ -// -// mac-reachability.c: System.Net.NetworkingInformation.NetworkChange -// implementation for Mac OS X using SystemConfiguration's -// NetworkReachability API. -// -// Authors: -// Aaron Bockover (abock@xamarin.com) -// -// Copyright (c) 2013 Xamarin, Inc. (http://www.xamarin.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -#if HAVE_CONFIG_H -#include "config.h" -#endif - -int mono_sc_reachability_enabled (void); - -#if defined(PLATFORM_MACOSX) || defined(TARGET_IOS) - -int -mono_sc_reachability_enabled (void) -{ - return 1; -} - -#include -#include - -typedef void (*mono_sc_reachability_callback)(int); - -typedef struct { - SCNetworkReachabilityRef reachability; - mono_sc_reachability_callback callback; -} mono_sc_reachability; - -mono_sc_reachability * mono_sc_reachability_new (mono_sc_reachability_callback callback); -void mono_sc_reachability_free (mono_sc_reachability *reachability); -int mono_sc_reachability_is_available (mono_sc_reachability *reachability); - -static int -_mono_sc_reachability_is_available (SCNetworkReachabilityFlags flags) -{ - return (flags & kSCNetworkFlagsReachable) && (flags & kSCNetworkFlagsConnectionRequired) == 0; -} - -static void -_mono_sc_reachability_callback (SCNetworkReachabilityRef target, SCNetworkReachabilityFlags flags, void *user) -{ - mono_sc_reachability *reachability; - - if (user == NULL) { - return; - } - - reachability = (mono_sc_reachability *)user; - if (reachability->callback == NULL) { - return; - } - - reachability->callback (_mono_sc_reachability_is_available (flags)); -} - -mono_sc_reachability * -mono_sc_reachability_new (mono_sc_reachability_callback callback) -{ - struct sockaddr_in zero; - SCNetworkReachabilityRef reachability; - SCNetworkReachabilityContext context; - mono_sc_reachability *instance; - - if (callback == NULL) { - return NULL; - } - - bzero (&zero, sizeof (zero)); - zero.sin_len = sizeof (zero); - zero.sin_family = AF_INET; - - reachability = SCNetworkReachabilityCreateWithAddress (NULL, (const struct sockaddr *)&zero); - if (reachability == NULL) { - return NULL; - } - - instance = (mono_sc_reachability *)malloc (sizeof (mono_sc_reachability)); - instance->reachability = reachability; - instance->callback = callback; - - bzero (&context, sizeof (context)); - context.info = instance; - - if (!SCNetworkReachabilitySetCallback (reachability, _mono_sc_reachability_callback, &context) || - !SCNetworkReachabilityScheduleWithRunLoop (reachability, CFRunLoopGetCurrent (), kCFRunLoopDefaultMode)) { - mono_sc_reachability_free (instance); - return NULL; - } - - return instance; -} - -void -mono_sc_reachability_free (mono_sc_reachability *reachability) -{ - if (reachability != NULL) { - if (reachability->reachability != NULL) { - SCNetworkReachabilityUnscheduleFromRunLoop (reachability->reachability, - CFRunLoopGetCurrent (), kCFRunLoopDefaultMode); - CFRelease (reachability->reachability); - reachability->reachability = NULL; - } - - reachability->callback = NULL; - free (reachability); - reachability = NULL; - } -} - -int -mono_sc_reachability_is_available (mono_sc_reachability *reachability) -{ - SCNetworkReachabilityFlags flags; - return reachability != NULL && reachability->reachability != NULL && - SCNetworkReachabilityGetFlags (reachability->reachability, &flags) && - _mono_sc_reachability_is_available (flags); -} - -#else - -int -mono_sc_reachability_enabled (void) -{ - return 0; -} - -#endif -- cgit v1.2.3