commit d629a1d5c10a1e1a04e463b166e00c74c65702ac
parent 3dd08b08c0cdc4d4549d9680b4871ab224fc8f0d
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Wed, 2 Apr 2014 15:03:30 +0200
Makefile: add sfeed_web, use c99 for build
Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
Diffstat:
3 files changed, 13 insertions(+), 11 deletions(-)
diff --git a/Makefile b/Makefile
@@ -70,7 +70,7 @@ install: all
@echo installing executable file to ${DESTDIR}${PREFIX}/bin
@mkdir -p ${DESTDIR}${PREFIX}/bin
@cp -f sfeed sfeed_update sfeed_plain sfeed_html sfeed_frames sfeed_xmlenc \
- sfeed_opml_import sfeed_opml_export ${DESTDIR}${PREFIX}/bin
+ sfeed_opml_import sfeed_opml_export sfeed_web ${DESTDIR}${PREFIX}/bin
@chmod 755 ${DESTDIR}${PREFIX}/bin/sfeed \
${DESTDIR}${PREFIX}/bin/sfeed_update \
${DESTDIR}${PREFIX}/bin/sfeed_plain \
@@ -78,7 +78,8 @@ install: all
${DESTDIR}${PREFIX}/bin/sfeed_frames \
${DESTDIR}${PREFIX}/bin/sfeed_xmlenc \
${DESTDIR}${PREFIX}/bin/sfeed_opml_import \
- ${DESTDIR}${PREFIX}/bin/sfeed_opml_export
+ ${DESTDIR}${PREFIX}/bin/sfeed_opml_export \
+ ${DESTDIR}${PREFIX}/bin/sfeed_web
@mkdir -p ${DESTDIR}${PREFIX}/share/sfeed
@cp -f sfeedrc.example ${DESTDIR}${PREFIX}/share/${NAME}
@cp -f style.css ${DESTDIR}${PREFIX}/share/${NAME}
@@ -115,6 +116,7 @@ uninstall:
${DESTDIR}${PREFIX}/bin/sfeed_xmlenc \
${DESTDIR}${PREFIX}/bin/sfeed_opml_import \
${DESTDIR}${PREFIX}/bin/sfeed_opml_export \
+ ${DESTDIR}${PREFIX}/bin/sfeed_web \
${DESTDIR}${PREFIX}/share/${NAME}/sfeedrc.example \
${DESTDIR}${PREFIX}/share/${NAME}/style.css
@-rmdir ${DESTDIR}${PREFIX}/share/${NAME}
diff --git a/config.mk b/config.mk
@@ -12,13 +12,13 @@ INCS =
LIBS = -lc
# debug
-CFLAGS = -fstack-protector-all -O0 -g -ansi -Wall -Wextra -pedantic -DVERSION=\"${VERSION}\"
-CFLAGS = -O0 -g -ansi -Wall -Wextra -pedantic -DVERSION=\"${VERSION}\"
-LDFLAGS = ${LIBS}
+#CFLAGS = -fstack-protector-all -O0 -g -std=c99 -Wall -Wextra -pedantic -DVERSION=\"${VERSION}\" -D_POSIX_C_SOURCE=200809L
+##CFLAGS = -O0 -g -cstd=c99 -Wall -Wextra -pedantic -DVERSION=\"${VERSION}\"
+#LDFLAGS = ${LIBS}
# optimized
-#CFLAGS = -O2 -ansi -DVERSION=\"${VERSION}\"
-#LDFLAGS = -s ${LIBS}
+CFLAGS = -O2 -std=c99 -DVERSION=\"${VERSION}\" -D_POSIX_C_SOURCE=200809L
+LDFLAGS = -s ${LIBS}
# Solaris
#CFLAGS = -fast ${INCS} -DVERSION=\"${VERSION}\"
diff --git a/xml.c b/xml.c
@@ -11,7 +11,7 @@ xmlparser_init(XMLParser *x, FILE *fp) {
x->fp = fp;
}
-__inline__ int /* like getc(), but do some smart buffering */
+static __inline__ int /* like getc(), but do some smart buffering */
xmlparser_getnext(XMLParser *x) {
if(x->readoffset >= x->readlastbytes) {
x->readoffset = 0;
@@ -21,7 +21,7 @@ xmlparser_getnext(XMLParser *x) {
return (int)x->readbuf[x->readoffset++];
}
-__inline__ void
+static __inline__ void
xmlparser_parseattrs(XMLParser *x) {
size_t namelen = 0, valuelen;
int c, endsep, endname = 0;
@@ -114,7 +114,7 @@ xmlparser_parseattrs(XMLParser *x) {
}
}
-__inline__ void
+static __inline__ void
xmlparser_parsecomment(XMLParser *x) {
size_t datalen = 0, i = 0;
int c;
@@ -157,7 +157,7 @@ xmlparser_parsecomment(XMLParser *x) {
* test comment function too for similar bug?
*
*/
-__inline__ void
+static __inline__ void
xmlparser_parsecdata(XMLParser *x) {
size_t datalen = 0, i = 0;
int c;