diff --git a/init/Makefile b/init/Makefile
index 1038d5dc..a795eb17 100644
--- a/init/Makefile
+++ b/init/Makefile
@@ -4,10 +4,10 @@ include ../build-aux/version.mak
include ../build-aux/dirs.mak
OPTLEVEL?=$(DEFAULT_OPTLEVEL)
-CXXFLAGS?=$(OPTLEVEL)
+CFLAGS?=$(OPTLEVEL)
+CFLAGS:=$(CFLAGS) -Wall -Wextra
CPPFLAGS:=$(CPPFLAGS) -DVERSIONSTR=\"$(VERSION)\"
-CXXFLAGS:=$(CXXFLAGS) -Wall -Wextra -fno-exceptions -fno-rtti
BINARY=init
@@ -19,10 +19,10 @@ all: $(BINARY)
.PHONY: all install clean
$(BINARY): $(OBJS)
- $(CXX) $(OBJS) -o $(BINARY) $(CXXFLAGS) -lmount $(LIBS)
+ $(CC) $(CFLAGS) $(OBJS) -o $(BINARY) -lmount $(LIBS)
-%.o: %.c++
- $(CXX) -std=gnu++11 $(CPPFLAGS) $(CXXFLAGS) -c $< -o $@
+%.o: %.c
+ $(CC) -std=gnu11 $(CFLAGS) $(CPPFLAGS) -c $< -o $@
install: all
mkdir -p $(DESTDIR)$(SBINDIR)
diff --git a/init/init.c++ b/init/init.c
similarity index 99%
rename from init/init.c++
rename to init/init.c
index eeaf8c53..21319a98 100644
--- a/init/init.c++
+++ b/init/init.c
@@ -15,14 +15,11 @@
You should have received a copy of the GNU General Public License along with
this program. If not, see .
- init.c++
+ init.c
Start the operating system.
*******************************************************************************/
-#define __STDC_CONSTANT_MACROS
-#define __STDC_LIMIT_MACROS
-
#include
#include
#include
@@ -41,6 +38,7 @@
#include
#include
#include
+#include
#include
#include
#include
@@ -973,7 +971,8 @@ int main(int argc, char* argv[])
break;
if ( arg[1] != '-' )
{
- while ( char c = *++arg ) switch ( c )
+ char c;
+ while ( (c = *++arg) ) switch ( c )
{
default:
fprintf(stderr, "%s: unknown option -- '%c'\n", argv0, c);