mirror of
https://github.com/troglobit/finit.git
synced 2026-10-23 11:44:37 +00:00
Eliminate name clash with system signal.h header file.
Tried to solve the signal.h name clash by using #include_next, but seeing as this is not recommended[1] and breaks builds on some cross compilers, the files were simply renamed: signal.[ch] --> sig.[ch] [1] - http://gcc.gnu.org/onlinedocs/cpp/Wrapper-Headers.html Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
e496913f5c
commit
fbfffbc9a4
7 files changed
+11
-12
No files matched your search
@@ -29,11 +29,11 @@ ROOTDIR ?= $(shell pwd)
|
|||||||
PLUGIN_DIR ?= /lib/finit/plugins
|
PLUGIN_DIR ?= /lib/finit/plugins
|
||||||
|
|
||||||
#VERSION ?= $(shell git tag -l | tail -1)
|
#VERSION ?= $(shell git tag -l | tail -1)
|
||||||
VERSION ?= 1.0
|
VERSION ?= 1.1-pre
|
||||||
EXEC = finit
|
EXEC = finit
|
||||||
PKG = $(EXEC)-$(VERSION)
|
PKG = $(EXEC)-$(VERSION)
|
||||||
ARCHIVE = $(PKG).tar.xz
|
ARCHIVE = $(PKG).tar.xz
|
||||||
OBJS = finit.o conf.o helpers.o signal.o svc.o plugin.o
|
OBJS = finit.o conf.o helpers.o sig.o svc.o plugin.o
|
||||||
OBJS += strlcpy.o
|
OBJS += strlcpy.o
|
||||||
SRCS = $(OBJS:.o=.c)
|
SRCS = $(OBJS:.o=.c)
|
||||||
DEPS = $(addprefix .,$(SRCS:.c=.d))
|
DEPS = $(addprefix .,$(SRCS:.c=.d))
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
#include "private.h"
|
#include "private.h"
|
||||||
#include "plugin.h"
|
#include "plugin.h"
|
||||||
#include "svc.h"
|
#include "svc.h"
|
||||||
#include "signal.h"
|
#include "sig.h"
|
||||||
|
|
||||||
int debug = 0;
|
int debug = 0;
|
||||||
int verbose = 1;
|
int verbose = 1;
|
||||||
|
|||||||
@@ -47,7 +47,7 @@
|
|||||||
#include "finit.h"
|
#include "finit.h"
|
||||||
#include "helpers.h"
|
#include "helpers.h"
|
||||||
#include "private.h"
|
#include "private.h"
|
||||||
#include "signal.h"
|
#include "sig.h"
|
||||||
|
|
||||||
#define NUM_ARGS 16
|
#define NUM_ARGS 16
|
||||||
#define NUM_SCRIPTS 128 /* ought to be enough for anyone */
|
#define NUM_SCRIPTS 128 /* ought to be enough for anyone */
|
||||||
|
|||||||
+1
-1
@@ -23,11 +23,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
#include <signal.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "finit.h"
|
#include "finit.h"
|
||||||
#include "plugin.h"
|
#include "plugin.h"
|
||||||
#include "signal.h"
|
|
||||||
|
|
||||||
#define INIT_MAGIC 0x03091969
|
#define INIT_MAGIC 0x03091969
|
||||||
#define INIT_CMD_RUNLVL 1
|
#define INIT_CMD_RUNLVL 1
|
||||||
|
|||||||
+1
-2
@@ -38,7 +38,6 @@
|
|||||||
* It activates the kbrequest action.
|
* It activates the kbrequest action.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <signal.h>
|
|
||||||
#include <sys/reboot.h>
|
#include <sys/reboot.h>
|
||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
|
|
||||||
@@ -46,7 +45,7 @@
|
|||||||
#include "helpers.h"
|
#include "helpers.h"
|
||||||
#include "plugin.h"
|
#include "plugin.h"
|
||||||
#include "private.h"
|
#include "private.h"
|
||||||
#include "signal.h"
|
#include "sig.h"
|
||||||
|
|
||||||
static int stopped = 0;
|
static int stopped = 0;
|
||||||
|
|
||||||
+4
-4
@@ -22,10 +22,10 @@
|
|||||||
* THE SOFTWARE.
|
* THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef FINIT_SIGNAL_H_
|
#ifndef FINIT_SIG_H_
|
||||||
#define FINIT_SIGNAL_H_
|
#define FINIT_SIG_H_
|
||||||
|
|
||||||
#include_next <signal.h>
|
#include <signal.h>
|
||||||
|
|
||||||
#define SYNC_SHUTDOWN "/var/lock/finit.shutdown"
|
#define SYNC_SHUTDOWN "/var/lock/finit.shutdown"
|
||||||
#define SYNC_STOPPED "/var/lock/finit.stopped"
|
#define SYNC_STOPPED "/var/lock/finit.stopped"
|
||||||
@@ -59,7 +59,7 @@ int sig_stopped (void);
|
|||||||
void sig_init (void);
|
void sig_init (void);
|
||||||
void sig_setup (void);
|
void sig_setup (void);
|
||||||
|
|
||||||
#endif /* FINIT_SIGNAL_H_ */
|
#endif /* FINIT_SIG_H_ */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Local Variables:
|
* Local Variables:
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
#include "finit.h"
|
#include "finit.h"
|
||||||
#include "helpers.h"
|
#include "helpers.h"
|
||||||
#include "private.h"
|
#include "private.h"
|
||||||
#include "signal.h"
|
#include "sig.h"
|
||||||
#include "svc.h"
|
#include "svc.h"
|
||||||
|
|
||||||
/* The registered services are kept in shared memory for easy read-only access
|
/* The registered services are kept in shared memory for easy read-only access
|
||||||
|
|||||||
Reference in new issue
Block a user