From 9b801d551b70bd4b19e1b29fd3a257bec8051842 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Thu, 2 May 2013 13:59:18 +0200 Subject: [PATCH] darwin: rename darwin-getproctitle.m Rename it to darwin-getproctitle.c, it doesn't need an Objective-C compiler. Fix up -Wpedantic warnings about void to function pointer casts and include to get the GetCurrentProcess() function prototype. --- config-unix.mk | 5 ----- src/unix/{darwin-proctitle.m => darwin-proctitle.c} | 5 +++-- uv.gyp | 2 +- 3 files changed, 4 insertions(+), 8 deletions(-) rename src/unix/{darwin-proctitle.m => darwin-proctitle.c} (94%) diff --git a/config-unix.mk b/config-unix.mk index ae510a33..2ab534f4 100644 --- a/config-unix.mk +++ b/config-unix.mk @@ -18,8 +18,6 @@ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. -OBJC ?= $(CC) - E= CSTDFLAG=--std=c89 -pedantic -Wall -Wextra -Wno-unused-parameter CFLAGS += -g @@ -184,9 +182,6 @@ test/%.o: test/%.c include/uv.h test/.buildstamp clean-platform: $(RM) test/run-{tests,benchmarks}.dSYM $(OBJS) $(OBJS:%.o=%.pic.o) src/unix/uv-dtrace.h -%.pic.o %.o: %.m - $(OBJC) $(CPPFLAGS) $(CFLAGS) -c $^ -o $@ - src/unix/uv-dtrace.h: src/unix/uv-dtrace.d dtrace -h -xnolibs -s $< -o $@ diff --git a/src/unix/darwin-proctitle.m b/src/unix/darwin-proctitle.c similarity index 94% rename from src/unix/darwin-proctitle.m rename to src/unix/darwin-proctitle.c index 5d7a9187..e6c85905 100644 --- a/src/unix/darwin-proctitle.m +++ b/src/unix/darwin-proctitle.c @@ -19,6 +19,7 @@ */ #include +#include int uv__set_process_title(const char* title) { @@ -43,14 +44,14 @@ int uv__set_process_title(const char* title) { if (launch_services_bundle == NULL) return -1; - ls_get_current_application_asn = + ls_get_current_application_asn = (LSGetCurrentApplicationASNType) CFBundleGetFunctionPointerForName(launch_services_bundle, CFSTR("_LSGetCurrentApplicationASN")); if (ls_get_current_application_asn == NULL) return -1; - ls_set_application_information_item = + ls_set_application_information_item = (LSSetApplicationInformationItemType) CFBundleGetFunctionPointerForName(launch_services_bundle, CFSTR("_LSSetApplicationInformationItem")); diff --git a/uv.gyp b/uv.gyp index 17202d1a..0effb921 100644 --- a/uv.gyp +++ b/uv.gyp @@ -176,7 +176,7 @@ 'sources': [ 'src/unix/darwin.c', 'src/unix/fsevents.c', - 'src/unix/darwin-proctitle.m', + 'src/unix/darwin-proctitle.c', ], 'link_settings': { 'libraries': [