]> granicus.if.org Git - sudo/commitdiff
Include strings.h even if string.h exists since they may define
authorTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 29 Jun 2010 16:45:11 +0000 (12:45 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 29 Jun 2010 16:45:11 +0000 (12:45 -0400)
different things.  Fixes warnings on AIX and others.

--HG--
branch : 1.7

58 files changed:
alias.c
alloc.c
auth/afs.c
auth/aix_auth.c
auth/bsdauth.c
auth/dce.c
auth/fwtk.c
auth/kerb4.c
auth/kerb5.c
auth/pam.c
auth/passwd.c
auth/rfc1938.c
auth/secureware.c
auth/securid.c
auth/securid5.c
auth/sia.c
auth/sudo_auth.c
boottime.c
check.c
defaults.c
env.c
exec.c
exec_pty.c
fileops.c
find_path.c
fnmatch.c
get_pty.c
getcwd.c
getdate.c
getdate.y
getline.c
getspwuid.c
glob.c
goodpath.c
gram.c
gram.y
interfaces.c
iolog.c
lbuf.c
ldap.c
logging.c
match.c
parse.c
parse_args.c
pwutil.c
set_perms.c
snprintf.c
sudo.c
sudo_edit.c
sudo_nss.c
sudoreplay.c
term.c
testsudoers.c
tgetpass.c
toke.c
toke.l
tsgetgrpw.c
visudo.c

diff --git a/alias.c b/alias.c
index c44636ab742dc25567ab409a8e79d251715d86a4..b1f57e7ecafb45a12ec1ff119dd3643e9c5f0d45 100644 (file)
--- a/alias.c
+++ b/alias.c
 #endif /* STDC_HEADERS */
 #ifdef HAVE_STRING_H
 # include <string.h>
-#else
-# ifdef HAVE_STRINGS_H
-#  include <strings.h>
-# endif
+#endif /* HAVE_STRING_H */
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
 #endif /* HAVE_STRING_H */
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
diff --git a/alloc.c b/alloc.c
index d8bd857cee2e31df2f36e2cf530ed8c3613eaf27..8e6a7e2623af006a7d6e8d7ca226934d130777cc 100644 (file)
--- a/alloc.c
+++ b/alloc.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999-2005, 2007
+ * Copyright (c) 1999-2005, 2007, 2010
  *     Todd C. Miller <Todd.Miller@courtesan.com>
  *
  * Permission to use, copy, modify, and distribute this software for any
 #endif /* STDC_HEADERS */
 #ifdef HAVE_STRING_H
 # include <string.h>
-#else
-# ifdef HAVE_STRINGS_H
-#  include <strings.h>
-# endif
+#endif /* HAVE_STRING_H */
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
 #endif /* HAVE_STRING_H */
 #if defined(HAVE_MALLOC_H) && !defined(STDC_HEADERS)
 # include <malloc.h>
index 337cd4d2069ced61defe24da83bae771a88fcc54..2b9d7b9bf4a0dc61ccfc763cc505cc8c62c8ec97 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2001-2005, 2007
+ * Copyright (c) 1999, 2001-2005, 2007, 2010
  *     Todd C. Miller <Todd.Miller@courtesan.com>
  *
  * Permission to use, copy, modify, and distribute this software for any
 #endif /* STDC_HEADERS */
 #ifdef HAVE_STRING_H
 # include <string.h>
-#else
-# ifdef HAVE_STRINGS_H
-#  include <strings.h>
-# endif
+#endif /* HAVE_STRING_H */
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
 #endif /* HAVE_STRING_H */
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
index 61c5adb1db12e4301b937a3e398c6993ba74b354..7a776be0fe1fb66c34895ecbab9b73304fd127a2 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999-2005, 2007-2009 Todd C. Miller <Todd.Miller@courtesan.com>
+ * Copyright (c) 1999-2005, 2007-2010 Todd C. Miller <Todd.Miller@courtesan.com>
  *
  * Permission to use, copy, modify, and distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
 #endif /* STDC_HEADERS */
 #ifdef HAVE_STRING_H
 # include <string.h>
-#else
-# ifdef HAVE_STRINGS_H
-#  include <strings.h>
-# endif
+#endif /* HAVE_STRING_H */
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
 #endif /* HAVE_STRING_H */
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
index f70e90b004ad11dcf87ce3a67ba2e06ebe86210d..2539713acf23726aa27cc09bb107f29b947b5eb0 100644 (file)
@@ -1,5 +1,6 @@
 /*
- * Copyright (c) 2000-2005, 2007-2008 Todd C. Miller <Todd.Miller@courtesan.com>
+ * Copyright (c) 2000-2005, 2007-2008, 2010
+ *     Todd C. Miller <Todd.Miller@courtesan.com>
  *
  * Permission to use, copy, modify, and distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
 #endif /* STDC_HEADERS */
 #ifdef HAVE_STRING_H
 # include <string.h>
-#else
-# ifdef HAVE_STRINGS_H
-#  include <strings.h>
-# endif
+#endif /* HAVE_STRING_H */
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
 #endif /* HAVE_STRING_H */
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
index 943e064c838369dbad9de5b9e5e4fdc64b85be96..76b43b3f8fa4995513bc8afcbc03836b635df6a9 100644 (file)
@@ -1,5 +1,6 @@
 /*
- * Copyright (c) 1996, 1998-2005 Todd C. Miller <Todd.Miller@courtesan.com>
+ * Copyright (c) 1996, 1998-2005, 2010
+ *     Todd C. Miller <Todd.Miller@courtesan.com>
  *
  * Permission to use, copy, modify, and distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
 #endif /* STDC_HEADERS */
 #ifdef HAVE_STRING_H
 # include <string.h>
-#else
-# ifdef HAVE_STRINGS_H
-#  include <strings.h>
-# endif
+#endif /* HAVE_STRING_H */
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
 #endif /* HAVE_STRING_H */
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
index 853fc3ba346e6fadf5f36ac9caeaa78915543fa3..fba99e8095e993ca5f9bfdce771e9071909f5b3b 100644 (file)
@@ -1,5 +1,6 @@
 /*
- * Copyright (c) 1999-2005, 2008 Todd C. Miller <Todd.Miller@courtesan.com>
+ * Copyright (c) 1999-2005, 2008, 2010
+ *     Todd C. Miller <Todd.Miller@courtesan.com>
  *
  * Permission to use, copy, modify, and distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
 #endif /* STDC_HEADERS */
 #ifdef HAVE_STRING_H
 # include <string.h>
-#else
-# ifdef HAVE_STRINGS_H
-#  include <strings.h>
-# endif
+#endif /* HAVE_STRING_H */
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
 #endif /* HAVE_STRING_H */
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
index 4b3e38147a1983d2d211baa1c1a5eb18a20486aa..f3107a063536834d30ea0b6468352c8d403294ef 100644 (file)
@@ -1,5 +1,6 @@
 /*
- * Copyright (c) 1999-2005, 2007 Todd C. Miller <Todd.Miller@courtesan.com>
+ * Copyright (c) 1999-2005, 2007, 2010
+ *     Todd C. Miller <Todd.Miller@courtesan.com>
  *
  * Permission to use, copy, modify, and distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
 #endif /* STDC_HEADERS */
 #ifdef HAVE_STRING_H
 # include <string.h>
-#else
-# ifdef HAVE_STRINGS_H
-#  include <strings.h>
-# endif
+#endif /* HAVE_STRING_H */
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
 #endif /* HAVE_STRING_H */
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
index d03bd9a791c81125dafabe736018931eaa0dca1c..230898f7f0e02f2299f7162df821b298532ad995 100644 (file)
@@ -1,5 +1,6 @@
 /*
- * Copyright (c) 1999-2005, 2007-2008 Todd C. Miller <Todd.Miller@courtesan.com>
+ * Copyright (c) 1999-2005, 2007-2008, 2010
+ *     Todd C. Miller <Todd.Miller@courtesan.com>
  *
  * Permission to use, copy, modify, and distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
 #endif /* STDC_HEADERS */
 #ifdef HAVE_STRING_H
 # include <string.h>
-#else
-# ifdef HAVE_STRINGS_H
-#  include <strings.h>
-# endif
+#endif /* HAVE_STRING_H */
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
 #endif /* HAVE_STRING_H */
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
index 57add9ff2711e0db038206873738a372192e9eb9..257b64d86311db817db3e44a0c97e6213002c44c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999-2005, 2007-2009 Todd C. Miller <Todd.Miller@courtesan.com>
+ * Copyright (c) 1999-2005, 2007-2010 Todd C. Miller <Todd.Miller@courtesan.com>
  *
  * Permission to use, copy, modify, and distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
 # endif
 #endif /* STDC_HEADERS */
 #ifdef HAVE_STRING_H
-# if defined(HAVE_MEMORY_H) && !defined(STDC_HEADERS)
-#  include <memory.h>
-# endif
 # include <string.h>
-#else
-# ifdef HAVE_STRINGS_H
-#  include <strings.h>
-# endif
 #endif /* HAVE_STRING_H */
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif /* HAVE_STRINGS_H */
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
 #endif /* HAVE_UNISTD_H */
index e35130664c98e8ca34bd4c418982d2b8b6320c94..4f9efb8a28d0170350e5eee12b7be91e4a137df6 100644 (file)
@@ -1,5 +1,6 @@
 /*
- * Copyright (c) 1999-2005 Todd C. Miller <Todd.Miller@courtesan.com>
+ * Copyright (c) 1999-2005, 2010
+ *     Todd C. Miller <Todd.Miller@courtesan.com>
  *
  * Permission to use, copy, modify, and distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
 #endif /* STDC_HEADERS */
 #ifdef HAVE_STRING_H
 # include <string.h>
-#else
-# ifdef HAVE_STRINGS_H
-#  include <strings.h>
-# endif
 #endif /* HAVE_STRING_H */
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif /* HAVE_STRINGS_H */
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
 #endif /* HAVE_UNISTD_H */
index 1769e6f7fd8d392a0203b2ae69c0bb2c3a769c01..3bc39c302142fd4cd04ef215d66134e3b311e6d5 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1994-1996, 1998-2005
+ * Copyright (c) 1994-1996, 1998-2005, 2010
  *     Todd C. Miller <Todd.Miller@courtesan.com>
  *
  * Permission to use, copy, modify, and distribute this software for any
 #endif /* STDC_HEADERS */
 #ifdef HAVE_STRING_H
 # include <string.h>
-#else
-# ifdef HAVE_STRINGS_H
-#  include <strings.h>
-# endif
 #endif /* HAVE_STRING_H */
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif /* HAVE_STRINGS_H */
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
 #endif /* HAVE_UNISTD_H */
index d2171270646e941dca82ba94436d6d963f8e58f5..e7148d3f7e51f4087848fc06e85d044d83e69e0f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998-2005 Todd C. Miller <Todd.Miller@courtesan.com>
+ * Copyright (c) 1998-2005, 2010 Todd C. Miller <Todd.Miller@courtesan.com>
  *
  * Permission to use, copy, modify, and distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
 #endif /* STDC_HEADERS */
 #ifdef HAVE_STRING_H
 # include <string.h>
-#else
-# ifdef HAVE_STRINGS_H
-#  include <strings.h>
-# endif
 #endif /* HAVE_STRING_H */
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif /* HAVE_STRINGS_H */
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
 #endif /* HAVE_UNISTD_H */
index 4edddb4e515053f013ab9bd2dadb473ff8f2296b..6aec1098f40844323432c5a9d82ab72e61740532 100644 (file)
@@ -1,5 +1,6 @@
 /*
- * Copyright (c) 1999-2005, 2007 Todd C. Miller <Todd.Miller@courtesan.com>
+ * Copyright (c) 1999-2005, 2007, 2010
+ *     Todd C. Miller <Todd.Miller@courtesan.com>
  *
  * Permission to use, copy, modify, and distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
 #endif /* STDC_HEADERS */
 #ifdef HAVE_STRING_H
 # include <string.h>
-#else
-# ifdef HAVE_STRINGS_H
-#  include <strings.h>
-# endif
 #endif /* HAVE_STRING_H */
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif /* HAVE_STRINGS_H */
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
 #endif /* HAVE_UNISTD_H */
index b59bf8f5d83b8d2ce88a1f144829d2d24b0889fb..ef9e2283fd811a123a7d3f082933da79fbc15d84 100644 (file)
@@ -1,5 +1,6 @@
 /*
- * Copyright (c) 1999-2005, 2007 Todd C. Miller <Todd.Miller@courtesan.com>
+ * Copyright (c) 1999-2005, 2007, 2010
+ *     Todd C. Miller <Todd.Miller@courtesan.com>
  * Copyright (c) 2002 Michael Stroucken <michael@stroucken.org>
  *
  * Permission to use, copy, modify, and distribute this software for any
 #endif /* STDC_HEADERS */
 #ifdef HAVE_STRING_H
 # include <string.h>
-#else
-# ifdef HAVE_STRINGS_H
-#  include <strings.h>
-# endif
 #endif /* HAVE_STRING_H */
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif /* HAVE_STRINGS_H */
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
 #endif /* HAVE_UNISTD_H */
index 1f919f481085d831fbefa604000133688548fa15..188676a7abe15d9e04b7cfc29d67d488cfca37f1 100644 (file)
@@ -1,5 +1,6 @@
 /*
- * Copyright (c) 1999-2005, 2007 Todd C. Miller <Todd.Miller@courtesan.com>
+ * Copyright (c) 1999-2005, 2007, 2010
+ *     Todd C. Miller <Todd.Miller@courtesan.com>
  *
  * Permission to use, copy, modify, and distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
 #endif /* STDC_HEADERS */
 #ifdef HAVE_STRING_H
 # include <string.h>
-#else
-# ifdef HAVE_STRINGS_H
-#  include <strings.h>
-# endif
 #endif /* HAVE_STRING_H */
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif /* HAVE_STRINGS_H */
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
 #endif /* HAVE_UNISTD_H */
index 58a079bb0981b3cf1ccdf16dcdbda9d88f4592c2..f17ae8d0f11f1349d61eddcb1231613e4faf4c68 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999-2005, 2008-2009 Todd C. Miller <Todd.Miller@courtesan.com>
+ * Copyright (c) 1999-2005, 2008-2010 Todd C. Miller <Todd.Miller@courtesan.com>
  *
  * Permission to use, copy, modify, and distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
 # endif
 #endif /* STDC_HEADERS */
 #ifdef HAVE_STRING_H
-# if defined(HAVE_MEMORY_H) && !defined(STDC_HEADERS)
-#  include <memory.h>
-# endif
 # include <string.h>
-#else
-# ifdef HAVE_STRINGS_H
-#  include <strings.h>
-# endif
 #endif /* HAVE_STRING_H */
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif /* HAVE_STRINGS_H */
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
 #endif /* HAVE_UNISTD_H */
index 6af20aca981b111d6bc59ff712209930d32bd163..a4dba43d871552a74ca036010ecbae1880652ec1 100644 (file)
 # endif
 #endif /* STDC_HEADERS */
 #ifdef HAVE_STRING_H
-# include <string.h>
-#else
-# ifdef HAVE_STRINGS_H
-#  include <strings.h>
+# if defined(HAVE_MEMORY_H) && !defined(STDC_HEADERS)
+#  include <memory.h>
 # endif
+# include <string.h>
 #endif /* HAVE_STRING_H */
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif /* HAVE_STRINGS_H */
 #include <limits.h>
 
 #ifdef HAVE_SYSCTL
diff --git a/check.c b/check.c
index 11119e5ffbf2a7b9878150da7d9be2818df11792..8b7834a03b0f3a240f62396f29f9100cea2fa7a5 100644 (file)
--- a/check.c
+++ b/check.c
 #endif /* STDC_HEADERS */
 #ifdef HAVE_STRING_H
 # include <string.h>
-#else
-# ifdef HAVE_STRINGS_H
-#  include <strings.h>
-# endif
 #endif /* HAVE_STRING_H */
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif /* HAVE_STRINGS_H */
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
 #endif /* HAVE_UNISTD_H */
index 67d638e39b457ae83931fc0f8a40085ccdbba5e1..670b1a6cd086a079934354b494ee8e13044a8b8b 100644 (file)
 #endif /* STDC_HEADERS */
 #ifdef HAVE_STRING_H
 # include <string.h>
-#else
-# ifdef HAVE_STRINGS_H
-#  include <strings.h>
-# endif
 #endif /* HAVE_STRING_H */
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif /* HAVE_STRINGS_H */
 # ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif /* HAVE_UNISTD_H */
diff --git a/env.c b/env.c
index 59b59eb3425d9da917427414b334e20857ae2cce..366df078c4876cb6f931226dde49448b48c27b6b 100644 (file)
--- a/env.c
+++ b/env.c
 #endif /* STDC_HEADERS */
 #ifdef HAVE_STRING_H
 # include <string.h>
-#else
-# ifdef HAVE_STRINGS_H
-#  include <strings.h>
-# endif
 #endif /* HAVE_STRING_H */
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif /* HAVE_STRINGS_H */
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
 #endif /* HAVE_UNISTD_H */
diff --git a/exec.c b/exec.c
index 2171e705f6633bdfd7fadccf9b39582830322e9a..4eee43fff161767ac6618c7fe2c560068dc02f61 100644 (file)
--- a/exec.c
+++ b/exec.c
 # endif
 #endif /* STDC_HEADERS */
 #ifdef HAVE_STRING_H
-# if defined(HAVE_MEMORY_H) && !defined(STDC_HEADERS)
-#  include <memory.h>
-# endif
 # include <string.h>
-#else
-# ifdef HAVE_STRINGS_H
-#  include <strings.h>
-# endif
 #endif /* HAVE_STRING_H */
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif /* HAVE_STRINGS_H */
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
 #endif /* HAVE_UNISTD_H */
index 27f06c04606bde79763607487c5d84b82cc87a81..3ded40a70ec9cef2bda0fe6b769b3f3c8fcf3d23 100644 (file)
 #  include <memory.h>
 # endif
 # include <string.h>
-#else
-# ifdef HAVE_STRINGS_H
-#  include <strings.h>
-# endif
 #endif /* HAVE_STRING_H */
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif /* HAVE_STRINGS_H */
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
 #endif /* HAVE_UNISTD_H */
index c7e0bc77fa53e9a3591079d7e958726c58711919..ca4903fe0987aef66da165e446573ebbcd0c67d3 100644 (file)
--- a/fileops.c
+++ b/fileops.c
 #include <stdio.h>
 #ifdef HAVE_STRING_H
 # include <string.h>
-#else
-# ifdef HAVE_STRINGS_H
-#  include <strings.h>
-# endif
 #endif /* HAVE_STRING_H */
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif /* HAVE_STRINGS_H */
 #include <ctype.h>
 #include <limits.h>
 #ifdef HAVE_UNISTD_H
index 2f2333963e1e570a94a89294024f633c26126449..78c96eaa72ec532c7327bb85abab54bd85c806a4 100644 (file)
 #endif /* STDC_HEADERS */
 #ifdef HAVE_STRING_H
 # include <string.h>
-#else
-# ifdef HAVE_STRINGS_H
-#  include <strings.h>
-# endif
 #endif /* HAVE_STRING_H */
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif /* HAVE_STRINGS_H */
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
 #endif /* HAVE_UNISTD_H */
index 625d759cbbc055d1ef20a8c31f06a4567859cfb8..2255e521444a4bddb561bd3e162133296cae5ac0 100644 (file)
--- a/fnmatch.c
+++ b/fnmatch.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008 Todd C. Miller <Todd.Miller@courtesan.com>
+ * Copyright (c) 2008, 2010 Todd C. Miller <Todd.Miller@courtesan.com>
  * Copyright (c) 1989, 1993, 1994
  *     The Regents of the University of California.  All rights reserved.
  *
 #include <ctype.h>
 #ifdef HAVE_STRING_H
 # include <string.h>
-#else
-# ifdef HAVE_STRINGS_H
-#  include <strings.h>
-# endif
 #endif /* HAVE_STRING_H */
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif /* HAVE_STRINGS_H */
 
 #include <compat.h>
 #include "emul/fnmatch.h"
index 19eedd937d9d3877662c091bb576e41917f13d7f..7bc035518f4786efc613cf41df5390fa2618727f 100644 (file)
--- a/get_pty.c
+++ b/get_pty.c
 #endif /* STDC_HEADERS */
 #ifdef HAVE_STRING_H
 # include <string.h>
-#else
-# ifdef HAVE_STRINGS_H
-#  include <strings.h>
-# endif
 #endif /* HAVE_STRING_H */
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif /* HAVE_STRINGS_H */
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
 #endif /* HAVE_UNISTD_H */
index daa6b4da34ac75b3b50cb1a27cda0810269c0c15..109794ae8174cba1462435c729a7d1bd2defbc3d 100644 (file)
--- a/getcwd.c
+++ b/getcwd.c
 #endif /* STDC_HEADERS */
 #ifdef HAVE_STRING_H
 # include <string.h>
-#else
-# ifdef HAVE_STRINGS_H
-#  include <strings.h>
-# endif
 #endif /* HAVE_STRING_H */
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif /* HAVE_STRINGS_H */
 #if defined(HAVE_MALLOC_H) && !defined(STDC_HEADERS)
 # include <malloc.h>
 #endif /* HAVE_MALLOC_H && !STDC_HEADERS */
index 7deb31a07384602197662cdcdc821caa93eaca26..928246b883fa285770ea18e98ddb8f53032e6ca2 100644 (file)
--- a/getdate.c
+++ b/getdate.c
 #  include <memory.h>
 # endif
 # include <string.h>
-#else
-# ifdef HAVE_STRINGS_H
-#  include <strings.h>
-# endif
 #endif /* HAVE_STRING_H */
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif /* HAVE_STRINGS_H */
 #if TIME_WITH_SYS_TIME
 # include <time.h>
 #endif
@@ -114,7 +113,7 @@ static int  yyerror __P((char *s));
 static int     yylex __P((void));
 static int     yyparse __P((void));
 
-#line 108 "getdate.y"
+#line 107 "getdate.y"
 #ifndef YYSTYPE_DEFINED
 #define YYSTYPE_DEFINED
 typedef union {
@@ -122,7 +121,7 @@ typedef union {
     enum _MERIDIAN     Meridian;
 } YYSTYPE;
 #endif /* YYSTYPE_DEFINED */
-#line 126 "y.tab.c"
+#line 125 "y.tab.c"
 #define tAGO 257
 #define tDAY 258
 #define tDAYZONE 259
@@ -390,7 +389,7 @@ short *yyss;
 short *yysslim;
 YYSTYPE *yyvs;
 int yystacksize;
-#line 327 "getdate.y"
+#line 326 "getdate.y"
 
 /* Month and day table. */
 static TABLE const MonthDayTable[] = {
@@ -1028,7 +1027,7 @@ main(ac, av)
     /* NOTREACHED */
 }
 #endif /* defined(TEST) */
-#line 980 "y.tab.c"
+#line 979 "y.tab.c"
 /* allocate initial stack or double stack size, up to YYMAXDEPTH */
 #if defined(__cplusplus) || defined(__STDC__)
 static int yygrowstack(void)
@@ -1234,37 +1233,37 @@ yyreduce:
     switch (yyn)
     {
 case 3:
-#line 126 "getdate.y"
+#line 125 "getdate.y"
 {
            yyHaveTime++;
        }
 break;
 case 4:
-#line 129 "getdate.y"
+#line 128 "getdate.y"
 {
            yyHaveZone++;
        }
 break;
 case 5:
-#line 132 "getdate.y"
+#line 131 "getdate.y"
 {
            yyHaveDate++;
        }
 break;
 case 6:
-#line 135 "getdate.y"
+#line 134 "getdate.y"
 {
            yyHaveDay++;
        }
 break;
 case 7:
-#line 138 "getdate.y"
+#line 137 "getdate.y"
 {
            yyHaveRel++;
        }
 break;
 case 9:
-#line 144 "getdate.y"
+#line 143 "getdate.y"
 {
            yyHour = yyvsp[-1].Number;
            yyMinutes = 0;
@@ -1273,7 +1272,7 @@ case 9:
        }
 break;
 case 10:
-#line 150 "getdate.y"
+#line 149 "getdate.y"
 {
            yyHour = yyvsp[-3].Number;
            yyMinutes = yyvsp[-1].Number;
@@ -1282,7 +1281,7 @@ case 10:
        }
 break;
 case 11:
-#line 156 "getdate.y"
+#line 155 "getdate.y"
 {
            yyHour = yyvsp[-3].Number;
            yyMinutes = yyvsp[-1].Number;
@@ -1292,7 +1291,7 @@ case 11:
        }
 break;
 case 12:
-#line 163 "getdate.y"
+#line 162 "getdate.y"
 {
            yyHour = yyvsp[-5].Number;
            yyMinutes = yyvsp[-3].Number;
@@ -1301,7 +1300,7 @@ case 12:
        }
 break;
 case 13:
-#line 169 "getdate.y"
+#line 168 "getdate.y"
 {
            yyHour = yyvsp[-5].Number;
            yyMinutes = yyvsp[-3].Number;
@@ -1312,56 +1311,56 @@ case 13:
        }
 break;
 case 14:
-#line 179 "getdate.y"
+#line 178 "getdate.y"
 {
            yyTimezone = yyvsp[0].Number;
            yyDSTmode = DSToff;
        }
 break;
 case 15:
-#line 183 "getdate.y"
+#line 182 "getdate.y"
 {
            yyTimezone = yyvsp[0].Number;
            yyDSTmode = DSTon;
        }
 break;
 case 16:
-#line 188 "getdate.y"
+#line 187 "getdate.y"
 {
            yyTimezone = yyvsp[-1].Number;
            yyDSTmode = DSTon;
        }
 break;
 case 17:
-#line 194 "getdate.y"
+#line 193 "getdate.y"
 {
            yyDayOrdinal = 1;
            yyDayNumber = yyvsp[0].Number;
        }
 break;
 case 18:
-#line 198 "getdate.y"
+#line 197 "getdate.y"
 {
            yyDayOrdinal = 1;
            yyDayNumber = yyvsp[-1].Number;
        }
 break;
 case 19:
-#line 202 "getdate.y"
+#line 201 "getdate.y"
 {
            yyDayOrdinal = yyvsp[-1].Number;
            yyDayNumber = yyvsp[0].Number;
        }
 break;
 case 20:
-#line 208 "getdate.y"
+#line 207 "getdate.y"
 {
            yyMonth = yyvsp[-2].Number;
            yyDay = yyvsp[0].Number;
        }
 break;
 case 21:
-#line 212 "getdate.y"
+#line 211 "getdate.y"
 {
            if (yyvsp[-4].Number >= 100) {
                yyYear = yyvsp[-4].Number;
@@ -1375,7 +1374,7 @@ case 21:
        }
 break;
 case 22:
-#line 223 "getdate.y"
+#line 222 "getdate.y"
 {
            /* ISO 8601 format.  yyyy-mm-dd.  */
            yyYear = yyvsp[-2].Number;
@@ -1384,7 +1383,7 @@ case 22:
        }
 break;
 case 23:
-#line 229 "getdate.y"
+#line 228 "getdate.y"
 {
            /* e.g. 17-JUN-1992.  */
            yyDay = yyvsp[-2].Number;
@@ -1393,14 +1392,14 @@ case 23:
        }
 break;
 case 24:
-#line 235 "getdate.y"
+#line 234 "getdate.y"
 {
            yyMonth = yyvsp[-1].Number;
            yyDay = yyvsp[0].Number;
        }
 break;
 case 25:
-#line 239 "getdate.y"
+#line 238 "getdate.y"
 {
            yyMonth = yyvsp[-3].Number;
            yyDay = yyvsp[-2].Number;
@@ -1408,14 +1407,14 @@ case 25:
        }
 break;
 case 26:
-#line 244 "getdate.y"
+#line 243 "getdate.y"
 {
            yyMonth = yyvsp[0].Number;
            yyDay = yyvsp[-1].Number;
        }
 break;
 case 27:
-#line 248 "getdate.y"
+#line 247 "getdate.y"
 {
            yyMonth = yyvsp[-1].Number;
            yyDay = yyvsp[-2].Number;
@@ -1423,68 +1422,68 @@ case 27:
        }
 break;
 case 28:
-#line 255 "getdate.y"
+#line 254 "getdate.y"
 {
            yyRelSeconds = -yyRelSeconds;
            yyRelMonth = -yyRelMonth;
        }
 break;
 case 30:
-#line 262 "getdate.y"
+#line 261 "getdate.y"
 {
            yyRelSeconds += yyvsp[-1].Number * yyvsp[0].Number * 60L;
        }
 break;
 case 31:
-#line 265 "getdate.y"
+#line 264 "getdate.y"
 {
            yyRelSeconds += yyvsp[-1].Number * yyvsp[0].Number * 60L;
        }
 break;
 case 32:
-#line 268 "getdate.y"
+#line 267 "getdate.y"
 {
            yyRelSeconds += yyvsp[0].Number * 60L;
        }
 break;
 case 33:
-#line 271 "getdate.y"
+#line 270 "getdate.y"
 {
            yyRelSeconds += yyvsp[-1].Number;
        }
 break;
 case 34:
-#line 274 "getdate.y"
+#line 273 "getdate.y"
 {
            yyRelSeconds += yyvsp[-1].Number;
        }
 break;
 case 35:
-#line 277 "getdate.y"
+#line 276 "getdate.y"
 {
            yyRelSeconds++;
        }
 break;
 case 36:
-#line 280 "getdate.y"
+#line 279 "getdate.y"
 {
            yyRelMonth += yyvsp[-1].Number * yyvsp[0].Number;
        }
 break;
 case 37:
-#line 283 "getdate.y"
+#line 282 "getdate.y"
 {
            yyRelMonth += yyvsp[-1].Number * yyvsp[0].Number;
        }
 break;
 case 38:
-#line 286 "getdate.y"
+#line 285 "getdate.y"
 {
            yyRelMonth += yyvsp[0].Number;
        }
 break;
 case 39:
-#line 291 "getdate.y"
+#line 290 "getdate.y"
 {
            if (yyHaveTime && yyHaveDate && !yyHaveRel)
                yyYear = yyvsp[0].Number;
@@ -1512,18 +1511,18 @@ case 39:
        }
 break;
 case 40:
-#line 318 "getdate.y"
+#line 317 "getdate.y"
 {
            yyval.Meridian = MER24;
        }
 break;
 case 41:
-#line 321 "getdate.y"
+#line 320 "getdate.y"
 {
            yyval.Meridian = yyvsp[0].Meridian;
        }
 break;
-#line 1475 "y.tab.c"
+#line 1474 "y.tab.c"
     }
     yyssp -= yym;
     yystate = *yyssp;
index c3d8a9e4e2a41bc8a59d08fc2ec49e40bfe7094f..2b2e3c9b365edaff8f2c4cfef44f10a93bcb67dc 100644 (file)
--- a/getdate.y
+++ b/getdate.y
 #  include <memory.h>
 # endif
 # include <string.h>
-#else
-# ifdef HAVE_STRINGS_H
-#  include <strings.h>
-# endif
 #endif /* HAVE_STRING_H */
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif /* HAVE_STRINGS_H */
 #if TIME_WITH_SYS_TIME
 # include <time.h>
 #endif
index 705dd5f6728b03de76cd09712edb44598050ae4f..b7db37973d59cb7a18ef9ca4465f519d35574b8a 100644 (file)
--- a/getline.c
+++ b/getline.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009 Todd C. Miller <Todd.Miller@courtesan.com>
+ * Copyright (c) 2009-2010 Todd C. Miller <Todd.Miller@courtesan.com>
  *
  * Permission to use, copy, modify, and distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
 #endif /* STDC_HEADERS */
 #ifdef HAVE_STRING_H
 # include <string.h>
-#else
-# ifdef HAVE_STRINGS_H
-#  include <strings.h>
-# endif
 #endif /* HAVE_STRING_H */
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif /* HAVE_STRINGS_H */
 #include <limits.h>
 
 #include "compat.h"
index 8c07d15167859be38316157562b3883f59130ac8..7ee5ebaf8a8c2e0d5cd3753e49055f494628724a 100644 (file)
@@ -1,5 +1,6 @@
 /*
- * Copyright (c) 1996, 1998-2005 Todd C. Miller <Todd.Miller@courtesan.com>
+ * Copyright (c) 1996, 1998-2005, 2010
+ *     Todd C. Miller <Todd.Miller@courtesan.com>
  *
  * Permission to use, copy, modify, and distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
 # endif
 #endif /* STDC_HEADERS */
 #ifdef HAVE_STRING_H
-# if defined(HAVE_MEMORY_H) && !defined(STDC_HEADERS)
-#  include <memory.h>
-# endif
 # include <string.h>
-#else
-# ifdef HAVE_STRINGS_H
-#  include <strings.h>
-# endif
 #endif /* HAVE_STRING_H */
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif /* HAVE_STRINGS_H */
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
 #endif /* HAVE_UNISTD_H */
diff --git a/glob.c b/glob.c
index 5df33b596a97fa2027774ca03a52eae015285631..9673626531776c465f47e40f3efd9cb33d099e96 100644 (file)
--- a/glob.c
+++ b/glob.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008-2009 Todd C. Miller <Todd.Miller@courtesan.com>
+ * Copyright (c) 2008-2010 Todd C. Miller <Todd.Miller@courtesan.com>
  * Copyright (c) 1989, 1993
  *     The Regents of the University of California.  All rights reserved.
  *
 #endif /* HAVE_MALLOC_H && !STDC_HEADERS */
 #ifdef HAVE_STRING_H
 # include <string.h>
-#else
-# ifdef HAVE_STRINGS_H
-#  include <strings.h>
-# endif
 #endif /* HAVE_STRING_H */
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif /* HAVE_STRINGS_H */
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
 #endif /* HAVE_UNISTD_H */
index 258bc899a250046e82c57d7c76ea865b077539ae..197131427373c4af33155d3e4d7dabe2c727e0ef 100644 (file)
@@ -1,5 +1,6 @@
 /*
- * Copyright (c) 1996, 1998-2005 Todd C. Miller <Todd.Miller@courtesan.com>
+ * Copyright (c) 1996, 1998-2005, 2010
+ *     Todd C. Miller <Todd.Miller@courtesan.com>
  *
  * Permission to use, copy, modify, and distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
 #include <stdio.h>
 #ifdef HAVE_STRING_H
 # include <string.h>
-#else
-# ifdef HAVE_STRINGS_H
-#  include <strings.h>
-# endif
 #endif /* HAVE_STRING_H */
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif /* HAVE_STRINGS_H */
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
 #endif /* HAVE_UNISTD_H */
diff --git a/gram.c b/gram.c
index f4fca2ea8b730d7d2197f748edc6070b3ace94b7..d2e8b46ae895c4bd0f8204fa8afb9064aeeeb4b2 100644 (file)
--- a/gram.c
+++ b/gram.c
@@ -11,7 +11,7 @@
 #define YYPREFIX "yy"
 #line 2 "gram.y"
 /*
- * Copyright (c) 1996, 1998-2005, 2007-2009
+ * Copyright (c) 1996, 1998-2005, 2007-2010
  *     Todd C. Miller <Todd.Miller@courtesan.com>
  *
  * Permission to use, copy, modify, and distribute this software for any
 #endif /* STDC_HEADERS */
 #ifdef HAVE_STRING_H
 # include <string.h>
-#else
-# ifdef HAVE_STRINGS_H
-#  include <strings.h>
-# endif
 #endif /* HAVE_STRING_H */
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif /* HAVE_STRINGS_H */
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
 #endif /* HAVE_UNISTD_H */
@@ -119,7 +118,7 @@ yyerror(s)
     }
     parse_error = TRUE;
 }
-#line 113 "gram.y"
+#line 112 "gram.y"
 #ifndef YYSTYPE_DEFINED
 #define YYSTYPE_DEFINED
 typedef union {
@@ -135,7 +134,7 @@ typedef union {
     int tok;
 } YYSTYPE;
 #endif /* YYSTYPE_DEFINED */
-#line 139 "y.tab.c"
+#line 138 "y.tab.c"
 #define COMMAND 257
 #define ALIAS 258
 #define DEFVAR 259
@@ -633,7 +632,7 @@ short *yyss;
 short *yysslim;
 YYSTYPE *yyvs;
 int yystacksize;
-#line 607 "gram.y"
+#line 606 "gram.y"
 static struct defaults *
 new_default(var, val, op)
     char *var;
@@ -824,7 +823,7 @@ init_parser(path, quiet)
     sudolineno = 1;
     verbose = !quiet;
 }
-#line 776 "y.tab.c"
+#line 775 "y.tab.c"
 /* allocate initial stack or double stack size, up to YYMAXDEPTH */
 #if defined(__cplusplus) || defined(__STDC__)
 static int yygrowstack(void)
@@ -1030,127 +1029,127 @@ yyreduce:
     switch (yyn)
     {
 case 1:
-#line 188 "gram.y"
+#line 187 "gram.y"
 { ; }
 break;
 case 5:
-#line 196 "gram.y"
+#line 195 "gram.y"
 {
                            ;
                        }
 break;
 case 6:
-#line 199 "gram.y"
+#line 198 "gram.y"
 {
                            yyerrok;
                        }
 break;
 case 7:
-#line 202 "gram.y"
+#line 201 "gram.y"
 {
                            add_userspec(yyvsp[-1].member, yyvsp[0].privilege);
                        }
 break;
 case 8:
-#line 205 "gram.y"
+#line 204 "gram.y"
 {
                            ;
                        }
 break;
 case 9:
-#line 208 "gram.y"
+#line 207 "gram.y"
 {
                            ;
                        }
 break;
 case 10:
-#line 211 "gram.y"
+#line 210 "gram.y"
 {
                            ;
                        }
 break;
 case 11:
-#line 214 "gram.y"
+#line 213 "gram.y"
 {
                            ;
                        }
 break;
 case 12:
-#line 217 "gram.y"
+#line 216 "gram.y"
 {
                            add_defaults(DEFAULTS, NULL, yyvsp[0].defaults);
                        }
 break;
 case 13:
-#line 220 "gram.y"
+#line 219 "gram.y"
 {
                            add_defaults(DEFAULTS_USER, yyvsp[-1].member, yyvsp[0].defaults);
                        }
 break;
 case 14:
-#line 223 "gram.y"
+#line 222 "gram.y"
 {
                            add_defaults(DEFAULTS_RUNAS, yyvsp[-1].member, yyvsp[0].defaults);
                        }
 break;
 case 15:
-#line 226 "gram.y"
+#line 225 "gram.y"
 {
                            add_defaults(DEFAULTS_HOST, yyvsp[-1].member, yyvsp[0].defaults);
                        }
 break;
 case 16:
-#line 229 "gram.y"
+#line 228 "gram.y"
 {
                            add_defaults(DEFAULTS_CMND, yyvsp[-1].member, yyvsp[0].defaults);
                        }
 break;
 case 18:
-#line 235 "gram.y"
+#line 234 "gram.y"
 {
                            list_append(yyvsp[-2].defaults, yyvsp[0].defaults);
                            yyval.defaults = yyvsp[-2].defaults;
                        }
 break;
 case 19:
-#line 241 "gram.y"
+#line 240 "gram.y"
 {
                            yyval.defaults = new_default(yyvsp[0].string, NULL, TRUE);
                        }
 break;
 case 20:
-#line 244 "gram.y"
+#line 243 "gram.y"
 {
                            yyval.defaults = new_default(yyvsp[0].string, NULL, FALSE);
                        }
 break;
 case 21:
-#line 247 "gram.y"
+#line 246 "gram.y"
 {
                            yyval.defaults = new_default(yyvsp[-2].string, yyvsp[0].string, TRUE);
                        }
 break;
 case 22:
-#line 250 "gram.y"
+#line 249 "gram.y"
 {
                            yyval.defaults = new_default(yyvsp[-2].string, yyvsp[0].string, '+');
                        }
 break;
 case 23:
-#line 253 "gram.y"
+#line 252 "gram.y"
 {
                            yyval.defaults = new_default(yyvsp[-2].string, yyvsp[0].string, '-');
                        }
 break;
 case 25:
-#line 259 "gram.y"
+#line 258 "gram.y"
 {
                            list_append(yyvsp[-2].privilege, yyvsp[0].privilege);
                            yyval.privilege = yyvsp[-2].privilege;
                        }
 break;
 case 26:
-#line 265 "gram.y"
+#line 264 "gram.y"
 {
                            struct privilege *p = emalloc(sizeof(*p));
                            list2tq(&p->hostlist, yyvsp[-2].member);
@@ -1161,51 +1160,51 @@ case 26:
                        }
 break;
 case 27:
-#line 275 "gram.y"
+#line 274 "gram.y"
 {
                            yyval.member = yyvsp[0].member;
                            yyval.member->negated = FALSE;
                        }
 break;
 case 28:
-#line 279 "gram.y"
+#line 278 "gram.y"
 {
                            yyval.member = yyvsp[0].member;
                            yyval.member->negated = TRUE;
                        }
 break;
 case 29:
-#line 285 "gram.y"
+#line 284 "gram.y"
 {
                            yyval.member = new_member(yyvsp[0].string, ALIAS);
                        }
 break;
 case 30:
-#line 288 "gram.y"
+#line 287 "gram.y"
 {
                            yyval.member = new_member(NULL, ALL);
                        }
 break;
 case 31:
-#line 291 "gram.y"
+#line 290 "gram.y"
 {
                            yyval.member = new_member(yyvsp[0].string, NETGROUP);
                        }
 break;
 case 32:
-#line 294 "gram.y"
+#line 293 "gram.y"
 {
                            yyval.member = new_member(yyvsp[0].string, NTWKADDR);
                        }
 break;
 case 33:
-#line 297 "gram.y"
+#line 296 "gram.y"
 {
                            yyval.member = new_member(yyvsp[0].string, WORD);
                        }
 break;
 case 35:
-#line 303 "gram.y"
+#line 302 "gram.y"
 {
                            list_append(yyvsp[-2].cmndspec, yyvsp[0].cmndspec);
 #ifdef HAVE_SELINUX
@@ -1238,7 +1237,7 @@ case 35:
                        }
 break;
 case 36:
-#line 335 "gram.y"
+#line 334 "gram.y"
 {
                            struct cmndspec *cs = emalloc(sizeof(*cs));
                            if (yyvsp[-3].runas != NULL) {
@@ -1265,80 +1264,80 @@ case 36:
                        }
 break;
 case 37:
-#line 361 "gram.y"
+#line 360 "gram.y"
 {
                            yyval.member = yyvsp[0].member;
                            yyval.member->negated = FALSE;
                        }
 break;
 case 38:
-#line 365 "gram.y"
+#line 364 "gram.y"
 {
                            yyval.member = yyvsp[0].member;
                            yyval.member->negated = TRUE;
                        }
 break;
 case 39:
-#line 371 "gram.y"
+#line 370 "gram.y"
 {
                            yyval.string = yyvsp[0].string;
                        }
 break;
 case 40:
-#line 376 "gram.y"
+#line 375 "gram.y"
 {
                            yyval.string = yyvsp[0].string;
                        }
 break;
 case 41:
-#line 381 "gram.y"
+#line 380 "gram.y"
 {
                            yyval.seinfo.role = NULL;
                            yyval.seinfo.type = NULL;
                        }
 break;
 case 42:
-#line 385 "gram.y"
+#line 384 "gram.y"
 {
                            yyval.seinfo.role = yyvsp[0].string;
                            yyval.seinfo.type = NULL;
                        }
 break;
 case 43:
-#line 389 "gram.y"
+#line 388 "gram.y"
 {
                            yyval.seinfo.type = yyvsp[0].string;
                            yyval.seinfo.role = NULL;
                        }
 break;
 case 44:
-#line 393 "gram.y"
+#line 392 "gram.y"
 {
                            yyval.seinfo.role = yyvsp[-1].string;
                            yyval.seinfo.type = yyvsp[0].string;
                        }
 break;
 case 45:
-#line 397 "gram.y"
+#line 396 "gram.y"
 {
                            yyval.seinfo.type = yyvsp[-1].string;
                            yyval.seinfo.role = yyvsp[0].string;
                        }
 break;
 case 46:
-#line 403 "gram.y"
+#line 402 "gram.y"
 {
                            yyval.runas = NULL;
                        }
 break;
 case 47:
-#line 406 "gram.y"
+#line 405 "gram.y"
 {
                            yyval.runas = yyvsp[-1].runas;
                        }
 break;
 case 48:
-#line 411 "gram.y"
+#line 410 "gram.y"
 {
                            yyval.runas = emalloc(sizeof(struct runascontainer));
                            yyval.runas->runasusers = yyvsp[0].member;
@@ -1346,7 +1345,7 @@ case 48:
                        }
 break;
 case 49:
-#line 416 "gram.y"
+#line 415 "gram.y"
 {
                            yyval.runas = emalloc(sizeof(struct runascontainer));
                            yyval.runas->runasusers = yyvsp[-2].member;
@@ -1354,7 +1353,7 @@ case 49:
                        }
 break;
 case 50:
-#line 421 "gram.y"
+#line 420 "gram.y"
 {
                            yyval.runas = emalloc(sizeof(struct runascontainer));
                            yyval.runas->runasusers = NULL;
@@ -1362,86 +1361,86 @@ case 50:
                        }
 break;
 case 51:
-#line 428 "gram.y"
+#line 427 "gram.y"
 {
                            yyval.tag.nopasswd = yyval.tag.noexec = yyval.tag.setenv =
                                yyval.tag.log_input = yyval.tag.log_output = UNSPEC;
                        }
 break;
 case 52:
-#line 432 "gram.y"
+#line 431 "gram.y"
 {
                            yyval.tag.nopasswd = TRUE;
                        }
 break;
 case 53:
-#line 435 "gram.y"
+#line 434 "gram.y"
 {
                            yyval.tag.nopasswd = FALSE;
                        }
 break;
 case 54:
-#line 438 "gram.y"
+#line 437 "gram.y"
 {
                            yyval.tag.noexec = TRUE;
                        }
 break;
 case 55:
-#line 441 "gram.y"
+#line 440 "gram.y"
 {
                            yyval.tag.noexec = FALSE;
                        }
 break;
 case 56:
-#line 444 "gram.y"
+#line 443 "gram.y"
 {
                            yyval.tag.setenv = TRUE;
                        }
 break;
 case 57:
-#line 447 "gram.y"
+#line 446 "gram.y"
 {
                            yyval.tag.setenv = FALSE;
                        }
 break;
 case 58:
-#line 450 "gram.y"
+#line 449 "gram.y"
 {
                            yyval.tag.log_input = TRUE;
                        }
 break;
 case 59:
-#line 453 "gram.y"
+#line 452 "gram.y"
 {
                            yyval.tag.log_input = FALSE;
                        }
 break;
 case 60:
-#line 456 "gram.y"
+#line 455 "gram.y"
 {
                            yyval.tag.log_output = TRUE;
                        }
 break;
 case 61:
-#line 459 "gram.y"
+#line 458 "gram.y"
 {
                            yyval.tag.log_output = FALSE;
                        }
 break;
 case 62:
-#line 464 "gram.y"
+#line 463 "gram.y"
 {
                            yyval.member = new_member(NULL, ALL);
                        }
 break;
 case 63:
-#line 467 "gram.y"
+#line 466 "gram.y"
 {
                            yyval.member = new_member(yyvsp[0].string, ALIAS);
                        }
 break;
 case 64:
-#line 470 "gram.y"
+#line 469 "gram.y"
 {
                            struct sudo_command *c = emalloc(sizeof(*c));
                            c->cmnd = yyvsp[0].command.cmnd;
@@ -1450,7 +1449,7 @@ case 64:
                        }
 break;
 case 67:
-#line 482 "gram.y"
+#line 481 "gram.y"
 {
                            char *s;
                            if ((s = alias_add(yyvsp[-2].string, HOSTALIAS, yyvsp[0].member)) != NULL) {
@@ -1460,14 +1459,14 @@ case 67:
                        }
 break;
 case 69:
-#line 492 "gram.y"
+#line 491 "gram.y"
 {
                            list_append(yyvsp[-2].member, yyvsp[0].member);
                            yyval.member = yyvsp[-2].member;
                        }
 break;
 case 72:
-#line 502 "gram.y"
+#line 501 "gram.y"
 {
                            char *s;
                            if ((s = alias_add(yyvsp[-2].string, CMNDALIAS, yyvsp[0].member)) != NULL) {
@@ -1477,14 +1476,14 @@ case 72:
                        }
 break;
 case 74:
-#line 512 "gram.y"
+#line 511 "gram.y"
 {
                            list_append(yyvsp[-2].member, yyvsp[0].member);
                            yyval.member = yyvsp[-2].member;
                        }
 break;
 case 77:
-#line 522 "gram.y"
+#line 521 "gram.y"
 {
                            char *s;
                            if ((s = alias_add(yyvsp[-2].string, RUNASALIAS, yyvsp[0].member)) != NULL) {
@@ -1494,7 +1493,7 @@ case 77:
                        }
 break;
 case 80:
-#line 535 "gram.y"
+#line 534 "gram.y"
 {
                            char *s;
                            if ((s = alias_add(yyvsp[-2].string, USERALIAS, yyvsp[0].member)) != NULL) {
@@ -1504,96 +1503,96 @@ case 80:
                        }
 break;
 case 82:
-#line 545 "gram.y"
+#line 544 "gram.y"
 {
                            list_append(yyvsp[-2].member, yyvsp[0].member);
                            yyval.member = yyvsp[-2].member;
                        }
 break;
 case 83:
-#line 551 "gram.y"
+#line 550 "gram.y"
 {
                            yyval.member = yyvsp[0].member;
                            yyval.member->negated = FALSE;
                        }
 break;
 case 84:
-#line 555 "gram.y"
+#line 554 "gram.y"
 {
                            yyval.member = yyvsp[0].member;
                            yyval.member->negated = TRUE;
                        }
 break;
 case 85:
-#line 561 "gram.y"
+#line 560 "gram.y"
 {
                            yyval.member = new_member(yyvsp[0].string, ALIAS);
                        }
 break;
 case 86:
-#line 564 "gram.y"
+#line 563 "gram.y"
 {
                            yyval.member = new_member(NULL, ALL);
                        }
 break;
 case 87:
-#line 567 "gram.y"
+#line 566 "gram.y"
 {
                            yyval.member = new_member(yyvsp[0].string, NETGROUP);
                        }
 break;
 case 88:
-#line 570 "gram.y"
+#line 569 "gram.y"
 {
                            yyval.member = new_member(yyvsp[0].string, USERGROUP);
                        }
 break;
 case 89:
-#line 573 "gram.y"
+#line 572 "gram.y"
 {
                            yyval.member = new_member(yyvsp[0].string, WORD);
                        }
 break;
 case 91:
-#line 579 "gram.y"
+#line 578 "gram.y"
 {
                            list_append(yyvsp[-2].member, yyvsp[0].member);
                            yyval.member = yyvsp[-2].member;
                        }
 break;
 case 92:
-#line 585 "gram.y"
+#line 584 "gram.y"
 {
                            yyval.member = yyvsp[0].member;
                            yyval.member->negated = FALSE;
                        }
 break;
 case 93:
-#line 589 "gram.y"
+#line 588 "gram.y"
 {
                            yyval.member = yyvsp[0].member;
                            yyval.member->negated = TRUE;
                        }
 break;
 case 94:
-#line 595 "gram.y"
+#line 594 "gram.y"
 {
                            yyval.member = new_member(yyvsp[0].string, ALIAS);
                        }
 break;
 case 95:
-#line 598 "gram.y"
+#line 597 "gram.y"
 {
                            yyval.member = new_member(NULL, ALL);
                        }
 break;
 case 96:
-#line 601 "gram.y"
+#line 600 "gram.y"
 {
                            yyval.member = new_member(yyvsp[0].string, WORD);
                        }
 break;
-#line 1545 "y.tab.c"
+#line 1544 "y.tab.c"
     }
     yyssp -= yym;
     yystate = *yyssp;
diff --git a/gram.y b/gram.y
index 6a48f2ddc67c87cbc668724eccab1a920d515466..f319eea4f102d5e1189be20b558ce28493ef0566 100644 (file)
--- a/gram.y
+++ b/gram.y
 #endif /* STDC_HEADERS */
 #ifdef HAVE_STRING_H
 # include <string.h>
-#else
-# ifdef HAVE_STRINGS_H
-#  include <strings.h>
-# endif
 #endif /* HAVE_STRING_H */
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif /* HAVE_STRINGS_H */
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
 #endif /* HAVE_UNISTD_H */
index eed07530150ea66bac0814cbedeb014a1e409d5b..502cb94ae5e4afb39b399d1056fd2a6edfd6844a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 1998-2005, 2007-2009
+ * Copyright (c) 1996, 1998-2005, 2007-2010
  *     Todd C. Miller <Todd.Miller@courtesan.com>
  *
  * Permission to use, copy, modify, and distribute this software for any
@@ -52,11 +52,10 @@ struct rtentry;
 #  include <memory.h>
 # endif
 # include <string.h>
-#else
-# ifdef HAVE_STRINGS_H
-#  include <strings.h>
-# endif
 #endif /* HAVE_STRING_H */
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif /* HAVE_STRINGS_H */
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
 #endif /* HAVE_UNISTD_H */
diff --git a/iolog.c b/iolog.c
index 666ebbc1aead2c4c7e1f3a13f0057276c8b97a14..4e492b6017cbd91164876bd32982ee2e04eb53e0 100644 (file)
--- a/iolog.c
+++ b/iolog.c
 #endif /* STDC_HEADERS */
 #ifdef HAVE_STRING_H
 # include <string.h>
-#else
-# ifdef HAVE_STRINGS_H
-#  include <strings.h>
-# endif
 #endif /* HAVE_STRING_H */
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif /* HAVE_STRINGS_H */
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
 #endif /* HAVE_UNISTD_H */
diff --git a/lbuf.c b/lbuf.c
index fb2901c642c8177281f66f21e6e783b3e8a39d72..e64f76bdd0e98d34ddc51f3936934ce484d291aa 100644 (file)
--- a/lbuf.c
+++ b/lbuf.c
 #endif /* STDC_HEADERS */
 #ifdef HAVE_STRING_H
 # include <string.h>
-#else
-# ifdef HAVE_STRINGS_H
-#  include <strings.h>
-# endif
 #endif /* HAVE_STRING_H */
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif /* HAVE_STRINGS_H */
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
 #endif /* HAVE_UNISTD_H */
diff --git a/ldap.c b/ldap.c
index 7d35ca6e62102c948cde9eda2920aa44309e0a82..6bde360a3dc1478b6dcb9040a4e73fdbda68d1b9 100644 (file)
--- a/ldap.c
+++ b/ldap.c
 #endif /* STDC_HEADERS */
 #ifdef HAVE_STRING_H
 # include <string.h>
-#else
-# ifdef HAVE_STRINGS_H
-#  include <strings.h>
-# endif
 #endif /* HAVE_STRING_H */
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif /* HAVE_STRINGS_H */
 #if defined(HAVE_MALLOC_H) && !defined(STDC_HEADERS)
 # include <malloc.h>
 #endif /* HAVE_MALLOC_H && !STDC_HEADERS */
index a3f5231f361aa297cbe25540a6ac82aed59f22ed..1d4acc5c6ddd2a1a64e6dc78300e122e7abebbd4 100644 (file)
--- a/logging.c
+++ b/logging.c
 #endif /* STDC_HEADERS */
 #ifdef HAVE_STRING_H
 # include <string.h>
-#else
-# ifdef HAVE_STRINGS_H
-#  include <strings.h>
-# endif
 #endif /* HAVE_STRING_H */
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif /* HAVE_STRINGS_H */
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
 #endif /* HAVE_UNISTD_H */
diff --git a/match.c b/match.c
index 369130ce812b418cc694bc0958887133bf3f9510..64d413b3def63a4e2c384e8516eff38d608b086a 100644 (file)
--- a/match.c
+++ b/match.c
 #endif /* STDC_HEADERS */
 #ifdef HAVE_STRING_H
 # include <string.h>
-#else
-# ifdef HAVE_STRINGS_H
-#  include <strings.h>
-# endif
 #endif /* HAVE_STRING_H */
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif /* HAVE_STRINGS_H */
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
 #endif /* HAVE_UNISTD_H */
diff --git a/parse.c b/parse.c
index 48a25d89b36d4256cb3d7f0e35189bb8d8a87fb5..245219e469b738369c867c551845c2628b52c061 100644 (file)
--- a/parse.c
+++ b/parse.c
 #endif /* STDC_HEADERS */
 #ifdef HAVE_STRING_H
 # include <string.h>
-#else
-# ifdef HAVE_STRINGS_H
-#  include <strings.h>
-# endif
 #endif /* HAVE_STRING_H */
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif /* HAVE_STRINGS_H */
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
 #endif /* HAVE_UNISTD_H */
index 8815b97507e0b9af7885eb1da3d765ebe448422a..3611b443de5c3a8d6eab69266d532d05233667ce 100644 (file)
 # endif
 #endif /* STDC_HEADERS */
 #ifdef HAVE_STRING_H
-# if defined(HAVE_MEMORY_H) && !defined(STDC_HEADERS)
-#  include <memory.h>
-# endif
 # include <string.h>
-#else
-# ifdef HAVE_STRINGS_H
-#  include <strings.h>
-# endif
 #endif /* HAVE_STRING_H */
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif /* HAVE_STRINGS_H */
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
 #endif /* HAVE_UNISTD_H */
index dc55e2dca0ea82e911745211bb31eeded728412f..3bdc88a8854ba3fd250edb1618d830112b4a13f2 100644 (file)
--- a/pwutil.c
+++ b/pwutil.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 1998-2005, 2007-2009
+ * Copyright (c) 1996, 1998-2005, 2007-2010
  *     Todd C. Miller <Todd.Miller@courtesan.com>
  *
  * Permission to use, copy, modify, and distribute this software for any
 #  include <memory.h>
 # endif
 # include <string.h>
-#else
-# ifdef HAVE_STRINGS_H
-#  include <strings.h>
-# endif
 #endif /* HAVE_STRING_H */
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif /* HAVE_STRINGS_H */
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
 #endif /* HAVE_UNISTD_H */
index 41dd9a44ed42fc31d721b143a68d56d193f91124..4b3896ea7d5b2a721a59a6f11fa67f2a3b0ba0da 100644 (file)
 #endif /* STDC_HEADERS */
 #ifdef HAVE_STRING_H
 # include <string.h>
-#else
-# ifdef HAVE_STRINGS_H
-#  include <strings.h>
-# endif
 #endif /* HAVE_STRING_H */
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif /* HAVE_STRINGS_H */
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
 #endif /* HAVE_UNISTD_H */
index 7ad4774691284d726aaa3d6a6e54c4873a531d36..27757f95f0edc5c95b7ca4aa682376f18379a208 100644 (file)
@@ -1,5 +1,6 @@
 /*
- * Copyright (c) 1999-2005, 2008 Todd C. Miller <Todd.Miller@courtesan.com>
+ * Copyright (c) 1999-2005, 2008, 2010
+ *     Todd C. Miller <Todd.Miller@courtesan.com>
  * Copyright (c) 1990, 1993
  *     The Regents of the University of California.  All rights reserved.
  *
 #  include <memory.h>
 # endif
 # include <string.h>
-#else
-# ifdef HAVE_STRINGS_H
-#  include <strings.h>
-# endif
 #endif /* HAVE_STRING_H */
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif /* HAVE_STRINGS_H */
 #if defined(HAVE_MALLOC_H) && !defined(STDC_HEADERS)
 # include <malloc.h>
 #endif /* HAVE_MALLOC_H && !STDC_HEADERS */
diff --git a/sudo.c b/sudo.c
index 978ad5c2c1aee57da5a9d3fcdf9dc49f7847a6f3..b219ea484f4effdfe55eac389e024bbd07898e9e 100644 (file)
--- a/sudo.c
+++ b/sudo.c
 #  include <memory.h>
 # endif
 # include <string.h>
-#else
-# ifdef HAVE_STRINGS_H
-#  include <strings.h>
-# endif
 #endif /* HAVE_STRING_H */
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif /* HAVE_STRINGS_H */
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
 #endif /* HAVE_UNISTD_H */
index 59dbd9db94bd1fea2acd3c0da33c2360d59af002..e5e14d496aec6d7529e261df16e4c153771da1a8 100644 (file)
 #endif /* STDC_HEADERS */
 #ifdef HAVE_STRING_H
 # include <string.h>
-#else
-# ifdef HAVE_STRINGS_H
-#  include <strings.h>
-# endif
 #endif /* HAVE_STRING_H */
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif /* HAVE_STRINGS_H */
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
 #endif /* HAVE_UNISTD_H */
index ae8b9623fa3ecc28a8e461fc927adb9d67bf9818..e21aaae495681dc3612092b4470ed06c2ed26913 100644 (file)
 #endif /* STDC_HEADERS */
 #ifdef HAVE_STRING_H
 # include <string.h>
-#else
-# ifdef HAVE_STRINGS_H
-#  include <strings.h>
-# endif
 #endif /* HAVE_STRING_H */
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif /* HAVE_STRINGS_H */
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
 #endif /* HAVE_UNISTD_H */
index 75dbc8e4032d6c187e23a5c2d4bb6184cb239352..6e9ed7ef6554101de6052d62481ce52aec6a8772 100644 (file)
 #  include <memory.h>
 # endif
 # include <string.h>
-#else
-# ifdef HAVE_STRINGS_H
-#  include <strings.h>
-# endif
 #endif /* HAVE_STRING_H */
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif /* HAVE_STRINGS_H */
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
 #endif /* HAVE_UNISTD_H */
diff --git a/term.c b/term.c
index 895ef37e4c0c5ad2b16db33300d26bae6bc6bfcc..a3cad619687761ff0d78091495b4adc502ec3f6d 100644 (file)
--- a/term.c
+++ b/term.c
 #  include <memory.h>
 # endif
 # include <string.h>
-#else
-# ifdef HAVE_STRINGS_H
-#  include <strings.h>
-# endif
 #endif /* HAVE_STRING_H */
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif /* HAVE_STRINGS_H */
 #ifdef HAVE_TERMIOS_H
 # include <termios.h>
 #else
index a551be55ffcd434118bc8686472bb97ef41eb34d..1bf2cd301a8fd031c668334afe24aec549f3d8b2 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 1998-2005, 2007-2009
+ * Copyright (c) 1996, 1998-2005, 2007-2010
  *     Todd C. Miller <Todd.Miller@courtesan.com>
  *
  * Permission to use, copy, modify, and distribute this software for any
 #endif /* STDC_HEADERS */
 #ifdef HAVE_STRING_H
 # include <string.h>
-#else
-# ifdef HAVE_STRINGS_H
-#  include <strings.h>
-# endif
 #endif /* HAVE_STRING_H */
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif /* HAVE_STRINGS_H */
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
 #endif /* HAVE_UNISTD_H */
index b8aa25dd9108dc0c0aa991cac31bbdcb473d13d1..8127eab1e0540bf8a89f81d8bbee97e9a3ad593a 100644 (file)
 #  include <memory.h>
 # endif
 # include <string.h>
-#else
-# ifdef HAVE_STRINGS_H
-#  include <strings.h>
-# endif
 #endif /* HAVE_STRING_H */
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif /* HAVE_STRINGS_H */
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
 #endif /* HAVE_UNISTD_H */
diff --git a/toke.c b/toke.c
index 0d99df8884b7b80fa273645abb730d2d72a850ed..75682b9dd1986c1399f3055d3e0c1be87d8d0647 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -1353,7 +1353,7 @@ char *yytext;
 #define INITIAL 0
 #line 2 "toke.l"
 /*
- * Copyright (c) 1996, 1998-2005, 2007-2009
+ * Copyright (c) 1996, 1998-2005, 2007-2010
  *     Todd C. Miller <Todd.Miller@courtesan.com>
  *
  * Permission to use, copy, modify, and distribute this software for any
@@ -1392,11 +1392,10 @@ char *yytext;
 #endif /* STDC_HEADERS */
 #ifdef HAVE_STRING_H
 # include <string.h>
-#else
-# ifdef HAVE_STRINGS_H
-#  include <strings.h>
-# endif
 #endif /* HAVE_STRING_H */
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif /* HAVE_STRINGS_H */
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
 #endif /* HAVE_UNISTD_H */
@@ -1466,7 +1465,7 @@ extern void yyerror               __P((const char *));
 
 #define INSTR 5
 
-#line 1470 "lex.yy.c"
+#line 1469 "lex.yy.c"
 
 /* Macros after this point can all be overridden by user definitions in
  * section 1.
@@ -1620,9 +1619,9 @@ YY_DECL
        register char *yy_cp, *yy_bp;
        register int yy_act;
 
-#line 128 "toke.l"
+#line 127 "toke.l"
 
-#line 1626 "lex.yy.c"
+#line 1625 "lex.yy.c"
 
        if ( yy_init )
                {
@@ -1708,12 +1707,12 @@ do_action:      /* This label is used only to access EOF actions. */
 
 case 1:
 YY_RULE_SETUP
-#line 129 "toke.l"
+#line 128 "toke.l"
 BEGIN STARTDEFS;
        YY_BREAK
 case 2:
 YY_RULE_SETUP
-#line 131 "toke.l"
+#line 130 "toke.l"
 {
                            BEGIN INDEFS;
                            LEXTRACE("DEFVAR ");
@@ -1725,7 +1724,7 @@ YY_RULE_SETUP
 
 case 3:
 YY_RULE_SETUP
-#line 140 "toke.l"
+#line 139 "toke.l"
 {
                            BEGIN STARTDEFS;
                            LEXTRACE(", ");
@@ -1734,7 +1733,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 4:
 YY_RULE_SETUP
-#line 146 "toke.l"
+#line 145 "toke.l"
 {
                            LEXTRACE("= ");
                            return('=');
@@ -1742,7 +1741,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 5:
 YY_RULE_SETUP
-#line 151 "toke.l"
+#line 150 "toke.l"
 {
                            LEXTRACE("+= ");
                            return('+');
@@ -1750,7 +1749,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 6:
 YY_RULE_SETUP
-#line 156 "toke.l"
+#line 155 "toke.l"
 {
                            LEXTRACE("-= ");
                            return('-');
@@ -1758,7 +1757,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 7:
 YY_RULE_SETUP
-#line 161 "toke.l"
+#line 160 "toke.l"
 {
                            LEXTRACE("BEGINSTR ");
                            yylval.string = NULL;
@@ -1767,7 +1766,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 8:
 YY_RULE_SETUP
-#line 167 "toke.l"
+#line 166 "toke.l"
 {
                            LEXTRACE("WORD(2) ");
                            if (!fill(yytext, yyleng))
@@ -1779,7 +1778,7 @@ YY_RULE_SETUP
 
 case 9:
 YY_RULE_SETUP
-#line 176 "toke.l"
+#line 175 "toke.l"
 {
                            /* Line continuation char followed by newline. */
                            ++sudolineno;
@@ -1788,7 +1787,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 10:
 YY_RULE_SETUP
-#line 182 "toke.l"
+#line 181 "toke.l"
 {
                            LEXTRACE("ENDSTR ");
                            BEGIN INDEFS;
@@ -1797,7 +1796,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 11:
 YY_RULE_SETUP
-#line 188 "toke.l"
+#line 187 "toke.l"
 {
                            LEXTRACE("BACKSLASH ");
                            if (!append(yytext, yyleng))
@@ -1806,7 +1805,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 12:
 YY_RULE_SETUP
-#line 194 "toke.l"
+#line 193 "toke.l"
 {
                            LEXTRACE("STRBODY ");
                            if (!append(yytext, yyleng))
@@ -1817,7 +1816,7 @@ YY_RULE_SETUP
 
 case 13:
 YY_RULE_SETUP
-#line 202 "toke.l"
+#line 201 "toke.l"
 {
                            /* quoted fnmatch glob char, pass verbatim */
                            LEXTRACE("QUOTEDCHAR ");
@@ -1828,7 +1827,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 14:
 YY_RULE_SETUP
-#line 210 "toke.l"
+#line 209 "toke.l"
 {
                            /* quoted sudoers special char, strip backslash */
                            LEXTRACE("QUOTEDCHAR ");
@@ -1839,7 +1838,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 15:
 YY_RULE_SETUP
-#line 218 "toke.l"
+#line 217 "toke.l"
 {
                            BEGIN INITIAL;
                            yyless(0);
@@ -1848,7 +1847,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 16:
 YY_RULE_SETUP
-#line 224 "toke.l"
+#line 223 "toke.l"
 {
                            LEXTRACE("ARG ");
                            if (!fill_args(yytext, yyleng, sawspace))
@@ -1859,7 +1858,7 @@ YY_RULE_SETUP
 
 case 17:
 YY_RULE_SETUP
-#line 232 "toke.l"
+#line 231 "toke.l"
 {
                            char *path;
 
@@ -1875,7 +1874,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 18:
 YY_RULE_SETUP
-#line 245 "toke.l"
+#line 244 "toke.l"
 {
                            char *path;
 
@@ -1894,7 +1893,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 19:
 YY_RULE_SETUP
-#line 261 "toke.l"
+#line 260 "toke.l"
 {
                            int n;
                            for (n = 0; isblank((unsigned char)yytext[n]); n++)
@@ -1926,7 +1925,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 20:
 YY_RULE_SETUP
-#line 290 "toke.l"
+#line 289 "toke.l"
 {
                            int n;
                            for (n = 0; isblank((unsigned char)yytext[n]); n++)
@@ -1949,7 +1948,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 21:
 YY_RULE_SETUP
-#line 310 "toke.l"
+#line 309 "toke.l"
 {
                                /* cmnd does not require passwd for this user */
                                LEXTRACE("NOPASSWD ");
@@ -1958,7 +1957,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 22:
 YY_RULE_SETUP
-#line 316 "toke.l"
+#line 315 "toke.l"
 {
                                /* cmnd requires passwd for this user */
                                LEXTRACE("PASSWD ");
@@ -1967,7 +1966,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 23:
 YY_RULE_SETUP
-#line 322 "toke.l"
+#line 321 "toke.l"
 {
                                LEXTRACE("NOEXEC ");
                                return(NOEXEC);
@@ -1975,7 +1974,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 24:
 YY_RULE_SETUP
-#line 327 "toke.l"
+#line 326 "toke.l"
 {
                                LEXTRACE("EXEC ");
                                return(EXEC);
@@ -1983,7 +1982,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 25:
 YY_RULE_SETUP
-#line 332 "toke.l"
+#line 331 "toke.l"
 {
                                LEXTRACE("SETENV ");
                                return(SETENV);
@@ -1991,7 +1990,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 26:
 YY_RULE_SETUP
-#line 337 "toke.l"
+#line 336 "toke.l"
 {
                                LEXTRACE("NOSETENV ");
                                return(NOSETENV);
@@ -1999,7 +1998,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 27:
 YY_RULE_SETUP
-#line 342 "toke.l"
+#line 341 "toke.l"
 {
                            /* netgroup */
                            if (!fill(yytext, yyleng))
@@ -2010,7 +2009,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 28:
 YY_RULE_SETUP
-#line 350 "toke.l"
+#line 349 "toke.l"
 {
                            /* UN*X group */
                            if (!fill(yytext, yyleng))
@@ -2021,7 +2020,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 29:
 YY_RULE_SETUP
-#line 358 "toke.l"
+#line 357 "toke.l"
 {
                            if (!fill(yytext, yyleng))
                                yyterminate();
@@ -2031,7 +2030,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 30:
 YY_RULE_SETUP
-#line 365 "toke.l"
+#line 364 "toke.l"
 {
                            if (!fill(yytext, yyleng))
                                yyterminate();
@@ -2041,7 +2040,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 31:
 YY_RULE_SETUP
-#line 372 "toke.l"
+#line 371 "toke.l"
 {
                            if (!ipv6_valid(yytext)) {
                                LEXTRACE("ERROR ");
@@ -2055,7 +2054,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 32:
 YY_RULE_SETUP
-#line 383 "toke.l"
+#line 382 "toke.l"
 {
                            if (!ipv6_valid(yytext)) {
                                LEXTRACE("ERROR ");
@@ -2069,7 +2068,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 33:
 YY_RULE_SETUP
-#line 394 "toke.l"
+#line 393 "toke.l"
 {
                            if (strcmp(yytext, "ALL") == 0) {
                                LEXTRACE("ALL ");
@@ -2094,7 +2093,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 34:
 YY_RULE_SETUP
-#line 416 "toke.l"
+#line 415 "toke.l"
 {
                            /* no command args allowed for Defaults!/path */
                            if (!fill_cmnd(yytext, yyleng))
@@ -2105,7 +2104,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 35:
 YY_RULE_SETUP
-#line 424 "toke.l"
+#line 423 "toke.l"
 {
                            BEGIN GOTCMND;
                            LEXTRACE("COMMAND ");
@@ -2115,7 +2114,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 36:
 YY_RULE_SETUP
-#line 431 "toke.l"
+#line 430 "toke.l"
 {
                            /* directories can't have args... */
                            if (yytext[yyleng - 1] == '/') {
@@ -2133,7 +2132,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 37:
 YY_RULE_SETUP
-#line 446 "toke.l"
+#line 445 "toke.l"
 {
                            /* a quoted user/group name */
                            if (!fill(yytext + 1, yyleng - 2))
@@ -2153,7 +2152,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 38:
 YY_RULE_SETUP
-#line 463 "toke.l"
+#line 462 "toke.l"
 {
                            /* a word */
                            if (!fill(yytext, yyleng))
@@ -2164,7 +2163,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 39:
 YY_RULE_SETUP
-#line 471 "toke.l"
+#line 470 "toke.l"
 {
                            LEXTRACE("( ");
                            return ('(');
@@ -2172,7 +2171,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 40:
 YY_RULE_SETUP
-#line 476 "toke.l"
+#line 475 "toke.l"
 {
                            LEXTRACE(") ");
                            return(')');
@@ -2180,7 +2179,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 41:
 YY_RULE_SETUP
-#line 481 "toke.l"
+#line 480 "toke.l"
 {
                            LEXTRACE(", ");
                            return(',');
@@ -2188,7 +2187,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 42:
 YY_RULE_SETUP
-#line 486 "toke.l"
+#line 485 "toke.l"
 {
                            LEXTRACE("= ");
                            return('=');
@@ -2196,7 +2195,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 43:
 YY_RULE_SETUP
-#line 491 "toke.l"
+#line 490 "toke.l"
 {
                            LEXTRACE(": ");
                            return(':');
@@ -2204,7 +2203,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 44:
 YY_RULE_SETUP
-#line 496 "toke.l"
+#line 495 "toke.l"
 {
                            if (yyleng % 2 == 1)
                                return('!');    /* return '!' */
@@ -2212,7 +2211,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 45:
 YY_RULE_SETUP
-#line 501 "toke.l"
+#line 500 "toke.l"
 {
                            BEGIN INITIAL;
                            ++sudolineno;
@@ -2222,14 +2221,14 @@ YY_RULE_SETUP
        YY_BREAK
 case 46:
 YY_RULE_SETUP
-#line 508 "toke.l"
+#line 507 "toke.l"
 {                      /* throw away space/tabs */
                            sawspace = TRUE;    /* but remember for fill_args */
                        }
        YY_BREAK
 case 47:
 YY_RULE_SETUP
-#line 512 "toke.l"
+#line 511 "toke.l"
 {
                            sawspace = TRUE;    /* remember for fill_args */
                            ++sudolineno;
@@ -2238,7 +2237,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 48:
 YY_RULE_SETUP
-#line 518 "toke.l"
+#line 517 "toke.l"
 {
                            BEGIN INITIAL;
                            ++sudolineno;
@@ -2248,7 +2247,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 49:
 YY_RULE_SETUP
-#line 525 "toke.l"
+#line 524 "toke.l"
 {
                            LEXTRACE("ERROR ");
                            return(ERROR);
@@ -2260,7 +2259,7 @@ case YY_STATE_EOF(GOTCMND):
 case YY_STATE_EOF(STARTDEFS):
 case YY_STATE_EOF(INDEFS):
 case YY_STATE_EOF(INSTR):
-#line 530 "toke.l"
+#line 529 "toke.l"
 {
                            if (YY_START != INITIAL) {
                                BEGIN INITIAL;
@@ -2273,10 +2272,10 @@ case YY_STATE_EOF(INSTR):
        YY_BREAK
 case 50:
 YY_RULE_SETUP
-#line 540 "toke.l"
+#line 539 "toke.l"
 ECHO;
        YY_BREAK
-#line 2280 "lex.yy.c"
+#line 2279 "lex.yy.c"
 
        case YY_END_OF_BUFFER:
                {
@@ -3165,7 +3164,7 @@ int main()
        return 0;
        }
 #endif
-#line 540 "toke.l"
+#line 539 "toke.l"
 
 static unsigned char
 hexchar(s)
diff --git a/toke.l b/toke.l
index c871a1100af1c3abaa9d66b89fbbe9d7f464f8a0..706453e1f0f9e4295b5b04f0c8a9994bbd8ffb81 100644 (file)
--- a/toke.l
+++ b/toke.l
 #endif /* STDC_HEADERS */
 #ifdef HAVE_STRING_H
 # include <string.h>
-#else
-# ifdef HAVE_STRINGS_H
-#  include <strings.h>
-# endif
 #endif /* HAVE_STRING_H */
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif /* HAVE_STRINGS_H */
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
 #endif /* HAVE_UNISTD_H */
index 3e8d46d093a6b90c47f2b894295b6798f46ac072..6f14d3fb5ab928b01dc734432e1906dd34d6e792 100644 (file)
 #  include <memory.h>
 # endif
 # include <string.h>
-#else
-# ifdef HAVE_STRINGS_H
-#  include <strings.h>
-# endif
 #endif /* HAVE_STRING_H */
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif /* HAVE_STRINGS_H */
 #include <fcntl.h>
 #include <limits.h>
 #include <pwd.h>
index 606a054cad14525637743e9d2d5ef10532f70b63..eeb141eb73fbd4e7ba7875dce7fe43ec0b5166cb 100644 (file)
--- a/visudo.c
+++ b/visudo.c
 #endif /* STDC_HEADERS */
 #ifdef HAVE_STRING_H
 # include <string.h>
-#else
-# ifdef HAVE_STRINGS_H
-#  include <strings.h>
-# endif
 #endif /* HAVE_STRING_H */
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif /* HAVE_STRINGS_H */
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif /* HAVE_UNISTD_H */