bin/113074: [ patch ] ppp(8): include <strings.h> for strcasecmp(3)
Roman Bogorodskiy
novel at FreeBSD.org
Mon May 28 05:30:03 UTC 2007
>Number: 113074
>Category: bin
>Synopsis: [ patch ] ppp(8): include <strings.h> for strcasecmp(3)
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: update
>Submitter-Id: current-users
>Arrival-Date: Mon May 28 05:30:02 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator: Roman Bogorodskiy
>Release: FreeBSD 6.0-STABLE i386
>Organization:
>Environment:
>Description:
strcasecmp(3) function moved from string.h to strings.h for
IEEE Std 1003.1-2001 (``POSIX.1'') compliance. However,
ppp(8) doesn't include strings.h header. It still compiles
without warnings because string.h includes strings.h for
compatibility, but I think it would be better to include
strings.h explicitly.
Noted by: Slava Semushin
>How-To-Repeat:
>Fix:
--- ppp_strings.h.diff begins here ---
Index: bundle.c
===================================================================
RCS file: /home/ncvs/src/usr.sbin/ppp/bundle.c,v
retrieving revision 1.136
diff -u -r1.136 bundle.c
--- bundle.c 29 Nov 2004 17:11:14 -0000 1.136
+++ bundle.c 28 May 2007 05:12:00 -0000
@@ -48,6 +48,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <strings.h>
#include <sys/uio.h>
#include <sys/wait.h>
#include <termios.h>
Index: command.c
===================================================================
RCS file: /home/ncvs/src/usr.sbin/ppp/command.c,v
retrieving revision 1.307
diff -u -r1.307 command.c
--- command.c 25 May 2007 13:45:48 -0000 1.307
+++ command.c 28 May 2007 05:12:01 -0000
@@ -46,6 +46,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <strings.h>
#include <sys/wait.h>
#include <termios.h>
#include <unistd.h>
Index: datalink.c
===================================================================
RCS file: /home/ncvs/src/usr.sbin/ppp/datalink.c,v
retrieving revision 1.77
diff -u -r1.77 datalink.c
--- datalink.c 11 Oct 2004 09:45:58 -0000 1.77
+++ datalink.c 28 May 2007 05:12:01 -0000
@@ -38,6 +38,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <strings.h>
#include <sys/uio.h>
#include <termios.h>
Index: defs.c
===================================================================
RCS file: /home/ncvs/src/usr.sbin/ppp/defs.c,v
retrieving revision 1.48
diff -u -r1.48 defs.c
--- defs.c 5 Sep 2004 01:46:51 -0000 1.48
+++ defs.c 28 May 2007 05:12:01 -0000
@@ -39,6 +39,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <strings.h>
#if defined(__FreeBSD__) && !defined(NOKLDLOAD)
#include <sys/module.h>
#endif
Index: filter.c
===================================================================
RCS file: /home/ncvs/src/usr.sbin/ppp/filter.c,v
retrieving revision 1.52
diff -u -r1.52 filter.c
--- filter.c 5 Sep 2004 01:46:51 -0000 1.52
+++ filter.c 28 May 2007 05:12:01 -0000
@@ -40,6 +40,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <strings.h>
#include <termios.h>
#include "layer.h"
Index: ipcp.c
===================================================================
RCS file: /home/ncvs/src/usr.sbin/ppp/ipcp.c,v
retrieving revision 1.123
diff -u -r1.123 ipcp.c
--- ipcp.c 27 Jan 2005 14:09:33 -0000 1.123
+++ ipcp.c 28 May 2007 05:12:01 -0000
@@ -45,6 +45,7 @@
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
+#include <strings.h>
#include <sys/stat.h>
#include <termios.h>
#include <unistd.h>
Index: log.c
===================================================================
RCS file: /home/ncvs/src/usr.sbin/ppp/log.c,v
retrieving revision 1.53
diff -u -r1.53 log.c
--- log.c 17 Jul 2004 01:07:52 -0000 1.53
+++ log.c 28 May 2007 05:12:02 -0000
@@ -32,6 +32,7 @@
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
+#include <strings.h>
#include <syslog.h>
#include <termios.h>
Index: mp.c
===================================================================
RCS file: /home/ncvs/src/usr.sbin/ppp/mp.c,v
retrieving revision 1.55
diff -u -r1.55 mp.c
--- mp.c 6 Sep 2004 00:07:58 -0000 1.55
+++ mp.c 28 May 2007 05:12:02 -0000
@@ -41,6 +41,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <strings.h>
#include <sys/stat.h>
#include <termios.h>
#include <unistd.h>
Index: nat_cmd.c
===================================================================
RCS file: /home/ncvs/src/usr.sbin/ppp/nat_cmd.c,v
retrieving revision 1.62
diff -u -r1.62 nat_cmd.c
--- nat_cmd.c 11 Oct 2004 09:45:58 -0000 1.62
+++ nat_cmd.c 28 May 2007 05:12:02 -0000
@@ -41,6 +41,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <strings.h>
#include <termios.h>
#ifdef LOCALNAT
Index: physical.c
===================================================================
RCS file: /home/ncvs/src/usr.sbin/ppp/physical.c,v
retrieving revision 1.59
diff -u -r1.59 physical.c
--- physical.c 11 Oct 2004 09:45:58 -0000 1.59
+++ physical.c 28 May 2007 05:12:02 -0000
@@ -37,6 +37,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <strings.h>
#include <sys/tty.h> /* TIOCOUTQ */
#include <sys/uio.h>
#include <sysexits.h>
Index: radius.c
===================================================================
RCS file: /home/ncvs/src/usr.sbin/ppp/radius.c,v
retrieving revision 1.54
diff -u -r1.54 radius.c
--- radius.c 25 May 2007 13:45:49 -0000 1.54
+++ radius.c 28 May 2007 05:12:02 -0000
@@ -55,6 +55,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <strings.h>
#include <sys/time.h>
#include <termios.h>
#include <unistd.h>
Index: systems.c
===================================================================
RCS file: /home/ncvs/src/usr.sbin/ppp/systems.c,v
retrieving revision 1.68
diff -u -r1.68 systems.c
--- systems.c 5 Sep 2004 01:46:52 -0000 1.68
+++ systems.c 28 May 2007 05:12:02 -0000
@@ -35,6 +35,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <strings.h>
#include <termios.h>
#include "defs.h"
Index: tcp.c
===================================================================
RCS file: /home/ncvs/src/usr.sbin/ppp/tcp.c,v
retrieving revision 1.19
diff -u -r1.19 tcp.c
--- tcp.c 5 Sep 2004 01:46:52 -0000 1.19
+++ tcp.c 28 May 2007 05:12:02 -0000
@@ -36,6 +36,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <strings.h>
#include <sys/stat.h>
#include <sys/uio.h>
#include <termios.h>
Index: udp.c
===================================================================
RCS file: /home/ncvs/src/usr.sbin/ppp/udp.c,v
retrieving revision 1.20
diff -u -r1.20 udp.c
--- udp.c 5 Sep 2004 01:46:52 -0000 1.20
+++ udp.c 28 May 2007 05:12:02 -0000
@@ -36,6 +36,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <strings.h>
#include <sysexits.h>
#include <sys/stat.h>
#include <sys/uio.h>
--- ppp_strings.h.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list