From owner-p4-projects@FreeBSD.ORG Tue Sep 6 00:38:08 2005 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 088D116A421; Tue, 6 Sep 2005 00:38:08 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D34B816A41F for ; Tue, 6 Sep 2005 00:38:07 +0000 (GMT) (envelope-from soc-tyler@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 81D7243D45 for ; Tue, 6 Sep 2005 00:38:07 +0000 (GMT) (envelope-from soc-tyler@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j860c70F049813 for ; Tue, 6 Sep 2005 00:38:07 GMT (envelope-from soc-tyler@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j860c7mF049810 for perforce@freebsd.org; Tue, 6 Sep 2005 00:38:07 GMT (envelope-from soc-tyler@freebsd.org) Date: Tue, 6 Sep 2005 00:38:07 GMT Message-Id: <200509060038.j860c7mF049810@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to soc-tyler@freebsd.org using -f From: soc-tyler To: Perforce Change Reviews Cc: Subject: PERFORCE change 83158 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Sep 2005 00:38:08 -0000 http://perforce.freebsd.org/chv.cgi?CH=83158 Change 83158 by soc-tyler@soc-tyler_launchd on 2005/09/06 00:37:50 Start adding some compat options for OpenBSD....giving up until they get a kernel that doesn't suck. Affected files ... .. //depot/projects/soc2005/launchd/includes/compat.h#1 add .. //depot/projects/soc2005/launchd/launchd.c#22 edit .. //depot/projects/soc2005/launchd/launchdebugd/Makefile#3 edit .. //depot/projects/soc2005/launchd/launchdebugd/launchdebugd.c#2 edit .. //depot/projects/soc2005/launchd/launchproxy/Makefile#3 edit .. //depot/projects/soc2005/launchd/launchproxy/launchproxy.c#2 edit .. //depot/projects/soc2005/launchd/misc.c#2 edit Differences ... ==== //depot/projects/soc2005/launchd/launchd.c#22 (text+ko) ==== @@ -56,7 +56,9 @@ #include #include #include +#ifndef __OpenBSD__ #include +#endif #include #include #include @@ -80,6 +82,7 @@ #include "launch.h" #include "launch_priv.h" #include "launchd.h" +#include "compat.h" #ifdef _BUILD_DARWIN_ #include "bootstrap_internal.h" ==== //depot/projects/soc2005/launchd/launchdebugd/Makefile#3 (text+ko) ==== @@ -1,7 +1,7 @@ # $FreeBSD$ PROG= launchdebugd -SRCS= launchdebugd.c liblaunch.c +SRCS= launchdebugd.c liblaunch.c misc.c MAN= launchdebugd.8 LAUNCHD= ${.CURDIR}/../ ==== //depot/projects/soc2005/launchd/launchdebugd/launchdebugd.c#2 (text+ko) ==== @@ -35,6 +35,7 @@ #include #include "launch.h" +#include "compat.h" static void launch_print_obj(launch_data_t o, FILE *w); ==== //depot/projects/soc2005/launchd/launchproxy/Makefile#3 (text+ko) ==== @@ -1,12 +1,13 @@ # $FreeBSD$ PROG= launchproxy -SRCS= launchproxy.c liblaunch.c +SRCS= launchproxy.c liblaunch.c misc.c MAN= launchproxy.8 LAUNCHD= ${.CURDIR}/../ CFLAGS+= -g -Wall -W -Wshadow -Wpadded -I${LAUNCHD}/includes +LDFLAGS+= -lpthread .PATH: ${LAUNCHD} ==== //depot/projects/soc2005/launchd/launchproxy/launchproxy.c#2 (text+ko) ==== @@ -27,6 +27,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + #ifdef _BUILD_DARWIN_ #include #include @@ -53,6 +54,7 @@ #include "launch.h" #include "launchd.h" +#include "compat.h" static int kq = 0; ==== //depot/projects/soc2005/launchd/misc.c#2 (text+ko) ==== @@ -37,6 +37,7 @@ #include #include "property.h" +#include "compat.h" int property_count(properties list) { int count = 1; // there will be at least one element @@ -50,3 +51,11 @@ return count; } + +/* For some reason OpenBSD hasn't assimilated NetBSD's getprogname() */ +#ifdef __OpenBSD__ +const char *getprogname() { + return (__progname); +} +#endif +