From c187d9abe735d867f1dc47db5646495250394bc9 Mon Sep 17 00:00:00 2001 From: Brian Norris Date: Fri, 27 May 2016 13:06:58 -0700 Subject: Factor out generic 'HAVE_ONDEMAND' macro flag HAVE_SYSTEMD and HAVE_LAUNCHD use very similar code for on-demand launching of cupsd, and if we want to add one more (e.g., upstart) it's easier to just use a single common flag: HAVE_ONDEMAND. --- vcnet/config.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'vcnet') diff --git a/vcnet/config.h b/vcnet/config.h index e8e73f6b1..0f1291cc5 100644 --- a/vcnet/config.h +++ b/vcnet/config.h @@ -777,4 +777,10 @@ static __inline int _cups_abs(int i) { return (i < 0 ? -i : i); } # endif /* __GNUC__ || __STDC_VERSION__ */ #endif /* !HAVE_ABS && !abs */ +#if defined(HAVE_LAUNCHD) || defined(HAVE_SYSTEMD) +# define HAVE_ONDEMAND +#else +# undef HAVE_ONDEMAND +#endif + #endif /* !_CUPS_CONFIG_H_ */ -- cgit v1.2.1 From 441de8b2e031703feec2d8e7bacab0e1223e818a Mon Sep 17 00:00:00 2001 From: Brian Norris Date: Fri, 27 May 2016 13:07:05 -0700 Subject: support Upstart socket activation Inspired by code here: https://bugs.launchpad.net/upstart/+bug/1276713 With significant refactoring and bug-fixing. Notably, Upstart only supports passing a single file descriptor via UPSTART_FDS, so systems that want to use this support will need to configure CUPS appropriately in order to use this. --- vcnet/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'vcnet') diff --git a/vcnet/config.h b/vcnet/config.h index 0f1291cc5..a4b01138c 100644 --- a/vcnet/config.h +++ b/vcnet/config.h @@ -777,7 +777,7 @@ static __inline int _cups_abs(int i) { return (i < 0 ? -i : i); } # endif /* __GNUC__ || __STDC_VERSION__ */ #endif /* !HAVE_ABS && !abs */ -#if defined(HAVE_LAUNCHD) || defined(HAVE_SYSTEMD) +#if defined(HAVE_LAUNCHD) || defined(HAVE_SYSTEMD) || defined(HAVE_UPSTART) # define HAVE_ONDEMAND #else # undef HAVE_ONDEMAND -- cgit v1.2.1