svn commit: r325043 - head/sys/compat/linux

2017-10-27 Thread David E. O'Brien
Author: obrien
Date: Fri Oct 27 16:36:05 2017
New Revision: 325043
URL: https://svnweb.freebsd.org/changeset/base/325043

Log:
  Update comment to match r177997 & r178036 changes.

Modified:
  head/sys/compat/linux/linux_file.c

Modified: head/sys/compat/linux/linux_file.c
==
--- head/sys/compat/linux/linux_file.c  Fri Oct 27 16:23:45 2017
(r325042)
+++ head/sys/compat/linux/linux_file.c  Fri Oct 27 16:36:05 2017
(r325043)
@@ -139,7 +139,7 @@ linux_common_open(struct thread *td, int dirfd, char *
goto done;
 
/*
-* XXX In between kern_open() and fget(), another process
+* XXX In between kern_openat() and fget(), another process
 * having the same filedesc could use that fd without
 * checking below.
*/
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r219025 - head/sys/arm/xscale/ixp425

2011-02-25 Thread David E. O'Brien
Author: obrien
Date: Fri Feb 25 09:07:17 2011
New Revision: 219025
URL: http://svn.freebsd.org/changeset/base/219025

Log:
  Add a real dependency on the microcode.
  Now when one does 'make kernel ; make kernel' the second invocation
  only does:  `kernel.ko' is up to date.
  rather than reproduce all the binary microcode files and relink the kernel.
  [continuation of r212429]

Modified:
  head/sys/arm/xscale/ixp425/files.ixp425

Modified: head/sys/arm/xscale/ixp425/files.ixp425
==
--- head/sys/arm/xscale/ixp425/files.ixp425 Fri Feb 25 07:33:42 2011
(r219024)
+++ head/sys/arm/xscale/ixp425/files.ixp425 Fri Feb 25 09:07:17 2011
(r219025)
@@ -38,7 +38,7 @@ IxNpeMicrocode.fwooptional npe_fw 
\
no-implicit-rule\
clean   "IxNpeMicrocode.fwo"
 IxNpeMicrocode.dat optional npe_fw \
-   dependency  ".PHONY"\
+   dependency  "$S/contrib/dev/npe/IxNpeMicrocode.dat.uu"  \
compile-with"uudecode < $S/contrib/dev/npe/IxNpeMicrocode.dat.uu" \
no-obj no-implicit-rule \
clean   "IxNpeMicrocode.dat"
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r220370 - in head: etc/mtree include lib/libedit lib/libedit/edit lib/libedit/edit/readline sbin/gvinum usr.sbin/ntp/ntpdc usr.sbin/ntp/ntpq usr.sbin/wpa/wpa_cli

2011-04-05 Thread David E. O'Brien
s,v)
+#define Strdup(x)   strdup(x)
+#define Strcpy(d,s) strcpy(d,s)
+#define Strncpy(d,s,n)  strncpy(d,s,n)
+#define Strncat(d,s,n)  strncat(d,s,n)
+
+#define Strcmp(s,v) strcmp(s,v)
+#define Strncmp(s,v,n)  strncmp(s,v,n)
+#define Strcspn(s,r)strcspn(s,r)
+
+#define Strtol(p,e,b)   strtol(p,e,b)
+
+#define Width(c)   1
+
+#endif
+
+
+#ifdef WIDECHAR
+/*
+ * Conversion buffer
+ */
+typedef struct ct_buffer_t {
+char*cbuff;
+size_t  csize;
+Char *wbuff;
+size_t  wsize;
+} ct_buffer_t;
+
+#define ct_encode_string __ct_encode_string
+/* Encode a wide character string and return the UTF-8 encoded result. */
+public char *ct_encode_string(const Char *, ct_buffer_t *);
+
+#define ct_decode_string __ct_decode_string
+/* Decode a (multi)?byte string and return the wide character string result. */
+public Char *ct_decode_string(const char *, ct_buffer_t *);
+
+/* Decode a (multi)?byte argv string array.
+ * The pointer returned must be free()d when done. */
+protected Char **ct_decode_argv(int, const char *[],  ct_buffer_t *);
+
+/* Resizes the conversion buffer(s) if needed. */
+protected void ct_conv_buff_resize(ct_buffer_t *, size_t, size_t);
+protected ssize_t ct_encode_char(char *, size_t, Char);
+protected size_t ct_enc_width(Char);
+
+#define ct_free_argv(s)el_free(s)
+
+#else
+#definect_encode_string(s, b)  (s)
+#define ct_decode_string(s, b) (s)
+#define ct_decode_argv(l, s, b)(s)
+#define ct_conv_buff_resize(b, os, ns)
+#define ct_encode_char(d, l, s)(*d = s, 1)
+#define ct_free_argv(s)
+#endif
+
+#ifndef NARROWCHAR
+/* Encode a characted into the destination buffer, provided there is sufficent
+ * buffer space available. Returns the number of bytes used up (zero if the
+ * character cannot be encoded, -1 if there was not enough space available). */
+
+/* The maximum buffer size to hold the most unwieldly visual representation,
+ * in this case \U+n. */
+#define VISUAL_WIDTH_MAX 8
+
+/* The terminal is thought of in terms of X columns by Y lines. In the cases
+ * where a wide character takes up more than one column, the adjacent 
+ * occupied column entries will contain this faux character. */
+#define MB_FILL_CHAR ((Char)-1)
+
+/* Visual width of character c, taking into account ^? , \0177 and \U+n
+ * style visual expansions. */
+protected int ct_visual_width(Char);
+
+/* Turn the given character into the appropriate visual format, matching
+ * the width given by ct_visual_width(). Returns the number of characters used
+ * up, or -1 if insufficient space. Buffer length is in count of Char's. */
+protected ssize_t ct_visual_char(Char *, size_t, Char);
+
+/* Convert the given string into visual format, using the ct_visual_char()
+ * function. Uses a static buffer, so not threadsafe. */
+protected const Char *ct_visual_string(const Char *);
+
+
+/* printable character, use ct_visual_width() to find out display width */
+#define CHTYPE_PRINT( 0)
+/* control character found inside the ASCII portion of the charset */
+#define CHTYPE_ASCIICTL (-1)
+/* a \t */
+#define CHTYPE_TAB  (-2)
+/* a \n */
+#define CHTYPE_NL   (-3)
+/* non-printable character */
+#define CHTYPE_NONPRINT (-4)
+/* classification of character c, as one of the above defines */
+protected int ct_chr_class(Char c);
+#endif
+
+
+#endif /* _chartype_f */

Modified: head/lib/libedit/edit/readline/Makefile
==
--- vendor/NetBSD/libedit/dist/readline/MakefileMon Apr  4 16:24:05 
2011(r220330)
+++ head/lib/libedit/edit/readline/Makefile Tue Apr  5 18:41:01 2011
(r220370)
@@ -1,13 +1,8 @@
-#      $NetBSD: Makefile,v 1.7 2003/08/03 09:23:15 lukem Exp $ 
+# Copyright (c) 2011 David E O'Brien
+# $FreeBSD$
 
-NOOBJ= # defined
+INCS=  readline.h history.h
 
-.include 
+INCSDIR= ${INCLUDEDIR}/edit/readline
 
-.PATH: ${NETBSDSRCDIR}/lib/libedit
-
-INCS=  readline.h
-INCSDIR=   /usr/include/readline
-INCSYMLINKS=   readline.h ${INCSDIR}/history.h
-
-.include 
+.include 

Added: head/lib/libedit/edit/readline/history.h
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/lib/libedit/edit/readline/history.h    Tue Apr  5 18:41:01 2011
(r220370)
@@ -0,0 +1,32 @@
+/*-
+ * Copyright (c) 2011 David E. O'Brien
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation 

svn commit: r220624 - in head/lib/libedit: . edit/readline

2011-04-14 Thread David E. O'Brien
Author: obrien
Date: Thu Apr 14 15:42:15 2011
New Revision: 220624
URL: http://svn.freebsd.org/changeset/base/220624

Log:
  Add $FreeBSD$'s.

Modified:
  head/lib/libedit/chartype.h
  head/lib/libedit/edit/readline/readline.h

Modified: head/lib/libedit/chartype.h
==
--- head/lib/libedit/chartype.h Thu Apr 14 15:25:27 2011(r220623)
+++ head/lib/libedit/chartype.h Thu Apr 14 15:42:15 2011(r220624)
@@ -31,6 +31,8 @@
  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * $FreeBSD$
  */
 
 #ifndef _h_chartype_f

Modified: head/lib/libedit/edit/readline/readline.h
==
--- head/lib/libedit/edit/readline/readline.h   Thu Apr 14 15:25:27 2011
(r220623)
+++ head/lib/libedit/edit/readline/readline.h   Thu Apr 14 15:42:15 2011
(r220624)
@@ -27,6 +27,8 @@
  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * $FreeBSD$
  */
 #ifndef _READLINE_H_
 #define _READLINE_H_
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r220954 - head

2011-04-22 Thread David E. O'Brien
Author: obrien
Date: Fri Apr 22 17:10:51 2011
New Revision: 220954
URL: http://svn.freebsd.org/changeset/base/220954

Log:
  Note which of the built kernels is being installed.
  
  PR:   156579
  Submitted by: dhw

Modified:
  head/Makefile.inc1

Modified: head/Makefile.inc1
==
--- head/Makefile.inc1  Fri Apr 22 14:42:42 2011(r220953)
+++ head/Makefile.inc1  Fri Apr 22 17:10:51 2011(r220954)
@@ -868,7 +868,7 @@ reinstallkernel reinstallkernel.debug: i
false
 .endif
@echo "--"
-   @echo ">>> Installing kernel"
+   @echo ">>> Installing kernel ${KERNCONF}"
@echo "--"
cd ${KRNLOBJDIR}/${INSTALLKERNEL}; \
${CROSSENV} PATH=${TMPPATH} \
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r221052 - head/usr.bin/rlogin

2011-04-25 Thread David E. O'Brien
Author: obrien
Date: Tue Apr 26 04:01:08 2011
New Revision: 221052
URL: http://svn.freebsd.org/changeset/base/221052

Log:
  Catch up with r57841 which removed the possible linking against libutil
  by not bothering to include its API.

Modified:
  head/usr.bin/rlogin/rlogin.c

Modified: head/usr.bin/rlogin/rlogin.c
==
--- head/usr.bin/rlogin/rlogin.cTue Apr 26 03:27:21 2011
(r221051)
+++ head/usr.bin/rlogin/rlogin.cTue Apr 26 04:01:08 2011
(r221052)
@@ -72,7 +72,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r221053 - head/usr.bin/rlogin

2011-04-25 Thread David E. O'Brien
Author: obrien
Date: Tue Apr 26 04:09:20 2011
New Revision: 221053
URL: http://svn.freebsd.org/changeset/base/221053

Log:
  This builds OK using the parent dir's WARNS=6.
  [built on both AMD64 and i386]

Modified:
  head/usr.bin/rlogin/Makefile

Modified: head/usr.bin/rlogin/Makefile
==
--- head/usr.bin/rlogin/MakefileTue Apr 26 04:01:08 2011
(r221052)
+++ head/usr.bin/rlogin/MakefileTue Apr 26 04:09:20 2011
(r221053)
@@ -7,6 +7,4 @@ BINOWN= root
 BINMODE=4555
 PRECIOUSPROG=
 
-WARNS?=3
-
 .include 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r221096 - head/sys/vm

2011-04-26 Thread David E. O'Brien
Author: obrien
Date: Tue Apr 26 22:18:53 2011
New Revision: 221096
URL: http://svn.freebsd.org/changeset/base/221096

Log:
  Reap old SPL comments.
  
  Reviewed by:  alc

Modified:
  head/sys/vm/swap_pager.c

Modified: head/sys/vm/swap_pager.c
==
--- head/sys/vm/swap_pager.cTue Apr 26 22:17:10 2011(r221095)
+++ head/sys/vm/swap_pager.cTue Apr 26 22:18:53 2011(r221096)
@@ -424,7 +424,6 @@ swp_pager_free_nrpage(vm_page_t m)
  *
  * No restrictions on call
  * This routine may not block.
- * This routine must be called at splvm()
  */
 static void
 swp_sizecheck(void)
@@ -449,8 +448,6 @@ swp_sizecheck(void)
  * the object and page index.  It returns a pointer to a pointer
  * to the object, or a pointer to a NULL pointer if it could not
  * find a swapblk.
- *
- * This routine must be called at splvm().
  */
 static struct swblock **
 swp_pager_hash(vm_object_t object, vm_pindex_t index)
@@ -590,12 +587,7 @@ swap_pager_swap_init(void)
  * and then converting it with swp_pager_meta_build().
  *
  * This routine may block in vm_object_allocate() and create a named
- * object lookup race, so we must interlock.   We must also run at
- * splvm() for the object lookup to handle races with interrupts, but
- * we do not have to maintain splvm() in between the lookup and the
- * add because (I believe) it is not possible to attempt to create
- * a new swap object w/handle when a default object with that handle
- * already exists.
+ * object lookup race, so we must interlock.
  *
  * MPSAFE
  */
@@ -708,11 +700,7 @@ swap_pager_dealloc(vm_object_t object)
  * Also has the side effect of advising that somebody made a mistake
  * when they configured swap and didn't configure enough.
  *
- * Must be called at splvm() to avoid races with bitmap frees from
- * vm_page_remove() aka swap_pager_page_removed().
- *
  * This routine may not block
- * This routine must be called at splvm().
  *
  * We allocate in round-robin fashion from the configured devices.
  */
@@ -785,11 +773,7 @@ swp_pager_strategy(struct buf *bp)
  * Note:  This routine may not block (it could in the old swap code),
  * and through the use of the new blist routines it does not block.
  *
- * We must be called at splvm() to avoid races with bitmap frees from
- * vm_page_remove() aka swap_pager_page_removed().
- *
  * This routine may not block
- * This routine must be called at splvm().
  */
 static void
 swp_pager_freeswapspace(daddr_t blk, int npages)
@@ -829,9 +813,6 @@ swp_pager_freeswapspace(daddr_t blk, int
  * The external callers of this routine typically have already destroyed 
  * or renamed vm_page_t's associated with this range in the object so 
  * we should be ok.
- *
- * This routine may be called at any spl.  We up our spl to splvm 
temporarily
- * in order to perform the metadata removal.
  */
 void
 swap_pager_freespace(vm_object_t object, vm_pindex_t start, vm_size_t size)
@@ -892,8 +873,6 @@ swap_pager_reserve(vm_object_t object, v
  * indirectly through swp_pager_meta_build() or if paging is still in
  * progress on the source. 
  *
- * This routine can be called at any spl
- *
  * XXX vm_page_collapse() kinda expects us not to block because we 
  * supposedly do not need to allocate memory, but for the moment we
  * *may* have to get a little memory from the zone allocator, but
@@ -1082,7 +1061,6 @@ swap_pager_haspage(vm_object_t object, v
  * depends on it.
  *
  * This routine may not block
- * This routine must be called at splvm()
  */
 static void
 swap_pager_unswapped(vm_page_t m)
@@ -1813,9 +1791,7 @@ restart:
  
  *
  * These routines manipulate the swap metadata stored in the 
- * OBJT_SWAP object.  All swp_*() routines must be called at
- * splvm() because swap can be freed up by the low level vm_page
- * code which might be called from interrupts beyond what splbio() covers.
+ * OBJT_SWAP object.
  *
  * Swap metadata is implemented with a global hash and not directly
  * linked into the object.  Instead the object simply contains
@@ -1831,9 +1807,6 @@ restart:
  * The specified swapblk is added to the object's swap metadata.  If
  * the swapblk is not valid, it is freed instead.  Any previously
  * assigned swapblk is freed.
- *
- * This routine must be called at splvm(), except when used to convert
- * an OBJT_DEFAULT object into an OBJT_SWAP object.
  */
 static void
 swp_pager_meta_build(vm_object_t object, vm_pindex_t pindex, daddr_t swapblk)
@@ -1930,8 +1903,6 @@ done:
  * This routine will free swap metadata structures as they are cleaned 
  * out.  This routine does *NOT* operate on swap metadata associated
  * with re

svn commit: r221115 - head/contrib/less

2011-04-27 Thread David E. O'Brien
Author: obrien
Date: Wed Apr 27 08:57:12 2011
New Revision: 221115
URL: http://svn.freebsd.org/changeset/base/221115

Log:
  Be clear of what licensing terms we are using.

Deleted:
  head/contrib/less/COPYING
Modified:
  head/contrib/less/README

Modified: head/contrib/less/README
==
--- head/contrib/less/READMEWed Apr 27 08:53:52 2011(r221114)
+++ head/contrib/less/READMEWed Apr 27 08:57:12 2011(r221115)
@@ -1,3 +1,11 @@
+**
+**
+**  **
+** The FreeBSD Project has chosen to redistribute and modify Less under **
+** the 'Less License' (as described in the 'LICENSE' file). **
+**  **
+**
+**
 
 Less, version 436
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r221142 - head/lib/libcrypt

2011-04-27 Thread David E. O'Brien
Author: obrien
Date: Wed Apr 27 21:33:56 2011
New Revision: 221142
URL: http://svn.freebsd.org/changeset/base/221142

Log:
  Protect the reachover built symbols after the SHA256/512 crypt(3) addition.

Modified:
  head/lib/libcrypt/Makefile

Modified: head/lib/libcrypt/Makefile
==
--- head/lib/libcrypt/Makefile  Wed Apr 27 21:13:40 2011(r221141)
+++ head/lib/libcrypt/Makefile  Wed Apr 27 21:33:56 2011(r221142)
@@ -31,7 +31,9 @@ CFLAGS+=  -I${.CURDIR} -DHAS_DES -DHAS_BL
 SRCS+= auth.c property.c
 .for sym in auth_getval property_find properties_read properties_free \
MD4Init MD4Final MD4Update MD4Pad \
-   MD5Init MD5Final MD5Update MD5Pad
+   MD5Init MD5Final MD5Update MD5Pad \
+   SHA256_Init SHA256_Final SHA256_Update \
+   SHA512_Init SHA512_Final SHA512_Update
 CFLAGS+=   -D${sym}=__${sym}
 .endfor
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r221170 - in head/contrib/tcsh/nls: . pl

2011-04-28 Thread David E. O'Brien
Author: obrien
Date: Thu Apr 28 14:43:38 2011
New Revision: 221170
URL: http://svn.freebsd.org/changeset/base/221170

Log:
  Remove unused GPL files from tcsh.

Deleted:
  head/contrib/tcsh/nls/pl/
Modified:
  head/contrib/tcsh/nls/Makefile

Modified: head/contrib/tcsh/nls/Makefile
==
--- head/contrib/tcsh/nls/Makefile  Thu Apr 28 14:42:55 2011
(r221169)
+++ head/contrib/tcsh/nls/Makefile  Thu Apr 28 14:43:38 2011
(r221170)
@@ -1,6 +1,6 @@
 # $tcsh: Makefile,v 1.14 2006/03/02 18:46:45 christos Exp $
 
-SUBDIRS=   C et finnish french german greek italian ja pl russian \
+SUBDIRS=   C et finnish french german greek italian ja russian \
spanish ukrainian
 #GENCAT=   gencat --new
 CHARSET=   charset
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r221469 - head

2011-05-04 Thread David E. O'Brien
Author: obrien
Date: Thu May  5 00:43:55 2011
New Revision: 221469
URL: http://svn.freebsd.org/changeset/base/221469

Log:
  Correct the kernel config name printed out during install.
  
  PR:   156579
  Submitted by: dhw

Modified:
  head/Makefile.inc1

Modified: head/Makefile.inc1
==
--- head/Makefile.inc1  Thu May  5 00:43:40 2011(r221468)
+++ head/Makefile.inc1  Thu May  5 00:43:55 2011(r221469)
@@ -868,7 +868,7 @@ reinstallkernel reinstallkernel.debug: i
false
 .endif
@echo "--"
-   @echo ">>> Installing kernel ${KERNCONF}"
+   @echo ">>> Installing kernel ${INSTALLKERNEL}"
@echo "--"
cd ${KRNLOBJDIR}/${INSTALLKERNEL}; \
${CROSSENV} PATH=${TMPPATH} \
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r221471 - head/lib/libcrypt

2011-05-04 Thread David E. O'Brien
Author: obrien
Date: Thu May  5 01:09:42 2011
New Revision: 221471
URL: http://svn.freebsd.org/changeset/base/221471

Log:
  s/shaN_crypt/crypt_shaN/g to be a more consistent with the existing naming.
  
  Reviewed by:  markm

Modified:
  head/lib/libcrypt/crypt-sha256.c
  head/lib/libcrypt/crypt-sha512.c
  head/lib/libcrypt/crypt.c
  head/lib/libcrypt/crypt.h

Modified: head/lib/libcrypt/crypt-sha256.c
==
--- head/lib/libcrypt/crypt-sha256.cThu May  5 00:52:19 2011
(r221470)
+++ head/lib/libcrypt/crypt-sha256.cThu May  5 01:09:42 2011
(r221471)
@@ -60,7 +60,7 @@ static const char sha256_rounds_prefix[]
 #define ROUNDS_MAX 9
 
 static char *
-sha256_crypt_r(const char *key, const char *salt, char *buffer, int buflen)
+crypt_sha256_r(const char *key, const char *salt, char *buffer, int buflen)
 {
u_long srounds;
int n;
@@ -268,12 +268,12 @@ sha256_crypt_r(const char *key, const ch
 
 /* This entry point is equivalent to crypt(3). */
 char *
-sha256_crypt(const char *key, const char *salt)
+crypt_sha256(const char *key, const char *salt)
 {
/* We don't want to have an arbitrary limit in the size of the
 * password. We can compute an upper bound for the size of the
 * result in advance and so we can prepare the buffer we pass to
-* `sha256_crypt_r'. */
+* `crypt_sha256_r'. */
static char *buffer;
static int buflen;
int needed;
@@ -293,7 +293,7 @@ sha256_crypt(const char *key, const char
buflen = needed;
}
 
-   return sha256_crypt_r(key, salt, buffer, buflen);
+   return crypt_sha256_r(key, salt, buffer, buflen);
 }
 
 #ifdef TEST
@@ -459,7 +459,7 @@ main(void)
}
 
for (cnt = 0; cnt < ntests2; ++cnt) {
-   char *cp = sha256_crypt(tests2[cnt].input, tests2[cnt].salt);
+   char *cp = crypt_sha256(tests2[cnt].input, tests2[cnt].salt);
 
if (strcmp(cp, tests2[cnt].expected) != 0) {
printf("test %d: expected \"%s\", got \"%s\"\n",

Modified: head/lib/libcrypt/crypt-sha512.c
==
--- head/lib/libcrypt/crypt-sha512.cThu May  5 00:52:19 2011
(r221470)
+++ head/lib/libcrypt/crypt-sha512.cThu May  5 01:09:42 2011
(r221471)
@@ -60,7 +60,7 @@ static const char sha512_rounds_prefix[]
 #define ROUNDS_MAX 9
 
 static char *
-sha512_crypt_r(const char *key, const char *salt, char *buffer, int buflen)
+crypt_sha512_r(const char *key, const char *salt, char *buffer, int buflen)
 {
u_long srounds;
int n;
@@ -280,12 +280,12 @@ sha512_crypt_r(const char *key, const ch
 
 /* This entry point is equivalent to crypt(3). */
 char *
-sha512_crypt(const char *key, const char *salt)
+crypt_sha512(const char *key, const char *salt)
 {
/* We don't want to have an arbitrary limit in the size of the
 * password. We can compute an upper bound for the size of the
 * result in advance and so we can prepare the buffer we pass to
-* `sha512_crypt_r'. */
+* `crypt_sha512_r'. */
static char *buffer;
static int buflen;
int needed;
@@ -305,7 +305,7 @@ sha512_crypt(const char *key, const char
buflen = needed;
}
 
-   return sha512_crypt_r(key, salt, buffer, buflen);
+   return crypt_sha512_r(key, salt, buffer, buflen);
 }
 
 #ifdef TEST
@@ -482,7 +482,7 @@ main(void)
}
 
for (cnt = 0; cnt < ntests2; ++cnt) {
-   char *cp = sha512_crypt(tests2[cnt].input, tests2[cnt].salt);
+   char *cp = crypt_sha512(tests2[cnt].input, tests2[cnt].salt);
 
if (strcmp(cp, tests2[cnt].expected) != 0) {
printf("test %d: expected \"%s\", got \"%s\"\n",

Modified: head/lib/libcrypt/crypt.c
==
--- head/lib/libcrypt/crypt.c   Thu May  5 00:52:19 2011(r221470)
+++ head/lib/libcrypt/crypt.c   Thu May  5 01:09:42 2011(r221471)
@@ -64,12 +64,12 @@ static const struct {
},
{
"sha256",
-   sha256_crypt,
+   crypt_sha256,
"$5$"
},
{
"sha512",
-   sha512_crypt,
+   crypt_sha512,
"$6$"
},
{

Modified: head/lib/libcrypt/crypt.h
==
--- head/lib/libcrypt/crypt.h   Thu May  5 00:52:19 2011(r221470)
+++ head/lib/libcrypt/crypt.h   Thu May  5 01:09:42 2011(r221471)
@@ -36,8 +36,8 @@ char *crypt_des(const char *pw, const ch
 char *crypt_md5(const char *pw, const char *salt);
 char *crypt_nthash(const char *pw, const char *salt);
 char *crypt_blowfish(const char *pw,

svn commit: r221472 - head/lib/libarchive

2011-05-04 Thread David E. O'Brien
Author: obrien
Date: Thu May  5 01:16:06 2011
New Revision: 221472
URL: http://svn.freebsd.org/changeset/base/221472

Log:
  libarchive is mixing libmd and libcrypto -- correct to use one or the other.
  [mixing the two can be quite bad -- they define the same context structures,
   but with differing structure members (and sizes)]
  
  Update the hash function support comments, and update config_freebsd.h
  to match.
  
  Approved by:  kientzle

Modified:
  head/lib/libarchive/Makefile
  head/lib/libarchive/archive_hash.h
  head/lib/libarchive/config_freebsd.h

Modified: head/lib/libarchive/Makefile
==
--- head/lib/libarchive/MakefileThu May  5 01:09:42 2011
(r221471)
+++ head/lib/libarchive/MakefileThu May  5 01:16:06 2011
(r221472)
@@ -2,8 +2,8 @@
 .include 
 
 LIB=   archive
-DPADD= ${LIBZ} ${LIBMD}
-LDADD= -lz -lmd
+DPADD= ${LIBZ}
+LDADD= -lz
 
 DPADD+= ${LIBBZ2}
 LDADD+= -lbz2
@@ -24,6 +24,9 @@ CFLAGS+=  -I${.OBJDIR}
 CFLAGS+=   -DWITH_OPENSSL
 DPADD+=${LIBCRYPTO}
 LDADD+=-lcrypto
+.else
+DPADD+=${LIBMD}
+LDADD+=-lmd
 .endif
 
 # Headers to be installed in /usr/include

Modified: head/lib/libarchive/archive_hash.h
==
--- head/lib/libarchive/archive_hash.h  Thu May  5 01:09:42 2011
(r221471)
+++ head/lib/libarchive/archive_hash.h  Thu May  5 01:16:06 2011
(r221472)
@@ -41,11 +41,11 @@
  * - OpenBSD 4.4 and earlier have SHA2 in libc with _ after algorithm name
  *
  * DragonFly and FreeBSD (XXX not used yet):
- * - MD5 and SHA1 in libmd: without _ after algorithm name
- * - SHA256: with _ after algorithm name
+ * - MD5 in libmd: without _ after algorithm name
+ * - SHA{1,256,512} in libmd: with _ after algorithm name (conflicts 
w/OpenSSL!)
  *
  * OpenSSL:
- * - MD5, SHA1 and SHA2 in libcrypto: with _ after algorithm name
+ * - MD5, SHA1, SHA2, SHA{256,384,512} in libcrypto: with _ after algorithm 
name
  */
 
 #if defined(HAVE_MD5_H) && defined(HAVE_MD5INIT)

Modified: head/lib/libarchive/config_freebsd.h
==
--- head/lib/libarchive/config_freebsd.hThu May  5 01:09:42 2011
(r221471)
+++ head/lib/libarchive/config_freebsd.hThu May  5 01:16:06 2011
(r221472)
@@ -47,8 +47,24 @@
 #defineHAVE_OPENSSL_MD5_H 1
 #defineHAVE_OPENSSL_RIPEMD_H 1
 #defineHAVE_OPENSSL_SHA_H 1
+#defineHAVE_OPENSSL_SHA256_INIT 1
+#defineHAVE_OPENSSL_SHA384_INIT 1
+#defineHAVE_OPENSSL_SHA512_INIT 1
+#defineHAVE_SHA256 1
 #defineHAVE_SHA384 1
 #defineHAVE_SHA512 1
+#else
+#defineHAVE_MD5_H 1
+#defineHAVE_MD5INIT 1
+#defineHAVE_SHA_H 1
+#defineHAVE_SHA1 1
+#defineHAVE_SHA1_INIT 1
+#defineHAVE_SHA256 1
+#defineHAVE_SHA256_H 1
+#defineHAVE_SHA256_INIT 1
+#defineHAVE_SHA512 1
+#defineHAVE_SHA512_H 1
+#defineHAVE_SHA512_INIT 1
 #endif
 
 #defineHAVE_BSDXML_H 1
@@ -88,7 +104,6 @@
 #defineHAVE_LUTIMES 1
 #defineHAVE_MALLOC 1
 #defineHAVE_MD5 1
-#defineHAVE_MD5_H 1
 #defineHAVE_MEMMOVE 1
 #defineHAVE_MKDIR 1
 #defineHAVE_MKFIFO 1
@@ -101,10 +116,6 @@
 #defineHAVE_RMD160 1
 #defineHAVE_SELECT 1
 #defineHAVE_SETENV 1
-#defineHAVE_SHA_H 1
-#defineHAVE_SHA1 1
-#defineHAVE_SHA256 1
-#defineHAVE_SHA256_H 1
 #defineHAVE_SIGNAL_H 1
 #defineHAVE_STDINT_H 1
 #defineHAVE_STDLIB_H 1
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r221476 - head/sys/sys

2011-05-04 Thread David E. O'Brien
Author: obrien
Date: Thu May  5 02:35:25 2011
New Revision: 221476
URL: http://svn.freebsd.org/changeset/base/221476

Log:
  Guard ptrdiff_t.

Modified:
  head/sys/sys/stddef.h

Modified: head/sys/sys/stddef.h
==
--- head/sys/sys/stddef.h   Thu May  5 02:35:11 2011(r221475)
+++ head/sys/sys/stddef.h   Thu May  5 02:35:25 2011(r221476)
@@ -33,7 +33,10 @@
 #include 
 #include 
 
+#ifndef _PTRDIFF_T_DECLARED
 typedef__ptrdiff_t ptrdiff_t;
+#define_PTRDIFF_T_DECLARED
+#endif
 
 #defineoffsetof(type, field)   __offsetof(type, field)
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r221502 - in head: lib/libutil sys/sys

2011-05-05 Thread David E. O'Brien
Author: obrien
Date: Thu May  5 14:45:24 2011
New Revision: 221502
URL: http://svn.freebsd.org/changeset/base/221502

Log:
  Don't duplicate define the stdint types.

Added:
  head/sys/sys/_stdint.h
 - copied, changed from r221139, head/sys/sys/stdint.h
Modified:
  head/lib/libutil/libutil.h
  head/sys/sys/stdint.h
  head/sys/sys/types.h

Modified: head/lib/libutil/libutil.h
==
--- head/lib/libutil/libutil.h  Thu May  5 14:43:35 2011(r221501)
+++ head/lib/libutil/libutil.h  Thu May  5 14:45:24 2011(r221502)
@@ -41,22 +41,13 @@
 
 #include 
 #include 
+#include 
 
 #ifndef _GID_T_DECLARED
 typedef__gid_t gid_t;
 #define_GID_T_DECLARED
 #endif
 
-#ifndef _INT64_T_DECLARED
-typedef__int64_t   int64_t;
-#define_INT64_T_DECLARED
-#endif
-
-#ifndef _UINT64_T_DECLARED
-typedef__uint64_t  uint64_t;
-#define_UINT64_T_DECLARED
-#endif
-
 #ifndef _PID_T_DECLARED
 typedef__pid_t pid_t;
 #define_PID_T_DECLARED

Copied and modified: head/sys/sys/_stdint.h (from r221139, 
head/sys/sys/stdint.h)
==
--- head/sys/sys/stdint.h   Wed Apr 27 20:42:30 2011(r221139, copy 
source)
+++ head/sys/sys/_stdint.h  Thu May  5 14:45:24 2011(r221502)
@@ -1,4 +1,5 @@
 /*-
+ * Copyright (c) 2011 David E. O'Brien 
  * Copyright (c) 2001 Mike Barcroft 
  * All rights reserved.
  *
@@ -26,13 +27,8 @@
  * $FreeBSD$
  */
 
-#ifndef _SYS_STDINT_H_
-#define _SYS_STDINT_H_
-
-#include 
-#include 
-
-#include 
+#ifndef _SYS__STDINT_H_
+#define _SYS__STDINT_H_
 
 #ifndef _INT8_T_DECLARED
 typedef__int8_tint8_t;
@@ -74,33 +70,13 @@ typedef __uint64_t  uint64_t;
 #define_UINT64_T_DECLARED
 #endif
 
-typedef__int_least8_t  int_least8_t;
-typedef__int_least16_t int_least16_t;
-typedef__int_least32_t int_least32_t;
-typedef__int_least64_t int_least64_t;
-
-typedef__uint_least8_t uint_least8_t;
-typedef__uint_least16_tuint_least16_t;
-typedef__uint_least32_tuint_least32_t;
-typedef__uint_least64_tuint_least64_t;
-
-typedef__int_fast8_t   int_fast8_t;
-typedef__int_fast16_t  int_fast16_t;
-typedef__int_fast32_t  int_fast32_t;
-typedef__int_fast64_t  int_fast64_t;
-
-typedef__uint_fast8_t  uint_fast8_t;
-typedef__uint_fast16_t uint_fast16_t;
-typedef__uint_fast32_t uint_fast32_t;
-typedef__uint_fast64_t uint_fast64_t;
-
-typedef__intmax_t  intmax_t;
-typedef__uintmax_t uintmax_t;
-
 #ifndef _INTPTR_T_DECLARED
 typedef__intptr_t  intptr_t;
-typedef__uintptr_t uintptr_t;
 #define_INTPTR_T_DECLARED
 #endif
+#ifndef _UINTPTR_T_DECLARED
+typedef__uintptr_t uintptr_t;
+#define_UINTPTR_T_DECLARED
+#endif
 
-#endif /* !_SYS_STDINT_H_ */
+#endif /* !_SYS__STDINT_H_ */

Modified: head/sys/sys/stdint.h
==
--- head/sys/sys/stdint.h   Thu May  5 14:43:35 2011(r221501)
+++ head/sys/sys/stdint.h   Thu May  5 14:45:24 2011(r221502)
@@ -33,46 +33,7 @@
 #include 
 
 #include 
-
-#ifndef _INT8_T_DECLARED
-typedef__int8_tint8_t;
-#define_INT8_T_DECLARED
-#endif
-
-#ifndef _INT16_T_DECLARED
-typedef__int16_t   int16_t;
-#define_INT16_T_DECLARED
-#endif
-
-#ifndef _INT32_T_DECLARED
-typedef__int32_t   int32_t;
-#define_INT32_T_DECLARED
-#endif
-
-#ifndef _INT64_T_DECLARED
-typedef__int64_t   int64_t;
-#define_INT64_T_DECLARED
-#endif
-
-#ifndef _UINT8_T_DECLARED
-typedef__uint8_t   uint8_t;
-#define_UINT8_T_DECLARED
-#endif
-
-#ifndef _UINT16_T_DECLARED
-typedef__uint16_t  uint16_t;
-#define_UINT16_T_DECLARED
-#endif
-
-#ifndef _UINT32_T_DECLARED
-typedef__uint32_t  uint32_t;
-#define_UINT32_T_DECLARED
-#endif
-
-#ifndef _UINT64_T_DECLARED
-typedef__uint64_t  uint64_t;
-#define_UINT64_T_DECLARED
-#endif
+#include 
 
 typedef__int_least8_t  int_least8_t;
 typedef__int_least16_t int_least16_t;
@@ -94,13 +55,13 @@ typedef __uint_fast16_t uint_fast16_t;
 typedef__uint_fast32_t uint_fast32_t;
 typedef__uint_fast64_t uint_fast64_t;
 
+#ifndef _INTMAX_T_DECLARED
 typedef__intmax_t  intmax_t;
+#define_INTMAX_T_DECLARED
+#endif
+#ifndef _UINTMAX_T_DECLARE

svn commit: r221569 - in head: lib/libdwarf lib/libelf sys/sys

2011-05-06 Thread David E. O'Brien
eSat May  7 01:05:31 2011(r221569)
@@ -57,7 +57,7 @@ INCS= libelf.h gelf.h
 
 GENSRCS=   libelf_fsize.c libelf_msize.c libelf_convert.c
 CLEANFILES=${GENSRCS}
-CFLAGS+=   -I. -I${.CURDIR}
+CFLAGS+=   -I${.CURDIR} -I${.CURDIR}/../../sys
 
 SHLIB_MAJOR=   1
 

Modified: head/lib/libelf/libelf_data.c
==
--- head/lib/libelf/libelf_data.c   Sat May  7 00:25:12 2011
(r221568)
+++ head/lib/libelf/libelf_data.c   Sat May  7 01:05:31 2011
(r221569)
@@ -84,6 +84,8 @@ _libelf_xlate_shtype(uint32_t sht)
case SHT_SUNW_dof:
return (ELF_T_BYTE);
 #endif
+   case SHT_MIPS_DWARF:
+   /* FALLTHROUGH */
case SHT_AMD64_UNWIND:  /* == SHT_IA_64_UNWIND */
return (ELF_T_BYTE);
default:

Modified: head/sys/sys/elf_common.h
==============
--- head/sys/sys/elf_common.h   Sat May  7 00:25:12 2011(r221568)
+++ head/sys/sys/elf_common.h   Sat May  7 01:05:31 2011(r221569)
@@ -1,4 +1,5 @@
 /*-
+ * Copyright (c) 2000, 2001, 2008, 2011, David E. O'Brien
  * Copyright (c) 1998 John D. Polstra.
  * All rights reserved.
  *
@@ -295,6 +296,7 @@ typedef struct {
 #defineSHT_HIOS0x6fff  /* Last of OS specific 
semantics */
 #defineSHT_LOPROC  0x7000  /* reserved range for 
processor */
 #defineSHT_AMD64_UNWIND0x7001  /* unwind information */
+#defineSHT_MIPS_DWARF  0x701e  /* MIPS gcc uses 
MIPS_DWARF */
 #defineSHT_HIPROC  0x7fff  /* specific section 
header types */
 #defineSHT_LOUSER  0x8000  /* reserved range for 
application */
 #defineSHT_HIUSER  0x  /* specific indexes */
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r206217 - head/lib/libc/stdio

2010-04-05 Thread David E. O'Brien
Author: obrien
Date: Mon Apr  5 22:09:29 2010
New Revision: 206217
URL: http://svn.freebsd.org/changeset/base/206217

Log:
  I feel this wording of the history is more clear.
  ANSIfy vasprintf() while I'm here.

Modified:
  head/lib/libc/stdio/printf.3
  head/lib/libc/stdio/vasprintf.c

Modified: head/lib/libc/stdio/printf.3
==
--- head/lib/libc/stdio/printf.3Mon Apr  5 22:08:52 2010
(r206216)
+++ head/lib/libc/stdio/printf.3Mon Apr  5 22:09:29 2010
(r206217)
@@ -891,9 +891,9 @@ in
 .Fx 2.2 ,
 but were later replaced with a different implementation
 from
-.An Todd C. Miller Aq todd.mil...@courtesan.com
-for
-.Ox 2.3 .
+.Ox 2.3
+by
+.An Todd C. Miller Aq todd.mil...@courtesan.com .
 The
 .Fn dprintf
 and

Modified: head/lib/libc/stdio/vasprintf.c
==
--- head/lib/libc/stdio/vasprintf.c Mon Apr  5 22:08:52 2010
(r206216)
+++ head/lib/libc/stdio/vasprintf.c Mon Apr  5 22:09:29 2010
(r206217)
@@ -36,16 +36,13 @@ __FBSDID("$FreeBSD$");
 #include "local.h"
 
 int
-vasprintf(str, fmt, ap)
-   char **str;
-   const char *fmt;
-   __va_list ap;
+vasprintf(char **str, const char *fmt, __va_list ap)
 {
-   int ret;
FILE f = FAKE_FILE;
+   int ret;
 
f._flags = __SWR | __SSTR | __SALC;
-   f._bf._base = f._p = (unsigned char *)malloc(128);
+   f._bf._base = f._p = malloc(128);
if (f._bf._base == NULL) {
*str = NULL;
errno = ENOMEM;
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r207995 - in head: . etc/mtree gnu/lib/libgcc gnu/lib/libstdc++ gnu/lib/libsupc++ gnu/usr.bin/cc gnu/usr.bin/cc/cc_tools gnu/usr.bin/cc/include

2010-05-12 Thread David E. O'Brien
Author: obrien
Date: Wed May 12 19:59:32 2010
New Revision: 207995
URL: http://svn.freebsd.org/changeset/base/207995

Log:
  Non-GCC gcc compatible compilers may provide the same multimedia intrinsic
  headers as GCC, but of their own implementation.  So put the GCC ones into
  their own header "namespace".
  
  Requested by: ed

Modified:
  head/ObsoleteFiles.inc
  head/etc/mtree/BSD.include.dist
  head/gnu/lib/libgcc/Makefile
  head/gnu/lib/libstdc++/Makefile
  head/gnu/lib/libsupc++/Makefile
  head/gnu/usr.bin/cc/Makefile.inc
  head/gnu/usr.bin/cc/cc_tools/freebsd-native.h
  head/gnu/usr.bin/cc/include/Makefile

Modified: head/ObsoleteFiles.inc
==
--- head/ObsoleteFiles.inc  Wed May 12 19:35:13 2010(r207994)
+++ head/ObsoleteFiles.inc  Wed May 12 19:59:32 2010(r207995)
@@ -14,6 +14,24 @@
 # The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS last.
 #
 
+# 20100511: move GCC-specific headers to /usr/include/gcc
+.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "i386"
+OLD_FILES+=usr/include/emmintrin.h
+OLD_FILES+=usr/include/mm_malloc.h
+OLD_FILES+=usr/include/pmmintrin.h
+OLD_FILES+=usr/include/xmmintrin.h
+.endif
+.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "i386" || ${TARGET_ARCH} == 
"arm"
+OLD_FILES+=usr/include/mmintrin.h
+.endif
+.if ${TARGET_ARCH} == "ia64"
+OLD_FILES+=usr/include/ia64intrin.h
+.endif
+.if ${TARGET_ARCH} == "powerpc"
+OLD_FILES+=usr/include/altivec.h
+OLD_FILES+=usr/include/ppc-asm.h
+OLD_FILES+=usr/include/spe.h
+.endif
 # 20100416: [mips] removed 
 .if ${TARGET_ARCH} == "mips"
 OLD_FILES+=usr/include/machine/psl.h

Modified: head/etc/mtree/BSD.include.dist
==
--- head/etc/mtree/BSD.include.dist Wed May 12 19:35:13 2010
(r207994)
+++ head/etc/mtree/BSD.include.dist Wed May 12 19:59:32 2010
(r207995)
@@ -159,6 +159,10 @@
 unionfs
 ..
 ..
+gcc
+4.2
+..
+..
 geom
 cache
 ..

Modified: head/gnu/lib/libgcc/Makefile
==
--- head/gnu/lib/libgcc/MakefileWed May 12 19:35:13 2010
(r207994)
+++ head/gnu/lib/libgcc/MakefileWed May 12 19:59:32 2010
(r207995)
@@ -1,4 +1,5 @@
 # $FreeBSD$
+
 GCCDIR=${.CURDIR}/../../../contrib/gcc
 GCCLIB=${.CURDIR}/../../../contrib/gcclibs
 

Modified: head/gnu/lib/libstdc++/Makefile
==
--- head/gnu/lib/libstdc++/Makefile Wed May 12 19:35:13 2010
(r207994)
+++ head/gnu/lib/libstdc++/Makefile Wed May 12 19:59:32 2010
(r207995)
@@ -1,5 +1,6 @@
 # $FreeBSD$
 
+GCCVER=4.2
 GCCDIR=${.CURDIR}/../../../contrib/gcc
 GCCLIB=${.CURDIR}/../../../contrib/gcclibs
 SRCDIR=${.CURDIR}/../../../contrib/libstdc++
@@ -94,7 +95,7 @@ CLEANFILES+=  atomicity.cc
 
 INCSGROUPS=BITSHDRS BKWHDRS EXTHDRS BASEHDRS BASEXHDRS STDHDRS \
TARGETHDRS THRHDRS DEBUGHDRS TR1HDRS PBHDRS0 PBHDRS1
-CXXINCLUDEDIR= ${INCLUDEDIR}/c++/4.2
+CXXINCLUDEDIR= ${INCLUDEDIR}/c++/${GCCVER}
 
 STDHDRS=   std_algorithm.h std_bitset.h std_complex.h std_deque.h \
std_fstream.h std_functional.h std_iomanip.h std_ios.h \

Modified: head/gnu/lib/libsupc++/Makefile
==
--- head/gnu/lib/libsupc++/Makefile Wed May 12 19:35:13 2010
(r207994)
+++ head/gnu/lib/libsupc++/Makefile Wed May 12 19:59:32 2010
(r207995)
@@ -1,10 +1,11 @@
 # $FreeBSD$
 
+GCCVER=4.2
 GCCDIR=${.CURDIR}/../../../contrib/gcc
 GCCLIB=${.CURDIR}/../../../contrib/gcclibs
 SRCDIR=${.CURDIR}/../../../contrib/libstdc++/libsupc++
 
-.PATH: ${SRCDIR} ${GCCLIB}/libiberty 
+.PATH: ${SRCDIR} ${GCCLIB}/libiberty
 
 # Static only.
 LIB=   supc++
@@ -27,7 +28,7 @@ PO_CXXFLAGS=${CXXFLAGS:N-ffunction-s
 
 HDRS=  exception new typeinfo cxxabi.h exception_defines.h
 INCS=  ${HDRS:S;^;${SRCDIR}/;}
-INCSDIR=${INCLUDEDIR}/c++/4.2
+INCSDIR=${INCLUDEDIR}/c++/${GCCVER}
 
 unwind.h: ${GCCDIR}/unwind-generic.h
ln -sf ${.ALLSRC} ${.TARGET}

Modified: head/gnu/usr.bin/cc/Makefile.inc
==
--- head/gnu/usr.bin/cc/Makefile.incWed May 12 19:35:13 2010
(r207994)
+++ head/gnu/usr.bin/cc/Makefile.incWed May 12 19:59:32 2010
(r207995)
@@ -6,6 +6,7 @@
 .if !defined(__CC_MAKEFILE_INC__)
 __CC_MAKEFILE_INC__= ${MFILE}
 
+GCCVER=4.2
 GCCDIR=${.CURDIR}/../../../../contrib/gcc
 GCCLIB=${.CURDIR}/../../../../contrib/gcclibs
 
@@ -15,6 +16,7 @@ GCCLIB=   ${.CURDIR}/../../../../contrib/g
 MD_FILE=   ${GCCDIR}/config/${GCC_CPU}/${GCC_CPU}.md
 GCC_TARGET=

svn commit: r228191 - head/etc/rc.d

2011-12-01 Thread David E. O'Brien
Author: obrien
Date: Thu Dec  1 22:50:10 2011
New Revision: 228191
URL: http://svn.freebsd.org/changeset/base/228191

Log:
  Ensure kldxref is run first.  Currently both 'kldxref' and 'kld' depend
  on "FILESYSTEMS" and 'kld' is being run 8 scripts ahead of 'kldxref'.
  
  Reported by:  dhw

Modified:
  head/etc/rc.d/kld

Modified: head/etc/rc.d/kld
==
--- head/etc/rc.d/kld   Thu Dec  1 21:17:59 2011(r228190)
+++ head/etc/rc.d/kld   Thu Dec  1 22:50:10 2011(r228191)
@@ -27,7 +27,7 @@
 # $FreeBSD$
 #
 # PROVIDE: kld
-# REQUIRE: FILESYSTEMS
+# REQUIRE: kldxref
 # KEYWORD: nojail
 
 . /etc/rc.subr
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r228193 - head/lib/libc/gen

2011-12-01 Thread David E. O'Brien
Author: obrien
Date: Fri Dec  2 01:06:33 2011
New Revision: 228193
URL: http://svn.freebsd.org/changeset/base/228193

Log:
  Tweak the r137233 fix to r136283 -- Code was making two send() attempts
  vs. the comment documented "If we are working with a privileged socket,
  then take only one attempt".  Make the code match.
  
  Furthermore, critical privileged applications that [over] log a vast amount
  can look like a DoS to this code.  Given it's unlikely the single reattempted
  send() will succeeded, avoid usurping the scheduler in a library API for a
  single non-critical facility in critical applications.
  
  Obtained from:Juniper Networks
  Discussed with:   glebius

Modified:
  head/lib/libc/gen/syslog.c

Modified: head/lib/libc/gen/syslog.c
==
--- head/lib/libc/gen/syslog.c  Fri Dec  2 00:38:47 2011(r228192)
+++ head/lib/libc/gen/syslog.c  Fri Dec  2 01:06:33 2011(r228193)
@@ -265,7 +265,7 @@ vsyslog(int pri, const char *fmt, va_lis
 *  1) syslogd was restarted
 *  2) /var/run/log is out of socket buffer space, which
 * in most cases means local DoS.
-* We attempt to reconnect to /var/run/log to take care of
+* We attempt to reconnect to /var/run/log[priv] to take care of
 * case #1 and keep send()ing data to cover case #2
 * to give syslogd a chance to empty its socket buffer.
 *
@@ -281,13 +281,13 @@ vsyslog(int pri, const char *fmt, va_lis
connectlog();
}
do {
+   if (status == CONNPRIV)
+   break;
_usleep(1);
if (send(LogFile, tbuf, cnt, 0) >= 0) {
THREAD_UNLOCK();
return;
}
-   if (status == CONNPRIV)
-   break;
} while (errno == ENOBUFS);
} else {
THREAD_UNLOCK();
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r228199 - head/lib/libc/locale

2011-12-02 Thread David E. O'Brien
Author: obrien
Date: Fri Dec  2 11:55:09 2011
New Revision: 228199
URL: http://svn.freebsd.org/changeset/base/228199

Log:
  Split sentences at period boundaries.

Modified:
  head/lib/libc/locale/duplocale.3
  head/lib/libc/locale/freelocale.3
  head/lib/libc/locale/localeconv.3
  head/lib/libc/locale/newlocale.3
  head/lib/libc/locale/querylocale.3
  head/lib/libc/locale/uselocale.3
  head/lib/libc/locale/xlocale.3

Modified: head/lib/libc/locale/duplocale.3
==
--- head/lib/libc/locale/duplocale.3Fri Dec  2 10:02:49 2011
(r228198)
+++ head/lib/libc/locale/duplocale.3Fri Dec  2 11:55:09 2011
(r228199)
@@ -36,25 +36,26 @@
 .Sh LIBRARY
 .Lb libc
 .Sh SYNOPSIS
-.In xlocale.h 
-.Ft locale_t 
+.In xlocale.h
+.Ft locale_t
 .Fn duplocale "locale_t locale"
 .Sh DESCRIPTION
 Duplicates an existing
 .Fa locale_t
-returning a new 
+returning a new
 .Fa locale_t
 that refers to the same locale values but has independent internal state.
 Various functions, such as
 .Xr mblen 3
-require presistent state.  These functions formerly used static variables and
-calls to them from multiple threads had undefined behavior.  They now use
-fields in the
+require presistent state.
+These functions formerly used static variables and calls to them from multiple
+threads had undefined behavior.
+They now use fields in the
 .Fa locale_t
 associated with the current thread by
 .Xr uselocale 3 .
 These calls are therefore only thread safe on threads with a unique per-thread
-locale.  
+locale.
 .Pt
 The locale returned by this call must be freed with
 .Xr freelocale 3 .
@@ -63,8 +64,9 @@ Ideally,
 .Xr uselocale 3
 should make a copy of the
 .Fa locale_t
-implicitly to ensure thread safety, and a copy of the global locale should be
-installed lazily on each thread.  The FreeBSD implementation does not do this,
+implicitly to ensure thread safety,
+and a copy of the global locale should be installed lazily on each thread.
+The FreeBSD implementation does not do this,
 for compatibility with Darwin.
 .Sh SEE ALSO
 .Xr freelocale 3 ,

Modified: head/lib/libc/locale/freelocale.3
==
--- head/lib/libc/locale/freelocale.3   Fri Dec  2 10:02:49 2011
(r228198)
+++ head/lib/libc/locale/freelocale.3   Fri Dec  2 11:55:09 2011
(r228199)
@@ -33,22 +33,22 @@
 .Nm freelocale
 .Nd Frees a locale created with
 .Xr duplocale 3
-or 
+or
 .Xr newlocale 3 .
 .Sh LIBRARY
 .Lb libc
 .Sh SYNOPSIS
-.In xlocale.h 
+.In xlocale.h
 .Ft int
 .Fn freelocale "locale_t locale"
 .Sh DESCRIPTION
 Frees a
 .Fa locale_t .
-This relinquishes any resources held exclusively by this locale.  Note that
-locales share reference-counted components, so a call to this function is not
-guaranteed to free all of the components.
+This relinquishes any resources held exclusively by this locale.
+Note that locales share reference-counted components,
+so a call to this function is not guaranteed to free all of the components.
 .Sh RETURN VALUES
-Returns 0 on success or -1 on error.  
+Returns 0 on success or -1 on error.
 .Sh SEE ALSO
 .Xr duplocale 3 ,
 .Xr localeconv 3 ,

Modified: head/lib/libc/locale/localeconv.3
==
--- head/lib/libc/locale/localeconv.3   Fri Dec  2 10:02:49 2011
(r228198)
+++ head/lib/libc/locale/localeconv.3   Fri Dec  2 11:55:09 2011
(r228199)
@@ -203,7 +203,7 @@ result similarly denotes an unavailable 
 The
 .Fn localeconv_l
 function takes an explicit locale parameter.  For more information, see
-.Xr xlocale 3 .  
+.Xr xlocale 3 .
 .Sh RETURN VALUES
 The
 .Fn localeconv
@@ -212,9 +212,10 @@ which may be altered by later calls to
 .Xr setlocale 3
 or
 .Fn localeconv .
-The return value for 
+The return value for
 .Fn localeconv_l
-is stored with the locale.  It will remain valid until a subsequent call to
+is stored with the locale.
+It will remain valid until a subsequent call to
 .Xr freelocale 3 .
 If a thread-local locale is in effect then the return value from
 .Fn localeconv

Modified: head/lib/libc/locale/newlocale.3
==
--- head/lib/libc/locale/newlocale.3Fri Dec  2 10:02:49 2011
(r228198)
+++ head/lib/libc/locale/newlocale.3Fri Dec  2 11:55:09 2011
(r228199)
@@ -31,40 +31,44 @@
 .Os
 .Sh NAME
 .Nm newlocale
-.Nd Creates a new locale 
+.Nd Creates a new locale
 .Sh LIBRARY
 .Lb libc
 .Sh SYNOPSIS
 .In xlocale
-.Ft 
+.Ft
 .Fn newlocale "int mask" "const char * locale" "locale_t base"
 .Sh DESCRIPTION
-Creates a new locale, inheriting some properties from an existing locale.  The
-.Fa mask 
+Creates a new locale, inheriting some properties from an existing locale.
+The
+.Fa mask
 defines the components that the new locale will have set to the locale with the
-name specified in the

svn commit: r228475 - head/sys/kern

2011-12-13 Thread David E. O'Brien
Author: obrien
Date: Tue Dec 13 17:59:16 2011
New Revision: 228475
URL: http://svn.freebsd.org/changeset/base/228475

Log:
  Disallow various debug.kdb sysctl's when securelevel is raised.
  
  PR:   161350

Modified:
  head/sys/kern/kern_shutdown.c

Modified: head/sys/kern/kern_shutdown.c
==
--- head/sys/kern/kern_shutdown.c   Tue Dec 13 17:34:47 2011
(r228474)
+++ head/sys/kern/kern_shutdown.c   Tue Dec 13 17:59:16 2011
(r228475)
@@ -102,8 +102,9 @@ int debugger_on_panic = 0;
 #else
 int debugger_on_panic = 1;
 #endif
-SYSCTL_INT(_debug, OID_AUTO, debugger_on_panic, CTLFLAG_RW | CTLFLAG_TUN,
-   &debugger_on_panic, 0, "Run debugger on kernel panic");
+SYSCTL_INT(_debug, OID_AUTO, debugger_on_panic,
+CTLFLAG_RW | CTLFLAG_SECURE | CTLFLAG_TUN, &debugger_on_panic, 0,
+"Run debugger on kernel panic");
 TUNABLE_INT("debug.debugger_on_panic", &debugger_on_panic);
 
 #ifdef KDB_TRACE
@@ -111,8 +112,9 @@ static int trace_on_panic = 1;
 #else
 static int trace_on_panic = 0;
 #endif
-SYSCTL_INT(_debug, OID_AUTO, trace_on_panic, CTLFLAG_RW | CTLFLAG_TUN,
-   &trace_on_panic, 0, "Print stack trace on kernel panic");
+SYSCTL_INT(_debug, OID_AUTO, trace_on_panic,
+CTLFLAG_RW | CTLFLAG_SECURE | CTLFLAG_TUN, &trace_on_panic, 0,
+"Print stack trace on kernel panic");
 TUNABLE_INT("debug.trace_on_panic", &trace_on_panic);
 #endif /* KDB */
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r228487 - head/sys/kern

2011-12-13 Thread David E. O'Brien
Author: obrien
Date: Wed Dec 14 02:31:32 2011
New Revision: 228487
URL: http://svn.freebsd.org/changeset/base/228487

Log:
  Match other formatting.

Modified:
  head/sys/kern/kern_shutdown.c

Modified: head/sys/kern/kern_shutdown.c
==
--- head/sys/kern/kern_shutdown.c   Wed Dec 14 01:19:37 2011
(r228486)
+++ head/sys/kern/kern_shutdown.c   Wed Dec 14 02:31:32 2011
(r228487)
@@ -103,8 +103,8 @@ int debugger_on_panic = 0;
 int debugger_on_panic = 1;
 #endif
 SYSCTL_INT(_debug, OID_AUTO, debugger_on_panic,
-CTLFLAG_RW | CTLFLAG_SECURE | CTLFLAG_TUN, &debugger_on_panic, 0,
-"Run debugger on kernel panic");
+CTLFLAG_RW | CTLFLAG_SECURE | CTLFLAG_TUN,
+&debugger_on_panic, 0, "Run debugger on kernel panic");
 TUNABLE_INT("debug.debugger_on_panic", &debugger_on_panic);
 
 #ifdef KDB_TRACE
@@ -113,8 +113,8 @@ static int trace_on_panic = 1;
 static int trace_on_panic = 0;
 #endif
 SYSCTL_INT(_debug, OID_AUTO, trace_on_panic,
-CTLFLAG_RW | CTLFLAG_SECURE | CTLFLAG_TUN, &trace_on_panic, 0,
-"Print stack trace on kernel panic");
+CTLFLAG_RW | CTLFLAG_SECURE | CTLFLAG_TUN,
+&trace_on_panic, 0, "Print stack trace on kernel panic");
 TUNABLE_INT("debug.trace_on_panic", &trace_on_panic);
 #endif /* KDB */
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r229067 - in head: . sys/sys

2011-12-30 Thread David E. O'Brien
Author: obrien
Date: Sat Dec 31 04:38:04 2011
New Revision: 229067
URL: http://svn.freebsd.org/changeset/base/229067

Log:
  Happy 2012 to FreeBSD users in Samoa.

Modified:
  head/COPYRIGHT
  head/sys/sys/copyright.h

Modified: head/COPYRIGHT
==
--- head/COPYRIGHT  Sat Dec 31 04:05:13 2011(r229066)
+++ head/COPYRIGHT  Sat Dec 31 04:38:04 2011(r229067)
@@ -4,7 +4,7 @@
 The compilation of software known as FreeBSD is distributed under the
 following terms:
 
-Copyright (c) 1992-2011 The FreeBSD Project. All rights reserved.
+Copyright (c) 1992-2012 The FreeBSD Project. All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions

Modified: head/sys/sys/copyright.h
==
--- head/sys/sys/copyright.hSat Dec 31 04:05:13 2011(r229066)
+++ head/sys/sys/copyright.hSat Dec 31 04:38:04 2011(r229067)
@@ -1,5 +1,5 @@
 /*-
- * Copyright (C) 1992-2011 The FreeBSD Project. All rights reserved.
+ * Copyright (C) 1992-2012 The FreeBSD Project. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -30,7 +30,7 @@
 
 /* FreeBSD */
 #define COPYRIGHT_FreeBSD \
-   "Copyright (c) 1992-2011 The FreeBSD Project.\n"
+   "Copyright (c) 1992-2012 The FreeBSD Project.\n"
 
 /* Foundation */
 #defineTRADEMARK_Foundation \
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r221783 - head

2011-05-11 Thread David E. O'Brien
Author: obrien
Date: Wed May 11 17:50:19 2011
New Revision: 221783
URL: http://svn.freebsd.org/changeset/base/221783

Log:
  + DTrace as a bootstrap tool is only needed on certain older systems.
  + Be more consistent between BMAKE and TMAKE.
  + Add NO_CTF to crosstools as is done for bootstrap and build tools.
  
  Reviewed by: marcel

Modified:
  head/Makefile.inc1

Modified: head/Makefile.inc1
==
--- head/Makefile.inc1  Wed May 11 17:20:35 2011(r221782)
+++ head/Makefile.inc1  Wed May 11 17:50:19 2011(r221783)
@@ -246,9 +246,10 @@ TMAKE= MAKEOBJDIRPREFIX=${OBJTREE} \
${BMAKEENV} ${MAKE} -f Makefile.inc1 \
TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \
DESTDIR= \
+   BOOTSTRAPPING=${OSRELDATE} \
SSP_CFLAGS= \
-   BOOTSTRAPPING=${OSRELDATE} -DNO_LINT -DNO_CPU_CFLAGS \
-   -DNO_WARNS -DNO_CTF
+   -DNO_LINT \
+   -DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF
 
 # cross-tools stage
 XMAKE= TOOLS_PREFIX=${WORLDTMP} ${BMAKE} \
@@ -829,7 +830,7 @@ buildkernel:
@echo "--"
cd ${KRNLOBJDIR}/${_kernel}; \
MAKESRCPATH=${KERNSRCDIR}/dev/aic7xxx/aicasm \
-   ${MAKE} SSP_CFLAGS= -DNO_CPU_CFLAGS \
+   ${MAKE} SSP_CFLAGS= -DNO_CPU_CFLAGS -DNO_CTF \
-f ${KERNSRCDIR}/dev/aic7xxx/aicasm/Makefile
 # XXX - Gratuitously builds aicasm in the ``makeoptions NO_MODULES'' case.
 .if !defined(MODULES_WITH_WORLD) && !defined(NO_MODULES) && 
exists(${KERNSRCDIR}/modules)
@@ -1024,7 +1025,9 @@ _clang_tblgen= \
usr.bin/clang/tblgen
 .endif
 
-.if ${MK_CDDL} != "no"
+.if ${MK_CDDL} != "no" && \
+${BOOTSTRAPPING} < 800038 && \
+!(${BOOTSTRAPPING} >= 700112 && ${BOOTSTRAPPING} < 79)
 _dtrace_tools= cddl/usr.bin/sgsmsg cddl/lib/libctf lib/libelf \
 lib/libdwarf cddl/usr.bin/ctfconvert cddl/usr.bin/ctfmerge
 .endif
@@ -1033,6 +1036,9 @@ _dtrace_tools= cddl/usr.bin/sgsmsg cddl/
 _dtc= gnu/usr.bin/dtc
 .endif
 
+#  Please document (add comment) why something is in 'bootstrap-tools'.
+#  Try to bound the building of the bootstrap-tool to just the
+#  FreeBSD versions that need the tool built at this stage of the build.
 bootstrap-tools:
 .for _tool in \
 ${_clang_tblgen} \
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r222273 - in head: gnu/usr.bin gnu/usr.bin/grep tools/build/options usr.bin usr.bin/grep

2011-05-24 Thread David E. O'Brien
Author: obrien
Date: Wed May 25 01:04:12 2011
New Revision: 73
URL: http://svn.freebsd.org/changeset/base/73

Log:
  Build and install a BSD licensed grep.
  If WITH_BSD_GREP is not set, it will be 'bsdgrep' and GNUgrep will be
  '[ef]grep'.  Otherwise, BSD-grep will be the grep family, and GNUgrep
  will be 'gnugrep'.
  
  Discussed with: brooks

Modified:
  head/gnu/usr.bin/Makefile
  head/gnu/usr.bin/grep/Makefile
  head/tools/build/options/WITH_BSD_GREP
  head/usr.bin/Makefile
  head/usr.bin/grep/Makefile

Modified: head/gnu/usr.bin/Makefile
==
--- head/gnu/usr.bin/Makefile   Wed May 25 00:34:25 2011(r72)
+++ head/gnu/usr.bin/Makefile   Wed May 25 01:04:12 2011(r73)
@@ -27,9 +27,7 @@ _groff=   groff
 .endif
 .endif
 
-.if ${MK_BSD_GREP} != "yes"
 _grep=  grep
-.endif
 
 .if ${MK_CVS} != "no"
 _cvs=  cvs

Modified: head/gnu/usr.bin/grep/Makefile
==
--- head/gnu/usr.bin/grep/Makefile  Wed May 25 00:34:25 2011
(r72)
+++ head/gnu/usr.bin/grep/Makefile  Wed May 25 01:04:12 2011
(r73)
@@ -1,35 +1,50 @@
 # $FreeBSD$
 
+.include 
+
 GREP_LIBZ=YES
 
+.if ${MK_BSD_GREP} != "yes"
 PROG=  grep
+.else
+PROG=  gnugrep
+.endif
 SRCS=  closeout.c dfa.c error.c exclude.c grep.c grepmat.c hard-locale.c \
isdir.c kwset.c obstack.c quotearg.c savedir.c search.c xmalloc.c \
xstrtoumax.c
 
 CFLAGS+=-I${.CURDIR} -I${DESTDIR}/usr/include/gnu -DHAVE_CONFIG_H
 
+.if ${MK_BSD_GREP} != "yes"
 LINKS+=${BINDIR}/grep ${BINDIR}/egrep \
${BINDIR}/grep ${BINDIR}/fgrep
 MLINKS=grep.1 egrep.1 grep.1 fgrep.1
+.endif
 
 DPADD= ${LIBGNUREGEX} ${LIBBZ2}
 LDADD= -lgnuregex -lbz2
 
+.if ${MK_BSD_GREP} != "yes"
 LINKS+=${BINDIR}/grep ${BINDIR}/bzgrep \
${BINDIR}/grep ${BINDIR}/bzegrep \
${BINDIR}/grep ${BINDIR}/bzfgrep
 MLINKS+=grep.1 bzgrep.1 grep.1 bzegrep.1 grep.1 bzfgrep.1
+.endif
 
 .if defined(GREP_LIBZ) && !empty(GREP_LIBZ)
 LDADD+=-lz
 DPADD+=${LIBZ}
 CFLAGS+=-DHAVE_LIBZ=1
+.if ${MK_BSD_GREP} != "yes"
 LINKS+=${BINDIR}/grep ${BINDIR}/zgrep \
${BINDIR}/grep ${BINDIR}/zegrep \
${BINDIR}/grep ${BINDIR}/zfgrep
 MLINKS+=grep.1 zgrep.1 grep.1 zegrep.1 grep.1 zfgrep.1
 .endif
+.endif
+
+gnugrep.1: grep.1
+   cp ${.ALLSRC} ${.TARGET}
 
 SUBDIR+=doc
 

Modified: head/tools/build/options/WITH_BSD_GREP
==
--- head/tools/build/options/WITH_BSD_GREP  Wed May 25 00:34:25 2011
(r72)
+++ head/tools/build/options/WITH_BSD_GREP  Wed May 25 01:04:12 2011
(r73)
@@ -1,2 +1,2 @@
 .\" $FreeBSD$
-Build BSD-licensed grep instead of GNU grep.
+Install BSD-licensed grep as '[ef]grep' instead of GNU grep.

Modified: head/usr.bin/Makefile
==
--- head/usr.bin/Makefile   Wed May 25 00:34:25 2011(r72)
+++ head/usr.bin/Makefile   Wed May 25 01:04:12 2011(r73)
@@ -57,7 +57,7 @@ SUBDIR=   alias \
getconf \
getent \
getopt \
-   ${_grep} \
+   grep \
gzip \
head \
hexdump \
@@ -227,10 +227,6 @@ SUBDIR+=   bluetooth
 SUBDIR+=   cpio
 .endif
 
-.if ${MK_BSD_GREP} != "no"
-_grep= grep
-.endif
-
 .if ${MK_CALENDAR} != "no"
 SUBDIR+=   calendar
 .endif

Modified: head/usr.bin/grep/Makefile
==
--- head/usr.bin/grep/Makefile  Wed May 25 00:34:25 2011(r72)
+++ head/usr.bin/grep/Makefile  Wed May 25 01:04:12 2011(r73)
@@ -2,9 +2,16 @@
 #  $FreeBSD$
 #  $OpenBSD: Makefile,v 1.6 2003/06/25 15:00:04 millert Exp $
 
+.include 
+
+.if ${MK_BSD_GREP} == "yes"
 PROG=  grep
+.else
+PROG=  bsdgrep
+.endif
 SRCS=  fastgrep.c file.c grep.c queue.c util.c
 
+.if ${MK_BSD_GREP} == "yes"
 LINKS= ${BINDIR}/grep ${BINDIR}/egrep \
${BINDIR}/grep ${BINDIR}/fgrep \
${BINDIR}/grep ${BINDIR}/zgrep \
@@ -16,6 +23,10 @@ MLINKS= grep.1 egrep.1 \
grep.1 zgrep.1 \
grep.1 zegrep.1 \
grep.1 zfgrep.1
+.endif
+
+bsdgrep.1: grep.1
+   cp ${.ALLSRC} ${.TARGET}
 
 WARNS?=6
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r222295 - head/tools/build/make_check

2011-05-25 Thread David E. O'Brien
Author: obrien
Date: Wed May 25 23:33:49 2011
New Revision: 95
URL: http://svn.freebsd.org/changeset/base/95

Log:
  + Tighten up (and simplify) the pass_cmd_vars_1 "variable definition arrived
from the calling make" test.
  + Be more tolerant of newlines in the plus_flag "supports the '+' flag" test.

Modified:
  head/tools/build/make_check/Makefile

Modified: head/tools/build/make_check/Makefile
==
--- head/tools/build/make_check/MakefileWed May 25 21:53:25 2011
(r94)
+++ head/tools/build/make_check/MakefileWed May 25 23:33:49 2011
(r95)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.MAKE.MODE=normal
+
 # Test for broken LHS expansion.
 # This *must* cause make(1) to detect a recursive variable, and fail as such.
 .if make(lhs_expn)
@@ -152,24 +154,19 @@ pass_cmd_vars:
@${SMAKE} CMD1=cmd1 CMD2=cmd2 pass_cmd_vars_4
 .endif
 
-.if make(pass_cmd_vars_1)
+#
 # Check that the variable definition arrived from the calling make
+#
+.if make(pass_cmd_vars_1)
+# These values should get overridden by the commandline
+CMD1=oops1
+CMD2=oops2
 pass_cmd_vars_1:
@:
 
 .if ${CMD1} != cmd1 || ${CMD2} != cmd2
 .error variables not passed through MAKEFLAGS
 .endif
-
-# Check that the variable definition is in MAKEFLAGS
-.if ${.MAKEFLAGS:MCMD1=*} != "CMD1=cmd1" || ${.MAKEFLAGS:MCMD2=*} != 
"CMD2=cmd2"
-.error variable assignment not found in $${MAKEFLAGS}
-.endif
-
-# Check that the variable definition is not in MFLAGS
-.if ${MFLAGS:MCMD1=*} != "" || ${MFLAGS:MCMD2=*} != ""
-.error variable assignment found in $${MFLAGS}
-.endif
 .endif
 
 .if make(pass_cmd_vars_2)
@@ -228,7 +225,7 @@ pass_cmd_vars_4_1:
 #
 .if make(plus_flag)
 OUT != ${SMAKE} -n plus_flag_1
-.if ${OUT} != "/tmp"
+.if ${OUT:M/tmp} != "/tmp"
 .error make doesn't handle + flag
 .endif
 plus_flag:
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r222878 - head/gnu/usr.bin

2011-06-08 Thread David E. O'Brien
Author: obrien
Date: Wed Jun  8 21:29:33 2011
New Revision: 222878
URL: http://svn.freebsd.org/changeset/base/222878

Log:
  Simply post r73.

Modified:
  head/gnu/usr.bin/Makefile

Modified: head/gnu/usr.bin/Makefile
==
--- head/gnu/usr.bin/Makefile   Wed Jun  8 21:29:12 2011(r222877)
+++ head/gnu/usr.bin/Makefile   Wed Jun  8 21:29:33 2011(r222878)
@@ -11,7 +11,7 @@ SUBDIR= ${_binutils} \
${_dtc} \
${_gdb} \
${_gperf} \
-   ${_grep} \
+   grep \
${_groff} \
patch \
${_rcs} \
@@ -27,8 +27,6 @@ _groff=   groff
 .endif
 .endif
 
-_grep=  grep
-
 .if ${MK_CVS} != "no"
 _cvs=  cvs
 .endif
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r223088 - in head/sys: kern sys

2011-06-14 Thread David E. O'Brien
Author: obrien
Date: Tue Jun 14 17:09:30 2011
New Revision: 223088
URL: http://svn.freebsd.org/changeset/base/223088

Log:
  We should not return ECHILD when debugging a child and the parent does a
  "wait4(-1, ..., WNOHANG, ...)".  Instead wait(2) should behave as if the
  child does not wish to report status at this time.
  
  Reviewed by:  jhb

Modified:
  head/sys/kern/kern_exit.c
  head/sys/kern/sys_process.c
  head/sys/sys/proc.h

Modified: head/sys/kern/kern_exit.c
==
--- head/sys/kern/kern_exit.c   Tue Jun 14 16:50:29 2011(r223087)
+++ head/sys/kern/kern_exit.c   Tue Jun 14 17:09:30 2011(r223088)
@@ -701,8 +701,9 @@ proc_reap(struct thread *td, struct proc
 */
if (p->p_oppid && (t = pfind(p->p_oppid)) != NULL) {
PROC_LOCK(p);
-   p->p_oppid = 0;
proc_reparent(p, t);
+   p->p_pptr->p_dbg_child--;
+   p->p_oppid = 0;
PROC_UNLOCK(p);
pksignal(t, SIGCHLD, p->p_ksi);
wakeup(t);
@@ -794,7 +795,8 @@ kern_wait(struct thread *td, pid_t pid, 
pid = -q->p_pgid;
PROC_UNLOCK(q);
}
-   if (options &~ (WUNTRACED|WNOHANG|WCONTINUED|WNOWAIT|WLINUXCLONE))
+   /* If we don't know the option, just return. */
+   if (options & ~(WUNTRACED|WNOHANG|WCONTINUED|WNOWAIT|WLINUXCLONE))
return (EINVAL);
 loop:
if (q->p_flag & P_STATCHILD) {
@@ -873,7 +875,10 @@ loop:
}
if (nfound == 0) {
sx_xunlock(&proctree_lock);
-   return (ECHILD);
+   if (td->td_proc->p_dbg_child)
+   return (0);
+   else
+   return (ECHILD);
}
if (options & WNOHANG) {
sx_xunlock(&proctree_lock);

Modified: head/sys/kern/sys_process.c
==
--- head/sys/kern/sys_process.c Tue Jun 14 16:50:29 2011(r223087)
+++ head/sys/kern/sys_process.c Tue Jun 14 17:09:30 2011(r223088)
@@ -831,8 +831,11 @@ kern_ptrace(struct thread *td, int req, 
/* security check done above */
p->p_flag |= P_TRACED;
p->p_oppid = p->p_pptr->p_pid;
-   if (p->p_pptr != td->td_proc)
+   if (p->p_pptr != td->td_proc) {
+   /* Remember that a child is being debugged(traced). */
+   p->p_pptr->p_dbg_child++;
proc_reparent(p, td->td_proc);
+   }
data = SIGSTOP;
goto sendsig;   /* in PT_CONTINUE below */
 
@@ -919,11 +922,12 @@ kern_ptrace(struct thread *td, int req, 
PROC_UNLOCK(pp);
PROC_LOCK(p);
proc_reparent(p, pp);
+   p->p_pptr->p_dbg_child--;
if (pp == initproc)
p->p_sigparent = SIGCHLD;
}
-   p->p_flag &= ~(P_TRACED | P_WAITED | P_FOLLOWFORK);
p->p_oppid = 0;
+   p->p_flag &= ~(P_TRACED | P_WAITED | P_FOLLOWFORK);
 
/* should we send SIGCHLD? */
/* childproc_continued(p); */

Modified: head/sys/sys/proc.h
==
--- head/sys/sys/proc.h Tue Jun 14 16:50:29 2011(r223087)
+++ head/sys/sys/proc.h Tue Jun 14 17:09:30 2011(r223088)
@@ -503,6 +503,8 @@ struct proc {
 /* The following fields are all zeroed upon creation in fork. */
 #definep_startzero p_oppid
pid_t   p_oppid;/* (c + e) Save ppid in ptrace. XXX */
+   int p_dbg_child;/* (c + e) # of debugged children in
+   ptrace. */
struct vmspace  *p_vmspace; /* (b) Address space. */
u_int   p_swtick;   /* (c) Tick when swapped in or out. */
struct itimerval p_realtimer;   /* (c) Alarm timer. */
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r223212 - head/sys/kern

2011-06-17 Thread David E. O'Brien
Author: obrien
Date: Fri Jun 17 21:44:13 2011
New Revision: 223212
URL: http://svn.freebsd.org/changeset/base/223212

Log:
  Add comment from CSRG rev 7.27 (1992/06/23 19:56:55; author: mckusick)

Modified:
  head/sys/kern/sys_process.c

Modified: head/sys/kern/sys_process.c
==
--- head/sys/kern/sys_process.c Fri Jun 17 21:41:06 2011(r223211)
+++ head/sys/kern/sys_process.c Fri Jun 17 21:44:13 2011(r223212)
@@ -829,6 +829,15 @@ kern_ptrace(struct thread *td, int req, 
 
case PT_ATTACH:
/* security check done above */
+   /*
+* It would be nice if the tracing relationship was separate
+* from the parent relationship but that would require
+* another set of links in the proc struct or for "wait"
+* to scan the entire proc table.  To make life easier,
+* we just re-parent the process we're trying to trace.
+* The old parent is remembered so we can put things back
+* on a "detach".
+*/
p->p_flag |= P_TRACED;
p->p_oppid = p->p_pptr->p_pid;
if (p->p_pptr != td->td_proc) {
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r223217 - head/lib/libc/sys

2011-06-17 Thread David E. O'Brien
Author: obrien
Date: Sat Jun 18 00:53:51 2011
New Revision: 223217
URL: http://svn.freebsd.org/changeset/base/223217

Log:
  Note how wait(3) is implemented.

Modified:
  head/lib/libc/sys/wait.2

Modified: head/lib/libc/sys/wait.2
==
--- head/lib/libc/sys/wait.2Sat Jun 18 00:33:34 2011(r223216)
+++ head/lib/libc/sys/wait.2Sat Jun 18 00:53:51 2011(r223217)
@@ -66,6 +66,19 @@ the
 .Fa status
 area contains termination information about the process that exited
 as defined below.
+The
+.Fn wait
+call is the same as
+.Fn wait4
+with a
+.Fa wpid
+value of -1,
+with an
+.Fa options
+value of zero,
+and a
+.Fa rusage
+value of zero.
 .Pp
 The
 .Fn wait4
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r223849 - head/contrib/pf/man

2011-07-07 Thread David E. O'Brien
Author: obrien
Date: Thu Jul  7 23:17:56 2011
New Revision: 223849
URL: http://svn.freebsd.org/changeset/base/223849

Log:
  Note the PF version.
  
  Discussed with:   bz

Modified:
  head/contrib/pf/man/pf.4

Modified: head/contrib/pf/man/pf.4
==
--- head/contrib/pf/man/pf.4Thu Jul  7 22:30:12 2011(r223848)
+++ head/contrib/pf/man/pf.4Thu Jul  7 23:17:56 2011(r223849)
@@ -28,7 +28,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd September 10 2008
+.Dd June 28 2011
 .Dt PF 4
 .Os
 .Sh NAME
@@ -1146,4 +1146,9 @@ main(int argc, char *argv[])
 The
 .Nm
 packet filtering mechanism first appeared in
-.Ox 3.0 .
+.Ox 3.0
+and then
+.Fx 5.2 .
+.Pp
+This implementation matches
+.Ox 4.5 .
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r223940 - head/usr.bin/wall

2011-07-11 Thread David E. O'Brien
Author: obrien
Date: Tue Jul 12 00:31:11 2011
New Revision: 223940
URL: http://svn.freebsd.org/changeset/base/223940

Log:
  If one's message is longer than the buffer size, then we reset 'cnt' at the
  wrong point and the actual column # get out of sync across the buffer size.

Modified:
  head/usr.bin/wall/wall.c

Modified: head/usr.bin/wall/wall.c
==
--- head/usr.bin/wall/wall.cMon Jul 11 22:01:39 2011(r223939)
+++ head/usr.bin/wall/wall.cTue Jul 12 00:31:11 2011(r223940)
@@ -239,8 +239,9 @@ makemsg(char *fname)
err(1, "can't read %s", fname);
setegid(egid);
}
+   cnt = 0;
while (fgets(lbuf, sizeof(lbuf), stdin)) {
-   for (cnt = 0, p = lbuf; (ch = *p) != '\0'; ++p, ++cnt) {
+   for (p = lbuf; (ch = *p) != '\0'; ++p, ++cnt) {
if (ch == '\r') {
putc('\r', fp);
cnt = 0;
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r212374 - head/usr.bin/printf

2010-09-09 Thread David E. O'Brien
Author: obrien
Date: Thu Sep  9 19:27:40 2010
New Revision: 212374
URL: http://svn.freebsd.org/changeset/base/212374

Log:
  Note bug in trying to printf(1) things like: '-%s\n' "foo"

Modified:
  head/usr.bin/printf/printf.1

Modified: head/usr.bin/printf/printf.1
==
--- head/usr.bin/printf/printf.1Thu Sep  9 18:51:50 2010
(r212373)
+++ head/usr.bin/printf/printf.1Thu Sep  9 19:27:40 2010
(r212374)
@@ -355,3 +355,10 @@ Multibyte characters are not recognized 
 a problem if
 .Ql %
 can appear inside a multibyte character).
+.Pp
+Trying to print a dash ("-") as the first character causes
+.Nm
+to interpet the dash as a program argument.
+.Nm --
+must be used before 
+.Ar format .
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r212408 - head/sys/sys

2010-09-09 Thread David E. O'Brien
Author: obrien
Date: Fri Sep 10 06:26:28 2010
New Revision: 212408
URL: http://svn.freebsd.org/changeset/base/212408

Log:
  Protect BSDI $Id from accidental manipulation.

Modified:
  head/sys/sys/lock.h

Modified: head/sys/sys/lock.h
==
--- head/sys/sys/lock.h Fri Sep 10 04:44:13 2010(r212407)
+++ head/sys/sys/lock.h Fri Sep 10 06:26:28 2010(r212408)
@@ -25,7 +25,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * from BSDI $Id: mutex.h,v 2.7.2.35 2000/04/27 03:10:26 cp Exp $
+ * from BSDI Id: mutex.h,v 2.7.2.35 2000/04/27 03:10:26 cp
  * $FreeBSD$
  */
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r212429 - head/sys/conf

2010-09-10 Thread David E. O'Brien
Author: obrien
Date: Fri Sep 10 18:19:38 2010
New Revision: 212429
URL: http://svn.freebsd.org/changeset/base/212429

Log:
  Add real dependancies on the uuencoded firmwares.
  Now when one does 'make kernel ; make kernel' the second invocation
  only does:  `kernel.ko' is up to date.
  rather than reproduce all the .fw files and relink the kernel.

Modified:
  head/sys/conf/files

Modified: head/sys/conf/files
==
--- head/sys/conf/files Fri Sep 10 17:44:11 2010(r212428)
+++ head/sys/conf/files Fri Sep 10 18:19:38 2010(r212429)
@@ -1064,7 +1064,7 @@ ipw_bss.fwo   optional ipwbssfw | 
ipwfw   
no-implicit-rule\
clean   "ipw_bss.fwo"
 ipw_bss.fw optional ipwbssfw | ipwfw   \
-   dependency  ".PHONY"\
+   dependency  "$S/contrib/dev/ipw/ipw2100-1.3.fw.uu"  \
compile-with"uudecode -o ${.TARGET} 
$S/contrib/dev/ipw/ipw2100-1.3.fw.uu" \
no-obj no-implicit-rule \
clean   "ipw_bss.fw"
@@ -1078,7 +1078,7 @@ ipw_ibss.fwo  optional ipwibssfw | 
ipwf
no-implicit-rule\
clean   "ipw_ibss.fwo"
 ipw_ibss.fwoptional ipwibssfw | ipwfw  \
-   dependency  ".PHONY"\
+   dependency  "$S/contrib/dev/ipw/ipw2100-1.3-i.fw.uu"\
compile-with"uudecode -o ${.TARGET} 
$S/contrib/dev/ipw/ipw2100-1.3-i.fw.uu" \
no-obj no-implicit-rule \
clean   "ipw_ibss.fw"
@@ -1092,7 +1092,7 @@ ipw_monitor.fwo   optional ipwmonitorfw 
no-implicit-rule\
clean   "ipw_monitor.fwo"
 ipw_monitor.fw optional ipwmonitorfw | ipwfw   \
-   dependency  ".PHONY"\
+   dependency  "$S/contrib/dev/ipw/ipw2100-1.3-p.fw.uu"\
compile-with"uudecode -o ${.TARGET} 
$S/contrib/dev/ipw/ipw2100-1.3-p.fw.uu" \
no-obj no-implicit-rule \
clean   "ipw_monitor.fw"
@@ -1120,7 +1120,7 @@ iwi_bss.fwo   optional iwibssfw | 
iwifw   
no-implicit-rule\
clean   "iwi_bss.fwo"
 iwi_bss.fw optional iwibssfw | iwifw   \
-   dependency  ".PHONY"\
+   dependency  "$S/contrib/dev/iwi/ipw2200-bss.fw.uu"  \
compile-with"uudecode -o ${.TARGET} 
$S/contrib/dev/iwi/ipw2200-bss.fw.uu" \
no-obj no-implicit-rule \
clean   "iwi_bss.fw"
@@ -1134,7 +1134,7 @@ iwi_ibss.fwo  optional iwiibssfw | 
iwif
no-implicit-rule\
clean   "iwi_ibss.fwo"
 iwi_ibss.fwoptional iwiibssfw | iwifw  \
-   dependency  ".PHONY"\
+   dependency  "$S/contrib/dev/iwi/ipw2200-ibss.fw.uu" \
compile-with"uudecode -o ${.TARGET} 
$S/contrib/dev/iwi/ipw2200-ibss.fw.uu" \
no-obj no-implicit-rule \
clean   "iwi_ibss.fw"
@@ -1148,7 +1148,7 @@ iwi_monitor.fwo   optional iwimonitorfw 
no-implicit-rule\
clean   "iwi_monitor.fwo"
 iwi_monitor.fw optional iwimonitorfw | iwifw   \
-   dependency  ".PHONY"\
+   dependency  "$S/contrib/dev/iwi/ipw2200-sniffer.fw.uu"  \
compile-with"uudecode -o ${.TARGET} 
$S/contrib/dev/iwi/ipw2200-sniffer.fw.uu" \
no-obj no-implicit-rule \
clean   "iwi_monitor.fw"
@@ -1163,7 +1163,7 @@ iwn1000fw.fwo optional iwn1000fw | iwn
no-implicit-rule\
clean   "iwn1000fw.fwo"
 iwn1000.fw optional iwn1000fw | iwnfw  \
-   dependency  ".PHONY"\
+   dependency  "$S/contrib/dev/iwn/iwlwifi-1000-128.50.3.1.fw.uu" \
compile-with"uudecode -o ${.TARGET} 
$S/contrib/dev/iwn/iwlwifi-1000-128.50.3.1.fw.uu" \
no-obj no-implicit-rule \
clean   "iwn1000.fw"
@@ -

svn commit: r212770 - head/usr.bin/script

2010-09-16 Thread David E. O'Brien
Author: obrien
Date: Thu Sep 16 22:31:03 2010
New Revision: 212770
URL: http://svn.freebsd.org/changeset/base/212770

Log:
  + Add the SCRIPT environmental variable to the sub-shell.  Its value is
  the name of the typescript file.
  + Add the 'command' argument (if supplied on the command line) to the
  typescript file.  This creates a more complete typescript when invoked
  this way - more equal to invoking script without supplying the 'command'
  argument.

Modified:
  head/usr.bin/script/script.1
  head/usr.bin/script/script.c

Modified: head/usr.bin/script/script.1
==
--- head/usr.bin/script/script.1Thu Sep 16 22:11:55 2010
(r212769)
+++ head/usr.bin/script/script.1Thu Sep 16 22:31:03 2010
(r212770)
@@ -117,6 +117,19 @@ The results are meant to emulate a hardc
 The following environment variable is utilized by
 .Nm :
 .Bl -tag -width SHELL
+.It Ev SCRIPT
+The
+.Ev SCRIPT
+environment variable is added to the sub-shell.
+If
+.Ev SCRIPT
+already existed in the users environment,
+its value is overwritten within the sub-shell.
+The value of
+.Ev SCRIPT
+is the name of the
+.Ar typescript
+file.
 .It Ev SHELL
 If the variable
 .Ev SHELL

Modified: head/usr.bin/script/script.c
==
--- head/usr.bin/script/script.cThu Sep 16 22:11:55 2010
(r212769)
+++ head/usr.bin/script/script.cThu Sep 16 22:31:03 2010
(r212770)
@@ -235,14 +235,21 @@ static void
 doshell(char **av)
 {
const char *shell;
+   int k;
 
shell = getenv("SHELL");
if (shell == NULL)
shell = _PATH_BSHELL;
 
+   if (av[0])
+   for (k = 0 ; av[k] ; ++k)
+   fprintf(fscript, "%s%s", k ? " " : "", av[k]);
+   fprintf(fscript, "\r\n");
+
(void)close(master);
(void)fclose(fscript);
login_tty(slave);
+   setenv("SCRIPT", fname, 1);
if (av[0]) {
execvp(av[0], av);
warn("%s", av[0]);
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r212771 - head/usr.bin/ruptime

2010-09-16 Thread David E. O'Brien
Author: obrien
Date: Thu Sep 16 22:38:27 2010
New Revision: 212771
URL: http://svn.freebsd.org/changeset/base/212771

Log:
  Increase the hostname display width.  Many machines are named
  with >12 characters.  This still allows for 80 column output
  with load averages of 99.99, 99.99, 99.99.

Modified:
  head/usr.bin/ruptime/ruptime.c

Modified: head/usr.bin/ruptime/ruptime.c
==
--- head/usr.bin/ruptime/ruptime.c  Thu Sep 16 22:31:03 2010
(r212770)
+++ head/usr.bin/ruptime/ruptime.c  Thu Sep 16 22:38:27 2010
(r212771)
@@ -244,12 +244,12 @@ ruptime(const char *host, int aflg, int 
for (i = 0; i < (int)nhosts; i++) {
hsp = &hs[i];
if (ISDOWN(hsp)) {
-   (void)printf("%-12.12s%s\n", hsp->hs_wd->wd_hostname,
+   (void)printf("%-25.25s%s\n", hsp->hs_wd->wd_hostname,
interval(now - hsp->hs_wd->wd_recvtime, "down"));
continue;
}
(void)printf(
-   "%-12.12s%s,  %4d user%s  load %*.2f, %*.2f, %*.2f\n",
+   "%-25.25s%s,  %4d user%s  load %*.2f, %*.2f, %*.2f\n",
hsp->hs_wd->wd_hostname,
interval((time_t)hsp->hs_wd->wd_sendtime -
(time_t)hsp->hs_wd->wd_boottime, "  up"),
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r212788 - head/sys/ufs/ffs

2010-09-17 Thread David E. O'Brien
Author: obrien
Date: Fri Sep 17 09:14:40 2010
New Revision: 212788
URL: http://svn.freebsd.org/changeset/base/212788

Log:
  Correct some non-code typos.

Modified:
  head/sys/ufs/ffs/ffs_vfsops.c

Modified: head/sys/ufs/ffs/ffs_vfsops.c
==
--- head/sys/ufs/ffs/ffs_vfsops.c   Fri Sep 17 08:44:54 2010
(r212787)
+++ head/sys/ufs/ffs/ffs_vfsops.c   Fri Sep 17 09:14:40 2010
(r212788)
@@ -318,7 +318,7 @@ ffs_mount(struct mount *mp)
fs->fs_fsmnt);
if (fs->fs_flags & FS_SUJ)
printf(
-"WARNING: Forced mount will invalidated journal contents\n");
+"WARNING: Forced mount will invalidate journal contents\n");
return (EPERM);
}
}
@@ -362,7 +362,7 @@ ffs_mount(struct mount *mp)
 * Soft updates is incompatible with "async",
 * so if we are doing softupdates stop the user
 * from setting the async flag in an update.
-* Softdep_mount() clears it in an initial mount 
+* Softdep_mount() clears it in an initial mount
 * or ro->rw remount.
 */
if (mp->mnt_flag & MNT_SOFTDEP) {
@@ -387,7 +387,7 @@ ffs_mount(struct mount *mp)
mp->mnt_flag |= MNT_NFS4ACLS;
MNT_IUNLOCK(mp);
}
-   
+
/*
 * If this is a snapshot request, take the snapshot.
 */
@@ -720,8 +720,7 @@ ffs_mountfs(devvp, mp, td)
if (ronly || (mp->mnt_flag & MNT_FORCE) ||
((fs->fs_flags & (FS_SUJ | FS_NEEDSFSCK)) == 0 &&
 (fs->fs_flags & FS_DOSOFTDEP))) {
-   printf(
-"WARNING: %s was not properly dismounted\n",
+   printf("WARNING: %s was not properly dismounted\n",
fs->fs_fsmnt);
} else {
printf(
@@ -729,7 +728,7 @@ ffs_mountfs(devvp, mp, td)
fs->fs_fsmnt);
if (fs->fs_flags & FS_SUJ)
printf(
-"WARNING: Forced mount will invalidated journal contents\n");
+"WARNING: Forced mount will invalidate journal contents\n");
error = EPERM;
goto out;
}
@@ -840,7 +839,7 @@ ffs_mountfs(devvp, mp, td)
mp->mnt_stat.f_fsid.val[0] = fs->fs_id[0];
mp->mnt_stat.f_fsid.val[1] = fs->fs_id[1];
nmp = NULL;
-   if (fs->fs_id[0] == 0 || fs->fs_id[1] == 0 || 
+   if (fs->fs_id[0] == 0 || fs->fs_id[1] == 0 ||
(nmp = vfs_getvfs(&mp->mnt_stat.f_fsid))) {
if (nmp)
vfs_rel(nmp);
@@ -873,8 +872,7 @@ ffs_mountfs(devvp, mp, td)
 
MNT_IUNLOCK(mp);
 #else
-   printf(
-"WARNING: %s: ACLs flag on fs but no ACLs support\n",
+   printf("WARNING: %s: ACLs flag on fs but no ACLs support\n",
mp->mnt_stat.f_mntonname);
 #endif
}
@@ -1682,7 +1680,7 @@ ffs_sbupdate(mp, waitfor, suspended)
int i, size, error, allerror = 0;
 
if (fs->fs_ronly == 1 &&
-   (mp->um_mountp->mnt_flag & (MNT_RDONLY | MNT_UPDATE)) != 
+   (mp->um_mountp->mnt_flag & (MNT_RDONLY | MNT_UPDATE)) !=
(MNT_RDONLY | MNT_UPDATE))
panic("ffs_sbupdate: write read-only filesystem");
/*
@@ -1836,7 +1834,7 @@ ffs_backgroundwritedone(struct buf *bp)
  *
  * Note that we set B_CACHE here, indicating that buffer is
  * fully valid and thus cacheable.  This is true even of NFS
- * now so we set it generally.  This could be set either here 
+ * now so we set it generally.  This could be set either here
  * or in biodone() since the I/O is synchronous.  We put it
  * here.
  */
@@ -1885,7 +1883,7 @@ ffs_bufwrite(struct buf *bp)
 * This optimization eats a lot of memory.  If we have a page
 * or buffer shortfall we can't do it.
 */
-   if (dobkgrdwrite && (bp->b_xflags & BX_BKGRDWRITE) && 
+   if (dobkgrdwrite && (bp->b_xflags & BX_BKGRDWRITE) &&
(bp->b_flags & B_ASYNC) &&
!vm_page_count_severe() &&
!buf_dirty_count_severe()) {
@@ -1927,7 +1925,7 @@ ffs_bufwrite(struct buf *bp)
bundirty(bp);
 #else
bundirty(bp);
-#endif 
+#endif
 
/*
 * Initiate write on the copy, release the original to
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r212832 - head/usr.bin/script

2010-09-18 Thread David E. O'Brien
Author: obrien
Date: Sun Sep 19 00:36:26 2010
New Revision: 212832
URL: http://svn.freebsd.org/changeset/base/212832

Log:
  Fix the grammar after I added a second environmental variable.
  
  Submitted by: wxs

Modified:
  head/usr.bin/script/script.1

Modified: head/usr.bin/script/script.1
==
--- head/usr.bin/script/script.1Sat Sep 18 23:38:21 2010
(r212831)
+++ head/usr.bin/script/script.1Sun Sep 19 00:36:26 2010
(r212832)
@@ -114,7 +114,7 @@ The
 utility works best with commands that do not manipulate the screen.
 The results are meant to emulate a hardcopy terminal, not an addressable one.
 .Sh ENVIRONMENT
-The following environment variable is utilized by
+The following environment variables are utilized by
 .Nm :
 .Bl -tag -width SHELL
 .It Ev SCRIPT
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r213355 - head/contrib/bzip2

2010-10-02 Thread David E. O'Brien
Author: obrien
Date: Sat Oct  2 08:21:11 2010
New Revision: 213355
URL: http://svn.freebsd.org/changeset/base/213355

Log:
  Note that ^/vendor/bzip2/dist has been merged into HEAD upto r213348.

Modified:
Directory Properties:
  head/contrib/bzip2/   (props changed)
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r213713 - head/tools/regression/bin/sh/builtins

2010-10-11 Thread David E. O'Brien
Author: obrien
Date: Mon Oct 11 23:24:57 2010
New Revision: 213713
URL: http://svn.freebsd.org/changeset/base/213713

Log:
  Correct regression test to not show a false positive when run as root.

Modified:
  head/tools/regression/bin/sh/builtins/cd1.0

Modified: head/tools/regression/bin/sh/builtins/cd1.0
==
--- head/tools/regression/bin/sh/builtins/cd1.0 Mon Oct 11 23:15:18 2010
(r213712)
+++ head/tools/regression/bin/sh/builtins/cd1.0 Mon Oct 11 23:24:57 2010
(r213713)
@@ -6,12 +6,15 @@ cd $P
 T=$(mktemp -d sh-test.XX)
 
 chmod 0 $T
-cd -L $T 2>/dev/null && exit 1
-[ "$PWD" = "$P" ]
-[ "$(pwd)" = "$P" ]
-cd -P $T 2>/dev/null && exit 1
-[ "$PWD" = "$P" ]
-[ "$(pwd)" = "$P" ]
+if [ `id -u` -ne 0 ]; then
+   # Root can always cd, irregardless of directory permissions.
+   cd -L $T 2>/dev/null && exit 1
+   [ "$PWD" = "$P" ]
+   [ "$(pwd)" = "$P" ]
+   cd -P $T 2>/dev/null && exit 1
+   [ "$PWD" = "$P" ]
+   [ "$(pwd)" = "$P" ]
+fi
 
 chmod 755 $T
 cd $T
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r213738 - in head: bin/sh tools/regression/bin/sh tools/regression/bin/sh/builtins tools/regression/bin/sh/errors tools/regression/bin/sh/execution tools/regression/bin/sh/expansion too...

2010-10-12 Thread David E. O'Brien
Author: obrien
Date: Tue Oct 12 18:20:38 2010
New Revision: 213738
URL: http://svn.freebsd.org/changeset/base/213738

Log:
  Allow one to regression test 'sh' changes without having to install
  a potentially bad /bin/sh first.

Modified:
  head/bin/sh/Makefile
  head/tools/regression/bin/sh/Makefile
  head/tools/regression/bin/sh/builtins/command8.0
  head/tools/regression/bin/sh/builtins/exec1.0
  head/tools/regression/bin/sh/builtins/exec2.0
  head/tools/regression/bin/sh/builtins/fc1.0
  head/tools/regression/bin/sh/builtins/fc2.0
  head/tools/regression/bin/sh/builtins/trap1.0
  head/tools/regression/bin/sh/builtins/var-assign.0
  head/tools/regression/bin/sh/builtins/var-assign2.0
  head/tools/regression/bin/sh/errors/assignment-error1.0
  head/tools/regression/bin/sh/errors/backquote-error1.0
  head/tools/regression/bin/sh/errors/backquote-error2.0
  head/tools/regression/bin/sh/errors/option-error.0
  head/tools/regression/bin/sh/errors/redirection-error.0
  head/tools/regression/bin/sh/errors/redirection-error2.2
  head/tools/regression/bin/sh/errors/redirection-error3.0
  head/tools/regression/bin/sh/execution/fork1.0
  head/tools/regression/bin/sh/execution/fork2.0
  head/tools/regression/bin/sh/execution/func1.0
  head/tools/regression/bin/sh/execution/redir2.0
  head/tools/regression/bin/sh/expansion/question1.0
  head/tools/regression/bin/sh/expansion/set-u1.0
  head/tools/regression/bin/sh/parameters/mail1.0
  head/tools/regression/bin/sh/parameters/mail2.0
  head/tools/regression/bin/sh/parameters/pwd1.0
  head/tools/regression/bin/sh/parameters/pwd2.0
  head/tools/regression/bin/sh/regress.sh
  head/tools/regression/bin/sh/regress.t

Modified: head/bin/sh/Makefile
==
--- head/bin/sh/MakefileTue Oct 12 17:53:01 2010(r213737)
+++ head/bin/sh/MakefileTue Oct 12 18:20:38 2010(r213738)
@@ -62,4 +62,7 @@ syntax.c syntax.h: mksyntax
 token.h: mktokens
sh ${.CURDIR}/mktokens
 
+regress:
+   cd ${.CURDIR}/../../tools/regression/bin/sh && ${MAKE} SH=${.OBJDIR}/sh
+
 .include 

Modified: head/tools/regression/bin/sh/Makefile
==
--- head/tools/regression/bin/sh/Makefile   Tue Oct 12 17:53:01 2010
(r213737)
+++ head/tools/regression/bin/sh/Makefile   Tue Oct 12 18:20:38 2010
(r213738)
@@ -1,4 +1,7 @@
 # $FreeBSD$
 
+# Allow one to specify the 'sh' to regress.
+SH?=   /bin/sh
+
 all:
-   sh regress.sh
+   env SH=${SH} ${SH} regress.sh

Modified: head/tools/regression/bin/sh/builtins/command8.0
==
--- head/tools/regression/bin/sh/builtins/command8.0Tue Oct 12 17:53:01 
2010(r213737)
+++ head/tools/regression/bin/sh/builtins/command8.0Tue Oct 12 18:20:38 
2010(r213738)
@@ -22,7 +22,7 @@ set -e
 set -- ${SPECIAL}
 for cmd in "$@"
 do
-   sh -c "v=:; while \$v; do v=false; command ${cmd}; done" >/dev/null
+   ${SH} -c "v=:; while \$v; do v=false; command ${cmd}; done" >/dev/null
 done
 
 while :; do

Modified: head/tools/regression/bin/sh/builtins/exec1.0
==
--- head/tools/regression/bin/sh/builtins/exec1.0   Tue Oct 12 17:53:01 
2010(r213737)
+++ head/tools/regression/bin/sh/builtins/exec1.0   Tue Oct 12 18:20:38 
2010(r213738)
@@ -12,7 +12,7 @@ failure() {
 )
 [ $? = 0 ] || failure $LINENO
 (
-   exec sh -c 'exit 42'
+   exec ${SH} -c 'exit 42'
echo bad
 )
 [ $? = 42 ] || failure $LINENO

Modified: head/tools/regression/bin/sh/builtins/exec2.0
==
--- head/tools/regression/bin/sh/builtins/exec2.0   Tue Oct 12 17:53:01 
2010(r213737)
+++ head/tools/regression/bin/sh/builtins/exec2.0   Tue Oct 12 18:20:38 
2010(r213738)
@@ -12,7 +12,7 @@ failure() {
 )
 [ $? = 0 ] || failure $LINENO
 (
-   exec -- sh -c 'exit 42'
+   exec -- ${SH} -c 'exit 42'
echo bad
 )
 [ $? = 42 ] || failure $LINENO

Modified: head/tools/regression/bin/sh/builtins/fc1.0
==
--- head/tools/regression/bin/sh/builtins/fc1.0 Tue Oct 12 17:53:01 2010
(r213737)
+++ head/tools/regression/bin/sh/builtins/fc1.0 Tue Oct 12 18:20:38 2010
(r213738)
@@ -8,7 +8,7 @@ T=$(mktemp -d sh-test.XX)
 cd $T
 
 mkfifo input output error
-HISTFILE=/dev/null sh +m -i output 2>error &
+HISTFILE=/dev/null ${SH} +m -i output 2>error &
 {
# Syntax error
echo ')' >&3

Modified: head/tools/regression/bin/sh/builtins/fc2.0
==
--- head/tools/regression/bin/sh/builtins/fc2.0 Tue Oct 12 17:53:01 2010
(r213737)
+++ head/tools

svn commit: r213744 - head/bin/sh

2010-10-12 Thread David E. O'Brien
Author: obrien
Date: Tue Oct 12 19:24:41 2010
New Revision: 213744
URL: http://svn.freebsd.org/changeset/base/213744

Log:
  If DEBUG is 3 or greater, disable STATICization of functions.
  Also correct the documented location of the trace file.

Modified:
  head/bin/sh/Makefile
  head/bin/sh/shell.h
  head/bin/sh/show.c

Modified: head/bin/sh/Makefile
==
--- head/bin/sh/MakefileTue Oct 12 19:24:29 2010(r213743)
+++ head/bin/sh/MakefileTue Oct 12 19:24:41 2010(r213744)
@@ -21,7 +21,7 @@ LDADD= -ll -ledit -ltermcap
 LFLAGS= -8 # 8-bit lex scanner for arithmetic
 CFLAGS+=-DSHELL -I. -I${.CURDIR}
 # for debug:
-# CFLAGS+= -g -DDEBUG=2
+# CFLAGS+= -g -DDEBUG=3
 WARNS?=2
 WFORMAT=0
 

Modified: head/bin/sh/shell.h
==
--- head/bin/sh/shell.h Tue Oct 12 19:24:29 2010(r213743)
+++ head/bin/sh/shell.h Tue Oct 12 19:24:41 2010(r213744)
@@ -43,8 +43,9 @@
  * JOBS -> 1 if you have Berkeley job control, 0 otherwise.
  * define DEBUG=1 to compile in debugging (set global "debug" to turn on)
  * define DEBUG=2 to compile in and turn on debugging.
+ * define DEBUG=3 to also build all functions as public
  *
- * When debugging is on, debugging info will be written to $HOME/trace and
+ * When debugging is on, debugging info will be written to ./trace and
  * a quit signal will generate a core dump.
  */
 
@@ -61,7 +62,11 @@ typedef intmax_t arith_t;
 #definestrtoarith_t(nptr, endptr, base)  strtoimax(nptr, endptr, base)
 
 typedef void *pointer;
+#if DEBUG >= 3
+#define STATIC
+#else
 #define STATIC  static
+#endif
 #define MKINIT  /* empty */
 
 #include 

Modified: head/bin/sh/show.c
==
--- head/bin/sh/show.c  Tue Oct 12 19:24:29 2010(r213743)
+++ head/bin/sh/show.c  Tue Oct 12 19:24:41 2010(r213744)
@@ -274,7 +274,7 @@ indent(int amount, char *pfx, FILE *fp)
 
 FILE *tracefile;
 
-#if DEBUG == 2
+#if DEBUG >= 2
 int debug = 1;
 #else
 int debug = 0;
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r213760 - head/bin/sh

2010-10-12 Thread David E. O'Brien
Author: obrien
Date: Wed Oct 13 04:01:01 2010
New Revision: 213760
URL: http://svn.freebsd.org/changeset/base/213760

Log:
  Consistently use "STATIC" for all functions in order to be able to set
  breakpoints with in a debugger.  And use naked "static" for variables.
  
  Noticed by:   bde

Modified:
  head/bin/sh/alias.c
  head/bin/sh/cd.c
  head/bin/sh/error.c
  head/bin/sh/eval.c
  head/bin/sh/exec.c
  head/bin/sh/expand.c
  head/bin/sh/input.c
  head/bin/sh/jobs.c
  head/bin/sh/mail.c
  head/bin/sh/memalloc.c
  head/bin/sh/output.c
  head/bin/sh/parser.c
  head/bin/sh/redir.c
  head/bin/sh/shell.h
  head/bin/sh/show.c
  head/bin/sh/trap.c
  head/bin/sh/var.c

Modified: head/bin/sh/alias.c
==
--- head/bin/sh/alias.c Wed Oct 13 02:11:59 2010(r213759)
+++ head/bin/sh/alias.c Wed Oct 13 04:01:01 2010(r213760)
@@ -49,8 +49,8 @@ __FBSDID("$FreeBSD$");
 
 #define ATABSIZE 39
 
-STATIC struct alias *atab[ATABSIZE];
-STATIC int aliases;
+static struct alias *atab[ATABSIZE];
+static int aliases;
 
 STATIC void setalias(const char *, const char *);
 STATIC int unalias(const char *);
@@ -191,7 +191,7 @@ lookupalias(const char *name, int check)
return (NULL);
 }
 
-static int
+STATIC int
 comparealiases(const void *p1, const void *p2)
 {
const struct alias *const *a1 = p1;
@@ -200,7 +200,7 @@ comparealiases(const void *p1, const voi
return strcmp((*a1)->name, (*a2)->name);
 }
 
-static void
+STATIC void
 printalias(const struct alias *a)
 {
char *p;
@@ -214,7 +214,7 @@ printalias(const struct alias *a)
out1c('\n');
 }
 
-static void
+STATIC void
 printaliases(void)
 {
int i, j;

Modified: head/bin/sh/cd.c
==
--- head/bin/sh/cd.cWed Oct 13 02:11:59 2010(r213759)
+++ head/bin/sh/cd.cWed Oct 13 04:01:01 2010(r213760)
@@ -73,9 +73,9 @@ STATIC void updatepwd(char *);
 STATIC char *getpwd(void);
 STATIC char *getpwd2(void);
 
-STATIC char *curdir = NULL;/* current working directory */
-STATIC char *prevdir;  /* previous working directory */
-STATIC char *cdcomppath;
+static char *curdir = NULL;/* current working directory */
+static char *prevdir;  /* previous working directory */
+static char *cdcomppath;
 
 int
 cdcmd(int argc, char **argv)

Modified: head/bin/sh/error.c
==
--- head/bin/sh/error.c Wed Oct 13 02:11:59 2010(r213759)
+++ head/bin/sh/error.c Wed Oct 13 04:01:01 2010(r213760)
@@ -67,7 +67,7 @@ volatile sig_atomic_t intpending;
 char *commandname;
 
 
-static void exverror(int, const char *, va_list) __printf0like(2, 0) __dead2;
+STATIC void exverror(int, const char *, va_list) __printf0like(2, 0) __dead2;
 
 /*
  * Called to raise an exception.  Since C doesn't include exceptions, we
@@ -139,7 +139,7 @@ onint(void)
  * is not NULL then error prints an error message using printf style
  * formatting.  It then raises the error exception.
  */
-static void
+STATIC void
 exverror(int cond, const char *msg, va_list ap)
 {
/*

Modified: head/bin/sh/eval.c
==
--- head/bin/sh/eval.c  Wed Oct 13 02:11:59 2010(r213759)
+++ head/bin/sh/eval.c  Wed Oct 13 04:01:01 2010(r213760)
@@ -75,10 +75,10 @@ __FBSDID("$FreeBSD$");
 
 
 int evalskip;  /* set if we are skipping commands */
-STATIC int skipcount;  /* number of levels to skip */
+static int skipcount;  /* number of levels to skip */
 MKINIT int loopnest;   /* current loop nesting level */
 int funcnest;  /* depth of function calls */
-STATIC int builtin_flags;  /* evalcommand flags for builtins */
+static int builtin_flags;  /* evalcommand flags for builtins */
 
 
 char *commandname;

Modified: head/bin/sh/exec.c
==
--- head/bin/sh/exec.c  Wed Oct 13 02:11:59 2010(r213759)
+++ head/bin/sh/exec.c  Wed Oct 13 04:01:01 2010(r213760)
@@ -91,8 +91,8 @@ struct tblentry {
 };
 
 
-STATIC struct tblentry *cmdtable[CMDTABLESIZE];
-STATIC int builtinloc = -1;/* index in path of %builtin, or -1 */
+static struct tblentry *cmdtable[CMDTABLESIZE];
+static int builtinloc = -1;/* index in path of %builtin, or -1 */
 int exerrno = 0;   /* Last exec error */
 
 
@@ -615,7 +615,7 @@ deletefuncs(void)
  * entry.
  */
 
-STATIC struct tblentry **lastcmdentry;
+static struct tblentry **lastcmdentry;
 
 
 STATIC struct tblentry *

Modified: head/bin/sh/expand.c
==
--- head/bin/sh/expand.cWed Oct 13 02:11:59 2010(r213759)
+++ head/bin/sh/expand.c

svn commit: r213798 - head/bin/sh

2010-10-13 Thread David E. O'Brien
Author: obrien
Date: Wed Oct 13 18:23:43 2010
New Revision: 213798
URL: http://svn.freebsd.org/changeset/base/213798

Log:
  If one wishes to set breakpoints of static the functions here, they
  cannot be inlined.
  
  Submitted by: jhb

Modified:
  head/bin/sh/Makefile

Modified: head/bin/sh/Makefile
==
--- head/bin/sh/MakefileWed Oct 13 17:55:53 2010(r213797)
+++ head/bin/sh/MakefileWed Oct 13 18:23:43 2010(r213798)
@@ -21,7 +21,7 @@ LDADD= -ll -ledit -ltermcap
 LFLAGS= -8 # 8-bit lex scanner for arithmetic
 CFLAGS+=-DSHELL -I. -I${.CURDIR}
 # for debug:
-# DEBUG_FLAGS+= -g -DDEBUG=3
+# DEBUG_FLAGS+= -g -DDEBUG=3 -fno-inline
 WARNS?=2
 WFORMAT=0
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r213811 - head/bin/sh

2010-10-13 Thread David E. O'Brien
Author: obrien
Date: Wed Oct 13 22:18:03 2010
New Revision: 213811
URL: http://svn.freebsd.org/changeset/base/213811

Log:
  In the spirit of r90111, depend on c89 and remove the "STATIC" macro
  and its usage.

Modified:
  head/bin/sh/Makefile
  head/bin/sh/alias.c
  head/bin/sh/cd.c
  head/bin/sh/error.c
  head/bin/sh/eval.c
  head/bin/sh/exec.c
  head/bin/sh/expand.c
  head/bin/sh/histedit.c
  head/bin/sh/input.c
  head/bin/sh/jobs.c
  head/bin/sh/main.c
  head/bin/sh/memalloc.c
  head/bin/sh/nodes.c.pat
  head/bin/sh/options.c
  head/bin/sh/output.c
  head/bin/sh/parser.c
  head/bin/sh/redir.c
  head/bin/sh/shell.h
  head/bin/sh/show.c
  head/bin/sh/trap.c
  head/bin/sh/var.c

Modified: head/bin/sh/Makefile
==
--- head/bin/sh/MakefileWed Oct 13 22:07:57 2010(r213810)
+++ head/bin/sh/MakefileWed Oct 13 22:18:03 2010(r213811)
@@ -21,7 +21,7 @@ LDADD= -ll -ledit -ltermcap
 LFLAGS= -8 # 8-bit lex scanner for arithmetic
 CFLAGS+=-DSHELL -I. -I${.CURDIR}
 # for debug:
-# DEBUG_FLAGS+= -g -DDEBUG=3 -fno-inline
+# DEBUG_FLAGS+= -g -DDEBUG=2 -fno-inline
 WARNS?=2
 WFORMAT=0
 

Modified: head/bin/sh/alias.c
==
--- head/bin/sh/alias.c Wed Oct 13 22:07:57 2010(r213810)
+++ head/bin/sh/alias.c Wed Oct 13 22:18:03 2010(r213811)
@@ -52,11 +52,11 @@ __FBSDID("$FreeBSD$");
 static struct alias *atab[ATABSIZE];
 static int aliases;
 
-STATIC void setalias(const char *, const char *);
-STATIC int unalias(const char *);
-STATIC struct alias **hashalias(const char *);
+static void setalias(const char *, const char *);
+static int unalias(const char *);
+static struct alias **hashalias(const char *);
 
-STATIC
+static
 void
 setalias(const char *name, const char *val)
 {
@@ -111,7 +111,7 @@ setalias(const char *name, const char *v
INTON;
 }
 
-STATIC int
+static int
 unalias(const char *name)
 {
struct alias *ap, **app;
@@ -191,7 +191,7 @@ lookupalias(const char *name, int check)
return (NULL);
 }
 
-STATIC int
+static int
 comparealiases(const void *p1, const void *p2)
 {
const struct alias *const *a1 = p1;
@@ -200,7 +200,7 @@ comparealiases(const void *p1, const voi
return strcmp((*a1)->name, (*a2)->name);
 }
 
-STATIC void
+static void
 printalias(const struct alias *a)
 {
char *p;
@@ -214,7 +214,7 @@ printalias(const struct alias *a)
out1c('\n');
 }
 
-STATIC void
+static void
 printaliases(void)
 {
int i, j;
@@ -276,7 +276,7 @@ unaliascmd(int argc __unused, char **arg
return (i);
 }
 
-STATIC struct alias **
+static struct alias **
 hashalias(const char *p)
 {
unsigned int hashval;

Modified: head/bin/sh/cd.c
==
--- head/bin/sh/cd.cWed Oct 13 22:07:57 2010(r213810)
+++ head/bin/sh/cd.cWed Oct 13 22:18:03 2010(r213811)
@@ -64,14 +64,14 @@ __FBSDID("$FreeBSD$");
 #include "show.h"
 #include "cd.h"
 
-STATIC int cdlogical(char *);
-STATIC int cdphysical(char *);
-STATIC int docd(char *, int, int);
-STATIC char *getcomponent(void);
-STATIC char *findcwd(char *);
-STATIC void updatepwd(char *);
-STATIC char *getpwd(void);
-STATIC char *getpwd2(void);
+static int cdlogical(char *);
+static int cdphysical(char *);
+static int docd(char *, int, int);
+static char *getcomponent(void);
+static char *findcwd(char *);
+static void updatepwd(char *);
+static char *getpwd(void);
+static char *getpwd2(void);
 
 static char *curdir = NULL;/* current working directory */
 static char *prevdir;  /* previous working directory */
@@ -145,7 +145,7 @@ cdcmd(int argc, char **argv)
  * Actually change the directory.  In an interactive shell, print the
  * directory name if "print" is nonzero.
  */
-STATIC int
+static int
 docd(char *dest, int print, int phys)
 {
 
@@ -161,7 +161,7 @@ docd(char *dest, int print, int phys)
return 0;
 }
 
-STATIC int
+static int
 cdlogical(char *dest)
 {
char *p;
@@ -213,7 +213,7 @@ cdlogical(char *dest)
return (0);
 }
 
-STATIC int
+static int
 cdphysical(char *dest)
 {
char *p;
@@ -232,7 +232,7 @@ cdphysical(char *dest)
  * Get the next component of the path name pointed to by cdcomppath.
  * This routine overwrites the string pointed to by cdcomppath.
  */
-STATIC char *
+static char *
 getcomponent(void)
 {
char *p;
@@ -253,7 +253,7 @@ getcomponent(void)
 }
 
 
-STATIC char *
+static char *
 findcwd(char *dir)
 {
char *new;
@@ -296,7 +296,7 @@ findcwd(char *dir)
  * cd command.  We also call hashcd to let the routines in exec.c know
  * that the current directory has changed.
  */
-STATIC void
+static void
 updatepwd(char *dir)
 {
hashcd();   /* update command hash table */
@@ -352,7 +352,7 @@ pwdcmd(int argc, char **argv)
 /*
  

svn commit: r213814 - in head: bin/sh tools/regression/bin/sh/expansion

2010-10-13 Thread David E. O'Brien
Author: obrien
Date: Wed Oct 13 23:29:09 2010
New Revision: 213814
URL: http://svn.freebsd.org/changeset/base/213814

Log:
  Do not assume in growstackstr() that a "precious" character will be
  immediately written into the stack after the call.  Instead let the caller
  manage the "space left".
  
  Previously, growstackstr()'s assumption causes problems with STACKSTRNUL()
  where we want to be able to turn a stack into a C string, and later
  pretend the NUL is not there.
  
  This fixes a bug in STACKSTRNUL() (that grew the stack) where:
  1. STADJUST() called after a STACKSTRNUL() results in an improper adjust.
 This can be seen in ${var%pattern} and ${var%%pattern} evaluation.
  2. Memory leak in STPUTC() called after a STACKSTRNUL().
  
  Reviewed by:  jilles

Added:
  head/tools/regression/bin/sh/expansion/trim4.0   (contents, props changed)
Modified:
  head/bin/sh/histedit.c
  head/bin/sh/memalloc.c
  head/bin/sh/memalloc.h

Modified: head/bin/sh/histedit.c
==
--- head/bin/sh/histedit.c  Wed Oct 13 22:59:04 2010(r213813)
+++ head/bin/sh/histedit.c  Wed Oct 13 23:29:09 2010(r213814)
@@ -418,7 +418,7 @@ fc_replace(const char *s, char *p, char 
} else
STPUTC(*s++, dest);
}
-   STACKSTRNUL(dest);
+   STPUTC('\0', dest);
dest = grabstackstr(dest);
 
return (dest);

Modified: head/bin/sh/memalloc.c
==
--- head/bin/sh/memalloc.c  Wed Oct 13 22:59:04 2010(r213813)
+++ head/bin/sh/memalloc.c  Wed Oct 13 23:29:09 2010(r213814)
@@ -295,6 +295,13 @@ grabstackblock(int len)
  * is space for at least one character.
  */
 
+static char *
+growstrstackblock(int n)
+{
+   growstackblock();
+   sstrnleft = stackblocksize() - n;
+   return stackblock() + n;
+}
 
 char *
 growstackstr(void)
@@ -304,12 +311,10 @@ growstackstr(void)
len = stackblocksize();
if (herefd >= 0 && len >= 1024) {
xwrite(herefd, stackblock(), len);
-   sstrnleft = len - 1;
+   sstrnleft = len;
return stackblock();
}
-   growstackblock();
-   sstrnleft = stackblocksize() - len - 1;
-   return stackblock() + len;
+   return growstrstackblock(len);
 }
 
 
@@ -323,9 +328,7 @@ makestrspace(void)
int len;
 
len = stackblocksize() - sstrnleft;
-   growstackblock();
-   sstrnleft = stackblocksize() - len;
-   return stackblock() + len;
+   return growstrstackblock(len);
 }
 
 

Modified: head/bin/sh/memalloc.h
==
--- head/bin/sh/memalloc.h  Wed Oct 13 22:59:04 2010(r213813)
+++ head/bin/sh/memalloc.h  Wed Oct 13 23:29:09 2010(r213814)
@@ -67,9 +67,16 @@ void ungrabstackstr(char *, char *);
 #define stackblock() stacknxt
 #define stackblocksize() stacknleft
 #define STARTSTACKSTR(p)   p = stackblock(), sstrnleft = stackblocksize()
-#define STPUTC(c, p)   (--sstrnleft >= 0? (*p++ = (c)) : (p = growstackstr(), 
*p++ = (c)))
+#define STPUTC(c, p)   (--sstrnleft >= 0? (*p++ = (c)) : (p = growstackstr(), 
--sstrnleft, *p++ = (c)))
 #define CHECKSTRSPACE(n, p){ if (sstrnleft < n) p = makestrspace(); }
 #define USTPUTC(c, p)  (--sstrnleft, *p++ = (c))
+/*
+ * STACKSTRNUL's use is where we want to be able to turn a stack
+ * (non-sentinel, character counting string) into a C string,
+ * and later pretend the NUL is not there.
+ * Note: Because of STACKSTRNUL's semantics, STACKSTRNUL cannot be used
+ * on a stack that will grabstackstr()ed.
+ */
 #define STACKSTRNUL(p) (sstrnleft == 0? (p = growstackstr(), *p = '\0') : (*p 
= '\0'))
 #define STUNPUTC(p)(++sstrnleft, --p)
 #define STTOPC(p)  p[-1]

Added: head/tools/regression/bin/sh/expansion/trim4.0
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/tools/regression/bin/sh/expansion/trim4.0  Wed Oct 13 23:29:09 
2010(r213814)
@@ -0,0 +1,15 @@
+# $FreeBSD$
+
+v1=/homes/SOME_USER
+v2=
+v3=C123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
+
+# Trigger bug in VSTRIMRIGHT processing STADJUST() call in 
expand.c:subevalvar()
+while [ ${#v2} -lt 2000 ]; do
+   v4="${v2} ${v1%/*} $v3"
+   if [ ${#v4} -ne $((${#v2} + ${#v3} + 8)) ]; then
+   echo bad: ${#v4} -ne $((${#v2} + ${#v3} + 8))
+   fi
+   v2=x$v2
+   v3=y$v3
+done
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r213815 - head/bin/sh

2010-10-13 Thread David E. O'Brien
Author: obrien
Date: Wed Oct 13 23:31:17 2010
New Revision: 213815
URL: http://svn.freebsd.org/changeset/base/213815

Log:
  We only need to look as far as '..' to find 'test/'.

Modified:
  head/bin/sh/Makefile

Modified: head/bin/sh/Makefile
==
--- head/bin/sh/MakefileWed Oct 13 23:29:09 2010(r213814)
+++ head/bin/sh/MakefileWed Oct 13 23:31:17 2010(r213815)
@@ -26,7 +26,7 @@ WARNS?=   2
 WFORMAT=0
 
 .PATH: ${.CURDIR}/bltin \
-   ${.CURDIR}/../../bin/test
+   ${.CURDIR}/../test
 
 CLEANFILES+= mkinit mkinit.o mknodes mknodes.o \
mksyntax mksyntax.o
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r213883 - head/tools/regression/bin/sh/builtins

2010-10-14 Thread David E. O'Brien
Author: obrien
Date: Thu Oct 14 23:28:31 2010
New Revision: 213883
URL: http://svn.freebsd.org/changeset/base/213883

Log:
  Embellish this testcase a little bit to be more clear what the output is
  and why.  The first case is correct usage which has but one correct output.
  The 2nd and 3rd cases are incorrect usage in which the exact output is
  not standardized and various shells give various allowable output.

Modified:
  head/tools/regression/bin/sh/builtins/getopts1.0
  head/tools/regression/bin/sh/builtins/getopts1.0.stdout

Modified: head/tools/regression/bin/sh/builtins/getopts1.0
==
--- head/tools/regression/bin/sh/builtins/getopts1.0Thu Oct 14 23:26:08 
2010(r213882)
+++ head/tools/regression/bin/sh/builtins/getopts1.0Thu Oct 14 23:28:31 
2010(r213883)
@@ -1,12 +1,25 @@
 # $FreeBSD$
+
+echo '-1-'
 set -- -abc
 getopts "ab:" OPTION
 echo ${OPTION}
 
+# In this case 'getopts' should realize that we have not provided the
+# required argument for "-b".
+# Note that Solaris 10's (UNIX 03) /usr/xpg4/bin/sh, /bin/sh, and /bin/ksh;
+# ksh93 20090505; pdksh 5.2.14p2; mksh R39c; bash 4.1 PL7; and zsh 4.3.10.
+# all recognize that "b" is missing its argument on the *first* iteration
+# of 'getopts' and do not produce the "a" in $OPTION.
+echo '-2-'
 set -- -ab
 getopts "ab:" OPTION
 echo ${OPTION}
+getopts "ab:" OPTION
+echo ${OPTION}
 
+# The 'shift' is aimed at causing an error.
+echo '-3-'
 shift 1
 getopts "ab:" OPTION
 echo ${OPTION}

Modified: head/tools/regression/bin/sh/builtins/getopts1.0.stdout
==
--- head/tools/regression/bin/sh/builtins/getopts1.0.stdout Thu Oct 14 
23:26:08 2010(r213882)
+++ head/tools/regression/bin/sh/builtins/getopts1.0.stdout Thu Oct 14 
23:28:31 2010(r213883)
@@ -1,3 +1,8 @@
+-1-
 a
+-2-
 a
+No arg for -b option
+?
+-3-
 ?
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r214654 - head/usr.sbin/config

2010-11-01 Thread David E. O'Brien
Author: obrien
Date: Tue Nov  2 05:27:05 2010
New Revision: 214654
URL: http://svn.freebsd.org/changeset/base/214654

Log:
  Give the user a hint as to what config(8) is unhappy with.

Modified:
  head/usr.sbin/config/mkmakefile.c

Modified: head/usr.sbin/config/mkmakefile.c
==
--- head/usr.sbin/config/mkmakefile.c   Tue Nov  2 02:13:13 2010
(r214653)
+++ head/usr.sbin/config/mkmakefile.c   Tue Nov  2 05:27:05 2010
(r214654)
@@ -382,8 +382,8 @@ next:
mandatory = 1;
} else if (!eq(wd, "optional")) {
fprintf(stderr,
-   "%s: %s must be optional, mandatory or standard\n",
-   fname, this);
+   "%s: \"%s\" %s must be optional, mandatory or standard\n",
+   fname, wd, this);
exit(1);
}
 nextparam:
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r214655 - head/sys/conf

2010-11-01 Thread David E. O'Brien
Author: obrien
Date: Tue Nov  2 05:39:57 2010
New Revision: 214655
URL: http://svn.freebsd.org/changeset/base/214655

Log:
  Shorten long lines.

Modified:
  head/sys/conf/files

Modified: head/sys/conf/files
==
--- head/sys/conf/files Tue Nov  2 05:27:05 2010(r214654)
+++ head/sys/conf/files Tue Nov  2 05:39:57 2010(r214655)
@@ -67,12 +67,12 @@ fdt_static_dtb.hoptional fdt fdt_dtb_s
compile-with "sh $S/tools/fdt/make_dtbh.sh ${FDT_DTS_FILE} ." \
no-obj no-implicit-rule before-depend \
clean   "fdt_static_dtb.h"
-p16v-alsa%diked.h  optional snd_emu10kx pci
   \
+p16v-alsa%diked.h  optional snd_emu10kx pci   \
dependency  "$S/tools/sound/emu10k1-mkalsa.sh 
$S/gnu/dev/sound/pci/p16v-alsa.h" \
compile-with"CC='${CC}' AWK=${AWK} sh 
$S/tools/sound/emu10k1-mkalsa.sh $S/gnu/dev/sound/pci/p16v-alsa.h 
p16v-alsa%diked.h" \
no-obj no-implicit-rule before-depend  \
clean   "p16v-alsa%diked.h"
-p17v-alsa%diked.h  optional snd_emu10kx pci
   \
+p17v-alsa%diked.h  optional snd_emu10kx pci   \
dependency  "$S/tools/sound/emu10k1-mkalsa.sh 
$S/gnu/dev/sound/pci/p17v-alsa.h" \
compile-with"CC='${CC}' AWK=${AWK} sh 
$S/tools/sound/emu10k1-mkalsa.sh $S/gnu/dev/sound/pci/p17v-alsa.h 
p17v-alsa%diked.h" \
no-obj no-implicit-rule before-depend  \
@@ -83,12 +83,12 @@ feeder_eq_gen.h optional sound  
   \
no-obj no-implicit-rule before-depend  \
clean   "feeder_eq_gen.h"
 feeder_rate_gen.h  optional sound \
-   dependency  "$S/tools/sound/feeder_rate_mkfilter.awk"   
   \
+   dependency  "$S/tools/sound/feeder_rate_mkfilter.awk"  \
compile-with"${AWK} -f $S/tools/sound/feeder_rate_mkfilter.awk -- 
${FEEDER_RATE_PRESETS} > feeder_rate_gen.h" \
no-obj no-implicit-rule before-depend  \
clean   "feeder_rate_gen.h"
 snd_fxdiv_gen.hoptional sound  
   \
-   dependency  "$S/tools/sound/snd_fxdiv_gen.awk"  
   \
+   dependency  "$S/tools/sound/snd_fxdiv_gen.awk" \
compile-with"${AWK} -f $S/tools/sound/snd_fxdiv_gen.awk -- > 
snd_fxdiv_gen.h" \
no-obj no-implicit-rule before-depend  \
clean   "snd_fxdiv_gen.h"
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r214959 - head/usr.bin/yacc

2010-11-07 Thread David E. O'Brien
Author: obrien
Date: Sun Nov  7 22:51:54 2010
New Revision: 214959
URL: http://svn.freebsd.org/changeset/base/214959

Log:
  Change to ANSI-C function definitions.

Modified:
  head/usr.bin/yacc/Makefile
  head/usr.bin/yacc/closure.c
  head/usr.bin/yacc/error.c
  head/usr.bin/yacc/lalr.c
  head/usr.bin/yacc/lr0.c
  head/usr.bin/yacc/main.c
  head/usr.bin/yacc/mkpar.c
  head/usr.bin/yacc/output.c
  head/usr.bin/yacc/reader.c
  head/usr.bin/yacc/skeleton.c
  head/usr.bin/yacc/symtab.c
  head/usr.bin/yacc/verbose.c
  head/usr.bin/yacc/warshall.c

Modified: head/usr.bin/yacc/Makefile
==
--- head/usr.bin/yacc/Makefile  Sun Nov  7 22:33:55 2010(r214958)
+++ head/usr.bin/yacc/Makefile  Sun Nov  7 22:51:54 2010(r214959)
@@ -9,6 +9,6 @@ MAN=yacc.1 yyfix.1
 LINKS= ${BINDIR}/yacc ${BINDIR}/byacc
 MLINKS=yacc.1 byacc.1
 
-WARNS?=2
+WARNS?=6
 
 .include 

Modified: head/usr.bin/yacc/closure.c
==
--- head/usr.bin/yacc/closure.c Sun Nov  7 22:33:55 2010(r214958)
+++ head/usr.bin/yacc/closure.c Sun Nov  7 22:51:54 2010(r214959)
@@ -62,7 +62,7 @@ static unsigned *EFF;
 
 
 static void
-set_EFF()
+set_EFF(void)
 {
 unsigned *row;
 int symbol;
@@ -99,7 +99,7 @@ set_EFF()
 
 
 void
-set_first_derives()
+set_first_derives(void)
 {
 unsigned *rrow;
 unsigned *vrow;
@@ -154,9 +154,7 @@ set_first_derives()
 
 
 void
-closure(nucleus, n)
-short *nucleus;
-int n;
+closure(short *nucleus, int n)
 {
 int ruleno;
 unsigned word;
@@ -224,7 +222,7 @@ int n;
 
 
 void
-finalize_closure()
+finalize_closure(void)
 {
   FREE(itemset);
   FREE(ruleset);
@@ -235,8 +233,7 @@ finalize_closure()
 #ifdef DEBUG
 
 static void
-print_closure(n)
-int n;
+print_closure(int n)
 {
   short *isp;
 
@@ -247,7 +244,7 @@ int n;
 
 
 static void
-print_EFF()
+print_EFF(void)
 {
 int i, j;
 unsigned *rowp;
@@ -279,7 +276,7 @@ print_EFF()
 
 
 static void
-print_first_derives()
+print_first_derives(void)
 {
 int i;
 int j;

Modified: head/usr.bin/yacc/error.c
==
--- head/usr.bin/yacc/error.c   Sun Nov  7 22:33:55 2010(r214958)
+++ head/usr.bin/yacc/error.c   Sun Nov  7 22:51:54 2010(r214959)
@@ -49,8 +49,7 @@ __FBSDID("$FreeBSD$");
 static void print_pos(char *, char *);
 
 void
-fatal(msg)
-const char *msg;
+fatal(const char *msg)
 {
 warnx("f - %s", msg);
 done(2);
@@ -58,7 +57,7 @@ const char *msg;
 
 
 void
-no_space()
+no_space(void)
 {
 warnx("f - out of space");
 done(2);
@@ -66,8 +65,7 @@ no_space()
 
 
 void
-open_error(filename)
-const char *filename;
+open_error(const char *filename)
 {
 warnx("f - cannot open \"%s\"", filename);
 done(2);
@@ -75,7 +73,7 @@ const char *filename;
 
 
 void
-unexpected_EOF()
+unexpected_EOF(void)
 {
 warnx("e - line %d of \"%s\", unexpected end-of-file",
lineno, input_file_name);
@@ -84,9 +82,7 @@ unexpected_EOF()
 
 
 static void
-print_pos(st_line, st_cptr)
-char *st_line;
-char *st_cptr;
+print_pos(char *st_line, char *st_cptr)
 {
 char *s;
 
@@ -112,10 +108,7 @@ char *st_cptr;
 
 
 void
-syntax_error(st_lineno, st_line, st_cptr)
-int st_lineno;
-char *st_line;
-char *st_cptr;
+syntax_error(int st_lineno, char *st_line, char *st_cptr)
 {
 warnx("e - line %d of \"%s\", syntax error",
st_lineno, input_file_name);
@@ -125,10 +118,7 @@ char *st_cptr;
 
 
 void
-unterminated_comment(c_lineno, c_line, c_cptr)
-int c_lineno;
-char *c_line;
-char *c_cptr;
+unterminated_comment(int c_lineno, char *c_line, char *c_cptr)
 {
 warnx("e - line %d of \"%s\", unmatched /*",
c_lineno, input_file_name);
@@ -138,10 +128,7 @@ char *c_cptr;
 
 
 void
-unterminated_string(s_lineno, s_line, s_cptr)
-int s_lineno;
-char *s_line;
-char *s_cptr;
+unterminated_string(int s_lineno, char *s_line, char *s_cptr)
 {
 warnx("e - line %d of \"%s\", unterminated string",
s_lineno, input_file_name);
@@ -151,10 +138,7 @@ char *s_cptr;
 
 
 void
-unterminated_text(t_lineno, t_line, t_cptr)
-int t_lineno;
-char *t_line;
-char *t_cptr;
+unterminated_text(int t_lineno, char *t_line, char *t_cptr)
 {
 warnx("e - line %d of \"%s\", unmatched %%{",
t_lineno, input_file_name);
@@ -164,10 +148,7 @@ char *t_cptr;
 
 
 void
-unterminated_union(u_lineno, u_line, u_cptr)
-int u_lineno;
-char *u_line;
-char *u_cptr;
+unterminated_union(int u_lineno, char *u_line, char *u_cptr)
 {
 warnx("e - line %d of \"%s\", unterminated %%union declaration",
u_lineno, input_file_name);
@@ -177,8 +158,7 @@ char *u_cptr;
 
 
 void
-over_unionized(u_cptr)
-char *u_cptr;
+over_unionized(char *u_cptr)
 {
 warnx("e - line %d of \"%s\", too many %%union declarations",
lineno, input_file_name);
@@ -188,

svn commit: r214961 - head/usr.bin/yacc

2010-11-07 Thread David E. O'Brien
Author: obrien
Date: Sun Nov  7 23:22:42 2010
New Revision: 214961
URL: http://svn.freebsd.org/changeset/base/214961

Log:
  Directly use memory allocation functions and remove needless casts in
  their usage.  Also use associated modern types instead of k&r ones.

Modified:
  head/usr.bin/yacc/closure.c
  head/usr.bin/yacc/defs.h
  head/usr.bin/yacc/lalr.c
  head/usr.bin/yacc/lr0.c
  head/usr.bin/yacc/main.c
  head/usr.bin/yacc/mkpar.c
  head/usr.bin/yacc/output.c
  head/usr.bin/yacc/reader.c
  head/usr.bin/yacc/skeleton.c
  head/usr.bin/yacc/symtab.c
  head/usr.bin/yacc/verbose.c

Modified: head/usr.bin/yacc/closure.c
==
--- head/usr.bin/yacc/closure.c Sun Nov  7 23:22:22 2010(r214960)
+++ head/usr.bin/yacc/closure.c Sun Nov  7 23:22:42 2010(r214961)
@@ -149,7 +149,7 @@ set_first_derives(void)
 print_first_derives();
 #endif
 
-FREE(EFF);
+free(EFF);
 }
 
 
@@ -224,9 +224,9 @@ closure(short *nucleus, int n)
 void
 finalize_closure(void)
 {
-  FREE(itemset);
-  FREE(ruleset);
-  FREE(first_derives + ntokens * WORDSIZE(nrules));
+  free(itemset);
+  free(ruleset);
+  free(first_derives + ntokens * WORDSIZE(nrules));
 }
 
 

Modified: head/usr.bin/yacc/defs.h
==
--- head/usr.bin/yacc/defs.hSun Nov  7 23:22:22 2010(r214960)
+++ head/usr.bin/yacc/defs.hSun Nov  7 23:22:42 2010(r214961)
@@ -133,12 +133,8 @@
 
 /*  storage allocation macros  */
 
-#define CALLOC(k,n)(calloc((unsigned)(k),(unsigned)(n)))
-#defineFREE(x) (free((char*)(x)))
-#define MALLOC(n)  (malloc((unsigned)(n)))
 #defineNEW(t)  ((t*)allocate(sizeof(t)))
-#defineNEW2(n,t)   ((t*)allocate((unsigned)((n)*sizeof(t
-#define REALLOC(p,n)   (realloc((char*)(p),(unsigned)(n)))
+#defineNEW2(n,t)   ((t*)allocate((n)*sizeof(t)))
 
 
 /*  the structure of a symbol table entry  */
@@ -304,7 +300,7 @@ extern short final_state;
 
 /* global functions */
 
-char *allocate(unsigned);
+void *allocate(size_t);
 void closure(short *, int);
 void create_symbol_table(void);
 void default_action_warning(void);

Modified: head/usr.bin/yacc/lalr.c
==
--- head/usr.bin/yacc/lalr.cSun Nov  7 23:22:22 2010(r214960)
+++ head/usr.bin/yacc/lalr.cSun Nov  7 23:22:42 2010(r214961)
@@ -293,7 +293,7 @@ set_goto_map(void)
}
 }
 
-  FREE(temp_map + ntokens);
+  free(temp_map + ntokens);
 }
 
 
@@ -396,11 +396,11 @@ initialize_F(void)
   for (i = 0; i < ngotos; i++)
 {
   if (reads[i])
-   FREE(reads[i]);
+   free(reads[i]);
 }
 
-  FREE(reads);
-  FREE(edge);
+  free(reads);
+  free(edge);
 }
 
 
@@ -487,14 +487,14 @@ build_relations(void)
 
   for (i = 0; i < ngotos; i++)
 if (includes[i])
-  FREE(includes[i]);
+  free(includes[i]);
 
-  FREE(includes);
+  free(includes);
 
   includes = new_includes;
 
-  FREE(edge);
-  FREE(states);
+  free(edge);
+  free(states);
 }
 
 
@@ -562,7 +562,7 @@ transpose(short **R, int n)
}
 }
 
-  FREE(nedges);
+  free(nedges);
 
   for (i = 0; i < n; i++)
 {
@@ -574,7 +574,7 @@ transpose(short **R, int n)
}
 }
 
-  FREE(temp_R);
+  free(temp_R);
 
   return (new_R);
 }
@@ -615,11 +615,11 @@ compute_lookaheads(void)
 for (sp = lookback[i]; sp; sp = next)
   {
 next = sp->next;
-FREE(sp);
+free(sp);
   }
 
-  FREE(lookback);
-  FREE(F);
+  free(lookback);
+  free(F);
 }
 
 
@@ -642,8 +642,8 @@ digraph(short **relation)
traverse(i, relation);
 }
 
-  FREE(INDEX);
-  FREE(VERTICES);
+  free(INDEX);
+  free(VERTICES);
 }
 
 

Modified: head/usr.bin/yacc/lr0.c
==
--- head/usr.bin/yacc/lr0.c Sun Nov  7 23:22:22 2010(r214960)
+++ head/usr.bin/yacc/lr0.c Sun Nov  7 23:22:42 2010(r214961)
@@ -176,13 +176,13 @@ append_states(void)
 static void
 free_storage(void)
 {
-FREE(shift_symbol);
-FREE(redset);
-FREE(shiftset);
-FREE(kernel_base);
-FREE(kernel_end);
-FREE(kernel_items);
-FREE(state_set);
+free(shift_symbol);
+free(redset);
+free(shiftset);
+free(kernel_base);
+free(kernel_end);
+free(kernel_items);
+free(state_set);
 }
 
 
@@ -290,7 +290,7 @@ initialize_states(void)
 for (i = 0; start_derives[i] >= 0; ++i)
continue;
 
-p = (core *) MALLOC(sizeof(core) + i*sizeof(short));
+p = malloc(sizeof(core) + i*sizeof(short));
 if (p == 0) no_space();
 
 p->next = 0;
@@ -579,8 +579,8 @@ set_derives(void)
 #if 0
 free_derives()
 {
-FREE(derives[start_symbol]);
-FREE(derives);
+free(derives[start_symbol]);
+free(derives);
 }
 #endif
 
@@ -615,7 +615,7 @@ set_nullable(void)
 int em

svn commit: r214963 - head/usr.bin/yacc

2010-11-07 Thread David E. O'Brien
Author: obrien
Date: Sun Nov  7 23:34:05 2010
New Revision: 214963
URL: http://svn.freebsd.org/changeset/base/214963

Log:
  Inherit WARNS from parent directory.
  
  Submitted by: marius

Modified:
  head/usr.bin/yacc/Makefile

Modified: head/usr.bin/yacc/Makefile
==
--- head/usr.bin/yacc/Makefile  Sun Nov  7 23:23:48 2010(r214962)
+++ head/usr.bin/yacc/Makefile  Sun Nov  7 23:34:05 2010(r214963)
@@ -9,6 +9,4 @@ MAN=yacc.1 yyfix.1
 LINKS= ${BINDIR}/yacc ${BINDIR}/byacc
 MLINKS=yacc.1 byacc.1
 
-WARNS?=6
-
 .include 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r214964 - head/usr.bin/yacc

2010-11-07 Thread David E. O'Brien
Author: obrien
Date: Sun Nov  7 23:44:40 2010
New Revision: 214964
URL: http://svn.freebsd.org/changeset/base/214964

Log:
  Add '-y' for bison compatibility.
  
  Obtained from:http://invisible-island.net

Modified:
  head/usr.bin/yacc/main.c
  head/usr.bin/yacc/yacc.1

Modified: head/usr.bin/yacc/main.c
==
--- head/usr.bin/yacc/main.cSun Nov  7 23:34:05 2010(r214963)
+++ head/usr.bin/yacc/main.cSun Nov  7 23:44:40 2010(r214964)
@@ -166,7 +166,7 @@ getargs(int argc, char *argv[])
 {
 int ch;
 
-while ((ch = getopt(argc, argv, "b:dlo:p:rtv")) != -1)
+while ((ch = getopt(argc, argv, "b:dlo:p:rtvy")) != -1)
 {
switch (ch)
{
@@ -202,6 +202,10 @@ getargs(int argc, char *argv[])
vflag = 1;
break;
 
+   case 'y':
+   /* for bison compatibility -- byacc is already POSIX compatible */
+   break;
+
default:
usage();
}

Modified: head/usr.bin/yacc/yacc.1
==
--- head/usr.bin/yacc/yacc.1Sun Nov  7 23:34:05 2010(r214963)
+++ head/usr.bin/yacc/yacc.1Sun Nov  7 23:44:40 2010(r214964)
@@ -44,7 +44,7 @@
 .Nd an LALR(1) parser generator
 .Sh SYNOPSIS
 .Nm
-.Op Fl dlrtv
+.Op Fl dlrtvy
 .Op Fl b Ar file_prefix
 .Op Fl o Ar output_filename
 .Op Fl p Ar symbol_prefix
@@ -118,6 +118,10 @@ so that debugging statements will be inc
 Cause a human-readable description of the generated parser to
 be written to the file
 .Pa y.output .
+.It Fl y
+NOOP for bison compatibility.
+.Nm
+is already designed to be POSIX yacc compatible.
 .El
 .Sh ENVIRONMENT
 .Bl -tag -width ".Ev TMPDIR"
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r214990 - head/usr.bin/yacc

2010-11-08 Thread David E. O'Brien
Author: obrien
Date: Mon Nov  8 19:00:22 2010
New Revision: 214990
URL: http://svn.freebsd.org/changeset/base/214990

Log:
  Back out r214961 for skeleton.c -- it broke the groff build.

Modified:
  head/usr.bin/yacc/skeleton.c

Modified: head/usr.bin/yacc/skeleton.c
==
--- head/usr.bin/yacc/skeleton.cMon Nov  8 15:59:41 2010
(r214989)
+++ head/usr.bin/yacc/skeleton.cMon Nov  8 19:00:22 2010
(r214990)
@@ -157,14 +157,14 @@ const char *body[] =
 "else if ((newsize *= 2) > YYMAXDEPTH)",
 "newsize = YYMAXDEPTH;",
 "i = yyssp - yyss;",
-"newss = yyss ? realloc(yyss, newsize * sizeof *newss) :",
-"  malloc(newsize * sizeof *newss);",
+"newss = yyss ? (short *)realloc(yyss, newsize * sizeof *newss) :",
+"  (short *)malloc(newsize * sizeof *newss);",
 "if (newss == NULL)",
 "return -1;",
 "yyss = newss;",
 "yyssp = newss + i;",
-"newvs = yyvs ? realloc(yyvs, newsize * sizeof *newvs) :",
-"  malloc(newsize * sizeof *newvs);",
+"newvs = yyvs ? (YYSTYPE *)realloc(yyvs, newsize * sizeof *newvs) :",
+"  (YYSTYPE *)malloc(newsize * sizeof *newvs);",
 "if (newvs == NULL)",
 "return -1;",
 "yyvs = newvs;",
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r215027 - head/usr.bin/yacc

2010-11-08 Thread David E. O'Brien
Author: obrien
Date: Tue Nov  9 02:51:38 2010
New Revision: 215027
URL: http://svn.freebsd.org/changeset/base/215027

Log:
  Fix the build on 64-bit hosts.  WARNS=6 fails on them.

Modified:
  head/usr.bin/yacc/reader.c

Modified: head/usr.bin/yacc/reader.c
==
--- head/usr.bin/yacc/reader.c  Tue Nov  9 01:57:56 2010(r215026)
+++ head/usr.bin/yacc/reader.c  Tue Nov  9 02:51:38 2010(r215027)
@@ -719,7 +719,7 @@ get_literal(void)
++cptr;
}
}
-   if (n > UCHAR_MAX) illegal_character(c_cptr);
+   if (n > (int)UCHAR_MAX) illegal_character(c_cptr);
c = n;
break;
 
@@ -735,7 +735,7 @@ get_literal(void)
if (i < 0 || i >= 16) break;
++cptr;
n = (n << 4) + i;
-   if (n > UCHAR_MAX) illegal_character(c_cptr);
+   if (n > (int)UCHAR_MAX) illegal_character(c_cptr);
}
c = n;
break;
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r215041 - head/contrib/bzip2

2010-11-09 Thread David E. O'Brien
Author: obrien
Date: Tue Nov  9 18:32:57 2010
New Revision: 215041
URL: http://svn.freebsd.org/changeset/base/215041

Log:
  Upgrade to Bzip2 version 1.0.6.
  
  Reviewed by: SO (cperciva)

Modified:
  head/contrib/bzip2/CHANGES
  head/contrib/bzip2/LICENSE
  head/contrib/bzip2/Makefile
  head/contrib/bzip2/Makefile-libbz2_so
  head/contrib/bzip2/README
  head/contrib/bzip2/README.COMPILATION.PROBLEMS
  head/contrib/bzip2/blocksort.c
  head/contrib/bzip2/bzip2.1
  head/contrib/bzip2/bzip2.c
  head/contrib/bzip2/bzip2recover.c
  head/contrib/bzip2/bzlib.c
  head/contrib/bzip2/bzlib.h
  head/contrib/bzip2/bzlib_private.h
  head/contrib/bzip2/compress.c
  head/contrib/bzip2/crctable.c
  head/contrib/bzip2/decompress.c
  head/contrib/bzip2/huffman.c
  head/contrib/bzip2/randtable.c
  head/contrib/bzip2/spewG.c
  head/contrib/bzip2/unzcrash.c
Directory Properties:
  head/contrib/bzip2/   (props changed)

Modified: head/contrib/bzip2/CHANGES
==
--- head/contrib/bzip2/CHANGES  Tue Nov  9 18:28:11 2010(r215040)
+++ head/contrib/bzip2/CHANGES  Tue Nov  9 18:32:57 2010(r215041)
@@ -2,8 +2,8 @@
  This file is part of bzip2/libbzip2, a program and library for
  lossless, block-sorting data compression.
 
- bzip2/libbzip2 version 1.0.5 of 10 December 2007
- Copyright (C) 1996-2007 Julian Seward 
+ bzip2/libbzip2 version 1.0.6 of 6 September 2010
+ Copyright (C) 1996-2010 Julian Seward 
 
  Please read the WARNING, DISCLAIMER and PATENTS sections in the 
  README file.
@@ -317,3 +317,11 @@ Fixes some minor bugs since the last ver
 ~
 Security fix only.  Fixes CERT-FI 20469 as it applies to bzip2.
 
+
+1.0.6 (6 Sept 10)
+~
+
+* Security fix for CVE-2010-0405.  This was reported by Mikolaj
+  Izdebski.
+
+* Make the documentation build on Ubuntu 10.04

Modified: head/contrib/bzip2/LICENSE
==
--- head/contrib/bzip2/LICENSE  Tue Nov  9 18:28:11 2010(r215040)
+++ head/contrib/bzip2/LICENSE  Tue Nov  9 18:32:57 2010(r215041)
@@ -2,7 +2,7 @@
 --
 
 This program, "bzip2", the associated library "libbzip2", and all
-documentation, are copyright (C) 1996-2007 Julian R Seward.  All
+documentation, are copyright (C) 1996-2010 Julian R Seward.  All
 rights reserved.
 
 Redistribution and use in source and binary forms, with or without
@@ -37,6 +37,6 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY 
 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 Julian Seward, jsew...@bzip.org
-bzip2/libbzip2 version 1.0.5 of 10 December 2007
+bzip2/libbzip2 version 1.0.6 of 6 September 2010
 
 --

Modified: head/contrib/bzip2/Makefile
==
--- head/contrib/bzip2/Makefile Tue Nov  9 18:28:11 2010(r215040)
+++ head/contrib/bzip2/Makefile Tue Nov  9 18:32:57 2010(r215041)
@@ -2,8 +2,8 @@
 # This file is part of bzip2/libbzip2, a program and library for
 # lossless, block-sorting data compression.
 #
-# bzip2/libbzip2 version 1.0.5 of 10 December 2007
-# Copyright (C) 1996-2007 Julian Seward 
+# bzip2/libbzip2 version 1.0.6 of 6 September 2010
+# Copyright (C) 1996-2010 Julian Seward 
 #
 # Please read the WARNING, DISCLAIMER and PATENTS sections in the 
 # README file.
@@ -137,7 +137,7 @@ bzip2recover.o: bzip2recover.c
 distclean: clean
rm -f manual.ps manual.html manual.pdf
 
-DISTNAME=bzip2-1.0.5
+DISTNAME=bzip2-1.0.6
 dist: check manual
rm -f $(DISTNAME)
ln -s -f . $(DISTNAME)

Modified: head/contrib/bzip2/Makefile-libbz2_so
==
--- head/contrib/bzip2/Makefile-libbz2_so   Tue Nov  9 18:28:11 2010
(r215040)
+++ head/contrib/bzip2/Makefile-libbz2_so   Tue Nov  9 18:32:57 2010
(r215041)
@@ -1,6 +1,6 @@
 
 # This Makefile builds a shared version of the library, 
-# libbz2.so.1.0.4, with soname libbz2.so.1.0,
+# libbz2.so.1.0.6, with soname libbz2.so.1.0,
 # at least on x86-Linux (RedHat 7.2), 
 # with gcc-2.96 2731 (Red Hat Linux 7.1 2.96-98).  
 # Please see the README file for some important info 
@@ -10,8 +10,8 @@
 # This file is part of bzip2/libbzip2, a program and library for
 # lossless, block-sorting data compression.
 #
-# bzip2/libbzip2 version 1.0.5 of 10 December 2007
-# Copyright (C) 1996-2007 Julian Seward 
+# bzip2/libbzip2 version 1.0.6 of 6 September 2010
+# Copyright (C) 1996-2010 Julian Seward 
 #
 # Please read the WARNING, DISCLAIMER and PATENTS sections in the 
 # README file.
@@ -35,13 +35,13 @@ OBJS= blocksort.o  \
   bzlib.o
 
 all: $(OBJS)
-   $(CC) -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.4 $(OBJS)
-   $(CC) $(CFLAGS) -o bz

svn commit: r215605 - head/sys

2010-11-20 Thread David E. O'Brien
Author: obrien
Date: Sun Nov 21 03:56:41 2010
New Revision: 215605
URL: http://svn.freebsd.org/changeset/base/215605

Log:
  Add x86 to ALL_ARCH.

Modified:
  head/sys/Makefile

Modified: head/sys/Makefile
==
--- head/sys/Makefile   Sun Nov 21 02:00:54 2010(r215604)
+++ head/sys/Makefile   Sun Nov 21 03:56:41 2010(r215605)
@@ -14,7 +14,7 @@ CSCOPEDIRS=   boot bsm cam cddl compat con
netsmb nfs nfsclient nfsserver nlm opencrypto \
pci rpc security sys ufs vm xdr ${CSCOPE_ARCHDIR}
 .if defined(ALL_ARCH)
-CSCOPE_ARCHDIR ?= amd64 arm i386 ia64 mips pc98 powerpc sparc64 sun4v
+CSCOPE_ARCHDIR ?= amd64 arm i386 ia64 mips pc98 powerpc sparc64 sun4v x86
 .else
 CSCOPE_ARCHDIR ?= ${MACHINE}
 .endif
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r215606 - head/sys

2010-11-20 Thread David E. O'Brien
Author: obrien
Date: Sun Nov 21 03:58:11 2010
New Revision: 215606
URL: http://svn.freebsd.org/changeset/base/215606

Log:
  Add lex and yacc sources to things cscope'd.

Modified:
  head/sys/Makefile

Modified: head/sys/Makefile
==
--- head/sys/Makefile   Sun Nov 21 03:56:41 2010(r215605)
+++ head/sys/Makefile   Sun Nov 21 03:58:11 2010(r215606)
@@ -34,7 +34,7 @@ cscope.out: ${.CURDIR}/cscope.files
 
 ${.CURDIR}/cscope.files: .PHONY
cd ${.CURDIR}; \
-   find ${CSCOPEDIRS} -name "*.[chSs]" -a -type f > ${.TARGET}
+   find ${CSCOPEDIRS} -name "*.[chSsly]" -a -type f > ${.TARGET}
 
 cscope-clean:
rm -f cscope.files cscope.out cscope.in.out cscope.po.out
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r216468 - in head/sbin/geom/class: . cache concat eli journal label mirror mountver multipath nop part raid3 sched shsec stripe virstor

2010-12-15 Thread David E. O'Brien
Author: obrien
Date: Wed Dec 15 23:24:34 2010
New Revision: 216468
URL: http://svn.freebsd.org/changeset/base/216468

Log:
  Rename the generic "CLASS" to the more specific "GEOM_CLASS".
  While I'm here remove redundancy and inconsistencies.
  
  Obtained from: Juniper Networks

Modified:
  head/sbin/geom/class/Makefile.inc
  head/sbin/geom/class/cache/Makefile
  head/sbin/geom/class/concat/Makefile
  head/sbin/geom/class/eli/Makefile
  head/sbin/geom/class/journal/Makefile
  head/sbin/geom/class/label/Makefile
  head/sbin/geom/class/mirror/Makefile
  head/sbin/geom/class/mountver/Makefile
  head/sbin/geom/class/multipath/Makefile
  head/sbin/geom/class/nop/Makefile
  head/sbin/geom/class/part/Makefile
  head/sbin/geom/class/raid3/Makefile
  head/sbin/geom/class/sched/Makefile
  head/sbin/geom/class/shsec/Makefile
  head/sbin/geom/class/stripe/Makefile
  head/sbin/geom/class/virstor/Makefile

Modified: head/sbin/geom/class/Makefile.inc
==
--- head/sbin/geom/class/Makefile.inc   Wed Dec 15 22:59:50 2010
(r216467)
+++ head/sbin/geom/class/Makefile.inc   Wed Dec 15 23:24:34 2010
(r216468)
@@ -1,10 +1,10 @@
 # $FreeBSD$
 
-SHLIBDIR?=${CLASS_DIR}
-SHLIB_NAME?=geom_${CLASS}.so
-LINKS= ${BINDIR}/geom ${BINDIR}/g${CLASS}
-MAN=   g${CLASS}.8
-SRCS+= geom_${CLASS}.c subr.c
+SHLIBDIR?=${GEOM_CLASS_DIR}
+SHLIB_NAME?=geom_${GEOM_CLASS}.so
+LINKS= ${BINDIR}/geom ${BINDIR}/g${GEOM_CLASS}
+MAN=   g${GEOM_CLASS}.8
+SRCS+= geom_${GEOM_CLASS}.c subr.c
 
 CFLAGS+= -I${.CURDIR}/../..
 

Modified: head/sbin/geom/class/cache/Makefile
==
--- head/sbin/geom/class/cache/Makefile Wed Dec 15 22:59:50 2010
(r216467)
+++ head/sbin/geom/class/cache/Makefile Wed Dec 15 23:24:34 2010
(r216468)
@@ -2,6 +2,6 @@
 
 .PATH: ${.CURDIR}/../../misc
 
-CLASS= cache
+GEOM_CLASS=cache
 
 .include 

Modified: head/sbin/geom/class/concat/Makefile
==
--- head/sbin/geom/class/concat/MakefileWed Dec 15 22:59:50 2010
(r216467)
+++ head/sbin/geom/class/concat/MakefileWed Dec 15 23:24:34 2010
(r216468)
@@ -2,6 +2,6 @@
 
 .PATH: ${.CURDIR}/../../misc
 
-CLASS= concat
+GEOM_CLASS=concat
 
 .include 

Modified: head/sbin/geom/class/eli/Makefile
==
--- head/sbin/geom/class/eli/Makefile   Wed Dec 15 22:59:50 2010
(r216467)
+++ head/sbin/geom/class/eli/Makefile   Wed Dec 15 23:24:34 2010
(r216468)
@@ -2,7 +2,7 @@
 
 .PATH: ${.CURDIR}/../../misc ${.CURDIR}/../../../../sys/geom/eli 
${.CURDIR}/../../../../sys/crypto/sha2
 
-CLASS= eli
+GEOM_CLASS=eli
 SRCS=  g_eli_crypto.c
 SRCS+= g_eli_key.c
 SRCS+= pkcs5v2.c

Modified: head/sbin/geom/class/journal/Makefile
==
--- head/sbin/geom/class/journal/Makefile   Wed Dec 15 22:59:50 2010
(r216467)
+++ head/sbin/geom/class/journal/Makefile   Wed Dec 15 23:24:34 2010
(r216468)
@@ -1,8 +1,8 @@
 # $FreeBSD$
 
-.PATH: ${.CURDIR}/../../misc
+.PATH: ${.CURDIR}/../../misc
 
-CLASS= journal
+GEOM_CLASS=journal
 SRCS+= geom_journal_ufs.c
 
 DPADD= ${LIBMD} ${LIBUFS}

Modified: head/sbin/geom/class/label/Makefile
==
--- head/sbin/geom/class/label/Makefile Wed Dec 15 22:59:50 2010
(r216467)
+++ head/sbin/geom/class/label/Makefile Wed Dec 15 23:24:34 2010
(r216468)
@@ -2,6 +2,6 @@
 
 .PATH: ${.CURDIR}/../../misc
 
-CLASS= label
+GEOM_CLASS=label
 
 .include 

Modified: head/sbin/geom/class/mirror/Makefile
==
--- head/sbin/geom/class/mirror/MakefileWed Dec 15 22:59:50 2010
(r216467)
+++ head/sbin/geom/class/mirror/MakefileWed Dec 15 23:24:34 2010
(r216468)
@@ -1,8 +1,8 @@
 # $FreeBSD$
 
-.PATH: ${.CURDIR}/../../misc
+.PATH: ${.CURDIR}/../../misc
 
-CLASS= mirror
+GEOM_CLASS=mirror
 
 DPADD= ${LIBMD}
 LDADD= -lmd

Modified: head/sbin/geom/class/mountver/Makefile
==
--- head/sbin/geom/class/mountver/Makefile  Wed Dec 15 22:59:50 2010
(r216467)
+++ head/sbin/geom/class/mountver/Makefile  Wed Dec 15 23:24:34 2010
(r216468)
@@ -2,6 +2,6 @@
 
 .PATH: ${.CURDIR}/../../misc
 
-CLASS= mountver
+GEOM_CLASS=mountver
 
 .include 

Modified: head/sbin/geom/class/multipath/Makefile
==
--- head/sbin/geom/class/multipath/Makefile Wed Dec 15 22:59:50 2010
(r216467)
+++ head/sbin/geom/class/multipath/Makefile Wed Dec 15 23:24:34 2010
(r216468)
@@ -1,8 +1,9 @@

svn commit: r216470 - in head/sbin/geom: . class/sched core

2010-12-15 Thread David E. O'Brien
Author: obrien
Date: Wed Dec 15 23:45:12 2010
New Revision: 216470
URL: http://svn.freebsd.org/changeset/base/216470

Log:
  Rename the generic "CLASS" to the more specific "GEOM_CLASS".
  While I'm here remove redundancy and inconsistencies.
  
  Obtained from: Juniper Networks

Modified:
  head/sbin/geom/Makefile.inc
  head/sbin/geom/class/sched/Makefile
  head/sbin/geom/core/Makefile
  head/sbin/geom/core/geom.c

Modified: head/sbin/geom/Makefile.inc
==
--- head/sbin/geom/Makefile.inc Wed Dec 15 23:43:25 2010(r216469)
+++ head/sbin/geom/Makefile.inc Wed Dec 15 23:45:12 2010(r216470)
@@ -1,5 +1,5 @@
 # $FreeBSD$
 
-CLASS_DIR?=/lib/geom
+GEOM_CLASS_DIR?=/lib/geom
 
 .include "../Makefile.inc"

Modified: head/sbin/geom/class/sched/Makefile
==
--- head/sbin/geom/class/sched/Makefile Wed Dec 15 23:43:25 2010
(r216469)
+++ head/sbin/geom/class/sched/Makefile Wed Dec 15 23:45:12 2010
(r216470)
@@ -6,6 +6,5 @@
 GEOM_CLASS=sched
 
 WARNS?=6
-CLASS_DIR?=/lib/geom
 
 .include 

Modified: head/sbin/geom/core/Makefile
==
--- head/sbin/geom/core/MakefileWed Dec 15 23:43:25 2010
(r216469)
+++ head/sbin/geom/core/MakefileWed Dec 15 23:45:12 2010
(r216470)
@@ -8,7 +8,7 @@ SRCS=   geom.c subr.c
 
 NO_SHARED=NO
 
-CFLAGS+= -DCLASS_DIR=\"${CLASS_DIR}\"
+CFLAGS+= -DGEOM_CLASS_DIR=\"${GEOM_CLASS_DIR}\"
 CFLAGS+= -I${.CURDIR}/../../../sys -I${.CURDIR} -I${.CURDIR}/..
 
 DPADD= ${LIBGEOM} ${LIBSBUF} ${LIBBSDXML} ${LIBUTIL}

Modified: head/sbin/geom/core/geom.c
==
--- head/sbin/geom/core/geom.c  Wed Dec 15 23:43:25 2010(r216469)
+++ head/sbin/geom/core/geom.c  Wed Dec 15 23:45:12 2010(r216470)
@@ -500,7 +500,7 @@ library_path(void)
 
path = getenv("GEOM_LIBRARY_PATH");
if (path == NULL)
-   path = CLASS_DIR;
+   path = GEOM_CLASS_DIR;
return (path);
 }
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r216472 - head/sbin/geom/class/virstor

2010-12-15 Thread David E. O'Brien
Author: obrien
Date: Thu Dec 16 00:00:28 2010
New Revision: 216472
URL: http://svn.freebsd.org/changeset/base/216472

Log:
  GEOM virstor .so does not need libmd.

Modified:
  head/sbin/geom/class/virstor/Makefile

Modified: head/sbin/geom/class/virstor/Makefile
==
--- head/sbin/geom/class/virstor/Makefile   Wed Dec 15 23:48:45 2010
(r216471)
+++ head/sbin/geom/class/virstor/Makefile   Thu Dec 16 00:00:28 2010
(r216472)
@@ -7,7 +7,4 @@ GEOM_CLASS= virstor
 SRCS+= binstream.c
 SRCS+= g_virstor_md.c
 
-DPADD= ${LIBMD}
-LDADD= -lmd
-
 .include 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r216473 - head/sbin/geom/class/eli

2010-12-15 Thread David E. O'Brien
Author: obrien
Date: Thu Dec 16 00:36:10 2010
New Revision: 216473
URL: http://svn.freebsd.org/changeset/base/216473

Log:
  Bump WARNS to 6.

Modified:
  head/sbin/geom/class/eli/Makefile

Modified: head/sbin/geom/class/eli/Makefile
==
--- head/sbin/geom/class/eli/Makefile   Thu Dec 16 00:00:28 2010
(r216472)
+++ head/sbin/geom/class/eli/Makefile   Thu Dec 16 00:36:10 2010
(r216473)
@@ -11,7 +11,7 @@ SRCS+=sha2.c
 DPADD= ${LIBMD} ${LIBCRYPTO}
 LDADD= -lmd -lcrypto
 
-WARNS?=3
+WARNS?=6
 
 CFLAGS+=-I${.CURDIR}/../../../../sys
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r216493 - head/sbin/geom/class/eli

2010-12-16 Thread David E. O'Brien
Author: obrien
Date: Thu Dec 16 17:54:56 2010
New Revision: 216493
URL: http://svn.freebsd.org/changeset/base/216493

Log:
  Revert r216473.
  WARNS=6 causes "warning: cast increases required alignment of target type"
  on arm, ia64, mips, and sparc64.

Modified:
  head/sbin/geom/class/eli/Makefile

Modified: head/sbin/geom/class/eli/Makefile
==
--- head/sbin/geom/class/eli/Makefile   Thu Dec 16 17:14:37 2010
(r216492)
+++ head/sbin/geom/class/eli/Makefile   Thu Dec 16 17:54:56 2010
(r216493)
@@ -11,7 +11,7 @@ SRCS+=sha2.c
 DPADD= ${LIBMD} ${LIBCRYPTO}
 LDADD= -lmd -lcrypto
 
-WARNS?=6
+WARNS?=3
 
 CFLAGS+=-I${.CURDIR}/../../../../sys
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r226089 - in head: share/man/man7 sys/kern

2011-10-06 Thread David E. O'Brien
Author: obrien
Date: Fri Oct  7 05:47:30 2011
New Revision: 226089
URL: http://svn.freebsd.org/changeset/base/226089

Log:
  Disallow various debug.kdb sysctl's when securelevel is raised.
  
  PR:   161350

Modified:
  head/share/man/man7/security.7
  head/sys/kern/subr_kdb.c

Modified: head/share/man/man7/security.7
==
--- head/share/man/man7/security.7  Fri Oct  7 05:45:38 2011
(r226088)
+++ head/share/man/man7/security.7  Fri Oct  7 05:47:30 2011
(r226089)
@@ -544,6 +544,12 @@ may not be opened for writing;
 kernel modules (see
 .Xr kld 4 )
 may not be loaded or unloaded.
+The kernel debugger may not be entered using the
+.Va debug.kdb.enter
+sysctl.
+A panic or trap cannot be forced using the
+.Va debug.kdb.panic
+and other sysctl's.
 .It Ic 2
 Highly secure mode \- same as secure mode, plus disks may not be
 opened for writing (except by

Modified: head/sys/kern/subr_kdb.c
==
--- head/sys/kern/subr_kdb.cFri Oct  7 05:45:38 2011(r226088)
+++ head/sys/kern/subr_kdb.cFri Oct  7 05:47:30 2011(r226089)
@@ -90,25 +90,30 @@ SYSCTL_PROC(_debug_kdb, OID_AUTO, availa
 SYSCTL_PROC(_debug_kdb, OID_AUTO, current, CTLTYPE_STRING | CTLFLAG_RW, NULL,
 0, kdb_sysctl_current, "A", "currently selected KDB backend");
 
-SYSCTL_PROC(_debug_kdb, OID_AUTO, enter, CTLTYPE_INT | CTLFLAG_RW, NULL, 0,
+SYSCTL_PROC(_debug_kdb, OID_AUTO, enter,
+CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_SECURE, NULL, 0,
 kdb_sysctl_enter, "I", "set to enter the debugger");
 
-SYSCTL_PROC(_debug_kdb, OID_AUTO, panic, CTLTYPE_INT | CTLFLAG_RW, NULL, 0,
+SYSCTL_PROC(_debug_kdb, OID_AUTO, panic,
+CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_SECURE, NULL, 0,
 kdb_sysctl_panic, "I", "set to panic the kernel");
 
-SYSCTL_PROC(_debug_kdb, OID_AUTO, trap, CTLTYPE_INT | CTLFLAG_RW, NULL, 0,
+SYSCTL_PROC(_debug_kdb, OID_AUTO, trap,
+CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_SECURE, NULL, 0,
 kdb_sysctl_trap, "I", "set to cause a page fault via data access");
 
-SYSCTL_PROC(_debug_kdb, OID_AUTO, trap_code, CTLTYPE_INT | CTLFLAG_RW, NULL, 0,
+SYSCTL_PROC(_debug_kdb, OID_AUTO, trap_code,
+CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_SECURE, NULL, 0,
 kdb_sysctl_trap_code, "I", "set to cause a page fault via code access");
 
-SYSCTL_INT(_debug_kdb, OID_AUTO, break_to_debugger, CTLTYPE_INT | CTLFLAG_RW |
-CTLFLAG_TUN, &kdb_break_to_debugger, 0, "Enable break to debugger");
+SYSCTL_INT(_debug_kdb, OID_AUTO, break_to_debugger,
+CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_TUN | CTLFLAG_SECURE,
+&kdb_break_to_debugger, 0, "Enable break to debugger");
 TUNABLE_INT("debug.kdb.break_to_debugger", &kdb_break_to_debugger);
 
-SYSCTL_INT(_debug_kdb, OID_AUTO, alt_break_to_debugger, CTLTYPE_INT |
-CTLFLAG_RW | CTLFLAG_TUN, &kdb_alt_break_to_debugger, 0,
-"Enable alternative break to debugger");
+SYSCTL_INT(_debug_kdb, OID_AUTO, alt_break_to_debugger,
+CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_TUN | CTLFLAG_SECURE,
+&kdb_alt_break_to_debugger, 0, "Enable alternative break to debugger");
 TUNABLE_INT("debug.kdb.alt_break_to_debugger", &kdb_alt_break_to_debugger);
 
 /*
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r226090 - head/sys/sys

2011-10-06 Thread David E. O'Brien
Author: obrien
Date: Fri Oct  7 06:00:00 2011
New Revision: 226090
URL: http://svn.freebsd.org/changeset/base/226090

Log:
  Increase MSGBUF_SIZE.
  The previous size lead to truncated /var/run/dmesg.boot when booted with "-v".

Modified:
  head/sys/sys/msgbuf.h

Modified: head/sys/sys/msgbuf.h
==
--- head/sys/sys/msgbuf.h   Fri Oct  7 05:47:30 2011(r226089)
+++ head/sys/sys/msgbuf.h   Fri Oct  7 06:00:00 2011(r226090)
@@ -77,7 +77,7 @@ int   msgbuf_peekbytes(struct msgbuf *mbp,
 void   msgbuf_reinit(struct msgbuf *mbp, void *ptr, int size);
 
 #ifndef MSGBUF_SIZE
-#defineMSGBUF_SIZE (32768 * 2)
+#defineMSGBUF_SIZE (32768 * 3)
 #endif
 #endif /* KERNEL */
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r226702 - in head: contrib/gcc gnu/usr.bin/cc

2011-10-24 Thread David E. O'Brien
Author: obrien
Date: Mon Oct 24 20:52:41 2011
New Revision: 226702
URL: http://svn.freebsd.org/changeset/base/226702

Log:
  * Don't give the impression that this compiler is GPLv3.
(It is "well known" that GCC 4.2.2 is GPLv3.)
  * Don't give the impression that this compiler isn't "trustable".
  * Fix dependency nit.

Modified:
  head/contrib/gcc/BASE-VER
  head/contrib/gcc/DEV-PHASE
  head/gnu/usr.bin/cc/Makefile.ver

Modified: head/contrib/gcc/BASE-VER
==
--- head/contrib/gcc/BASE-VER   Mon Oct 24 20:48:02 2011(r226701)
+++ head/contrib/gcc/BASE-VER   Mon Oct 24 20:52:41 2011(r226702)
@@ -1 +1 @@
-4.2.2
+4.2.1

Modified: head/contrib/gcc/DEV-PHASE
==
--- head/contrib/gcc/DEV-PHASE  Mon Oct 24 20:48:02 2011(r226701)
+++ head/contrib/gcc/DEV-PHASE  Mon Oct 24 20:52:41 2011(r226702)
@@ -1 +1 @@
-prerelease
+patched

Modified: head/gnu/usr.bin/cc/Makefile.ver
==
--- head/gnu/usr.bin/cc/Makefile.verMon Oct 24 20:48:02 2011
(r226701)
+++ head/gnu/usr.bin/cc/Makefile.verMon Oct 24 20:52:41 2011
(r226702)
@@ -4,7 +4,7 @@ BASEVER!=   cat ${GCCDIR}/BASE-VER
 DATESTAMP!=cat ${GCCDIR}/DATESTAMP
 DEVPHASE!= cat ${GCCDIR}/DEV-PHASE
 
-version.o: version.c
+version.o: version.c ${GCCDIR}/BASE-VER ${GCCDIR}/DATESTAMP ${GCCDIR}/DEV-PHASE
${CC} ${CFLAGS} -DBASEVER=\"${BASEVER}\" \
-DDATESTAMP=\"\ ${DATESTAMP}\" \
-DDEVPHASE=\"\ ${DEVPHASE}\" -c ${.IMPSRC}
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r227518 - head/sys/kern

2011-11-14 Thread David E. O'Brien
Author: obrien
Date: Tue Nov 15 01:48:53 2011
New Revision: 227518
URL: http://svn.freebsd.org/changeset/base/227518

Log:
  Reformat comment to be more readable in standard Xterm.
  (while I'm here, wrap other long lines)

Modified:
  head/sys/kern/kern_descrip.c

Modified: head/sys/kern/kern_descrip.c
==
--- head/sys/kern/kern_descrip.cTue Nov 15 01:39:02 2011
(r227517)
+++ head/sys/kern/kern_descrip.cTue Nov 15 01:48:53 2011
(r227518)
@@ -838,12 +838,12 @@ do_dup(struct thread *td, int flags, int
if (flags & DUP_FIXED) {
if (new >= fdp->fd_nfiles) {
/*
-* The resource limits are here instead of e.g. 
fdalloc(),
-* because the file descriptor table may be shared 
between
-* processes, so we can't really use 
racct_add()/racct_sub().
-* Instead of counting the number of actually allocated
-* descriptors, just put the limit on the size of the 
file
-* descriptor table.
+* The resource limits are here instead of e.g.
+* fdalloc(), because the file descriptor table may be
+* shared between processes, so we can't really use
+* racct_add()/racct_sub().  Instead of counting the
+* number of actually allocated descriptors, just put
+* the limit on the size of the file descriptor table.
 */
 #ifdef RACCT
PROC_LOCK(p);
@@ -1516,7 +1516,7 @@ fdalloc(struct thread *td, int minfd, in
FILEDESC_XLOCK_ASSERT(fdp);
 
if (fdp->fd_freefile > minfd)
-   minfd = fdp->fd_freefile;  
+   minfd = fdp->fd_freefile;
 
PROC_LOCK(p);
maxfd = min((int)lim_cur(p, RLIMIT_NOFILE), maxfilesperproc);
@@ -2248,7 +2248,7 @@ closef(struct file *fp, struct thread *t
 
 /*
  * Initialize the file pointer with the specified properties.
- * 
+ *
  * The ops are set with release semantics to be certain that the flags, type,
  * and data are visible when ops is.  This is to prevent ops methods from being
  * called with bad data.
@@ -3758,28 +3758,32 @@ SYSINIT(select, SI_SUB_LOCK, SI_ORDER_FI
 /*---*/
 
 static int
-badfo_readwrite(struct file *fp, struct uio *uio, struct ucred *active_cred, 
int flags, struct thread *td)
+badfo_readwrite(struct file *fp, struct uio *uio, struct ucred *active_cred,
+int flags, struct thread *td)
 {
 
return (EBADF);
 }
 
 static int
-badfo_truncate(struct file *fp, off_t length, struct ucred *active_cred, 
struct thread *td)
+badfo_truncate(struct file *fp, off_t length, struct ucred *active_cred,
+struct thread *td)
 {
 
return (EINVAL);
 }
 
 static int
-badfo_ioctl(struct file *fp, u_long com, void *data, struct ucred 
*active_cred, struct thread *td)
+badfo_ioctl(struct file *fp, u_long com, void *data, struct ucred *active_cred,
+struct thread *td)
 {
 
return (EBADF);
 }
 
 static int
-badfo_poll(struct file *fp, int events, struct ucred *active_cred, struct 
thread *td)
+badfo_poll(struct file *fp, int events, struct ucred *active_cred,
+struct thread *td)
 {
 
return (0);
@@ -3793,7 +3797,8 @@ badfo_kqfilter(struct file *fp, struct k
 }
 
 static int
-badfo_stat(struct file *fp, struct stat *sb, struct ucred *active_cred, struct 
thread *td)
+badfo_stat(struct file *fp, struct stat *sb, struct ucred *active_cred,
+struct thread *td)
 {
 
return (EBADF);
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r227524 - in head/usr.sbin: pmccontrol pmcstat

2011-11-14 Thread David E. O'Brien
Author: obrien
Date: Tue Nov 15 06:44:07 2011
New Revision: 227524
URL: http://svn.freebsd.org/changeset/base/227524

Log:
  Improve the chances of matching an outputted string with the line of code.

Modified:
  head/usr.sbin/pmccontrol/pmccontrol.c
  head/usr.sbin/pmcstat/pmcpl_calltree.c
  head/usr.sbin/pmcstat/pmcpl_gprof.c
  head/usr.sbin/pmcstat/pmcstat.c
  head/usr.sbin/pmcstat/pmcstat_log.c

Modified: head/usr.sbin/pmccontrol/pmccontrol.c
==
--- head/usr.sbin/pmccontrol/pmccontrol.c   Tue Nov 15 06:35:21 2011
(r227523)
+++ head/usr.sbin/pmccontrol/pmccontrol.c   Tue Nov 15 06:44:07 2011
(r227524)
@@ -147,8 +147,9 @@ pmcc_do_enable_disable(struct pmcc_op_li
npmc = 0;
for (c = 0; c < ncpu; c++) {
if ((t = pmc_npmc(c)) < 0)
-   err(EX_OSERR, "Unable to determine the number of "
-   "PMCs in CPU %d", c);
+   err(EX_OSERR,
+   "Unable to determine the number of PMCs in CPU %d",
+   c);
npmc = t > npmc ? t : npmc;
}
 
@@ -211,8 +212,8 @@ pmcc_do_enable_disable(struct pmcc_op_li
 
if (error < 0)
err(EX_OSERR, "%s of PMC %d on CPU %d failed",
-   b == PMCC_OP_ENABLE ? "Enable" :
-   "Disable", j, i);
+   b == PMCC_OP_ENABLE ? "Enable" : "Disable",
+   j, i);
}
 
return error;
@@ -308,8 +309,9 @@ pmcc_do_list_events(void)
 
printf("%s\n", pmc_name_of_class(c));
if (pmc_event_names_of_class(c, &eventnamelist, &nevents) < 0)
-   err(EX_OSERR, "ERROR: Cannot find information for "
-   "event class \"%s\"", pmc_name_of_class(c));
+   err(EX_OSERR,
+"ERROR: Cannot find information for event class \"%s\"",
+   pmc_name_of_class(c));
 
for (j = 0; j < nevents; j++)
printf("\t%s\n", eventnamelist[j]);
@@ -481,7 +483,8 @@ main(int argc, char **argv)
break;
case PMCC_ENABLE_DISABLE:
if (STAILQ_EMPTY(&head))
-   errx(EX_USAGE, "No PMCs specified to enable or 
disable");
+   errx(EX_USAGE,
+   "No PMCs specified to enable or disable");
error = pmcc_do_enable_disable(&head);
break;
default:

Modified: head/usr.sbin/pmcstat/pmcpl_calltree.c
==
--- head/usr.sbin/pmcstat/pmcpl_calltree.c  Tue Nov 15 06:35:21 2011
(r227523)
+++ head/usr.sbin/pmcstat/pmcpl_calltree.c  Tue Nov 15 06:44:07 2011
(r227524)
@@ -575,7 +575,8 @@ pmcpl_ct_topkeypress(int c, WINDOW *w)
switch (c) {
case 'f':
pmcstat_skiplink = !pmcstat_skiplink;
-   wprintw(w, "skip empty link %s", pmcstat_skiplink ? "on" : 
"off");
+   wprintw(w, "skip empty link %s",
+   pmcstat_skiplink ? "on" : "off");
break;
}
 

Modified: head/usr.sbin/pmcstat/pmcpl_gprof.c
==
--- head/usr.sbin/pmcstat/pmcpl_gprof.c Tue Nov 15 06:35:21 2011
(r227523)
+++ head/usr.sbin/pmcstat/pmcpl_gprof.c Tue Nov 15 06:44:07 2011
(r227524)
@@ -333,8 +333,9 @@ pmcpl_gmon_initimage(struct pmcstat_imag
count = 0;
do {
if (++count > 999)
-   errx(EX_CANTCREAT, "ERROR: cannot create a "
-   "gmon file for \"%s\"", name);
+   errx(EX_CANTCREAT,
+   "ERROR: cannot create a gmon file for"
+   " \"%s\"", name);
snprintf(name, sizeof(name), "%.*s~%3.3d.gmon",
nlen, sn, count);
if (pmcstat_string_lookup(name) == NULL) {
@@ -516,8 +517,8 @@ pmcpl_gmon_shutdown(FILE *mf)
pgf->pgf_pmcid),
pgf->pgf_nsamples);
if (pgf->pgf_overflow && args.pa_verbosity >= 1)
-   warnx("WARNING: profile \"%s\" "
-   "overflowed.",
+   warnx(
+"WARNING: profile \"%s\" overflowed.",
pmcstat_string_unintern(
pgf->pgf_name));
}

Modified: head/usr.sbin/pmcstat/pmc

svn commit: r227526 - head/usr.sbin/pmcstat

2011-11-14 Thread David E. O'Brien
Author: obrien
Date: Tue Nov 15 06:50:10 2011
New Revision: 227526
URL: http://svn.freebsd.org/changeset/base/227526

Log:
  KNF

Modified:
  head/usr.sbin/pmcstat/pmcstat_log.c

Modified: head/usr.sbin/pmcstat/pmcstat_log.c
==
--- head/usr.sbin/pmcstat/pmcstat_log.c Tue Nov 15 06:45:51 2011
(r227525)
+++ head/usr.sbin/pmcstat/pmcstat_log.c Tue Nov 15 06:50:10 2011
(r227526)
@@ -1218,22 +1218,23 @@ pmcstat_process_lookup(pid_t pid, int al
hash = (uint32_t) pid & PMCSTAT_HASH_MASK;  /* simplicity wins */
 
LIST_FOREACH_SAFE(pp, &pmcstat_process_hash[hash], pp_next, pptmp)
-   if (pp->pp_pid == pid) {
-   /* Found a descriptor, check and process zombies */
-   if (allocate && pp->pp_isactive == 0) {
-   /* remove maps */
-   TAILQ_FOREACH_SAFE(ppm, &pp->pp_map, ppm_next,
-   ppmtmp) {
-   TAILQ_REMOVE(&pp->pp_map, ppm, ppm_next);
-   free(ppm);
-   }
-   /* remove process entry */
-   LIST_REMOVE(pp, pp_next);
-   free(pp);
-   break;
-   }
-   return (pp);
-   }
+   if (pp->pp_pid == pid) {
+   /* Found a descriptor, check and process zombies */
+   if (allocate && pp->pp_isactive == 0) {
+   /* remove maps */
+   TAILQ_FOREACH_SAFE(ppm, &pp->pp_map, ppm_next,
+   ppmtmp) {
+   TAILQ_REMOVE(&pp->pp_map, ppm,
+   ppm_next);
+   free(ppm);
+   }
+   /* remove process entry */
+   LIST_REMOVE(pp, pp_next);
+   free(pp);
+   break;
+   }
+   return (pp);
+   }
 
if (!allocate)
return (NULL);
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r336882 - head/sys/kern

2018-07-30 Thread David E. O'Brien
Author: obrien
Date: Mon Jul 30 07:01:00 2018
New Revision: 336882
URL: https://svnweb.freebsd.org/changeset/base/336882

Log:
  Correct copyright dates.

Modified:
  head/sys/kern/imgact_elf.c

Modified: head/sys/kern/imgact_elf.c
==
--- head/sys/kern/imgact_elf.c  Mon Jul 30 01:54:25 2018(r336881)
+++ head/sys/kern/imgact_elf.c  Mon Jul 30 07:01:00 2018(r336882)
@@ -2,7 +2,7 @@
  * SPDX-License-Identifier: BSD-3-Clause
  *
  * Copyright (c) 2017 Dell EMC
- * Copyright (c) 2000 David O'Brien
+ * Copyright (c) 2000-2001, 2003 David O'Brien
  * Copyright (c) 1995-1996 Søren Schmidt
  * Copyright (c) 1996 Peter Wemm
  * All rights reserved.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r316591 - head/sys/dev/tpm

2017-04-06 Thread David E. O'Brien
Author: obrien
Date: Thu Apr  6 22:21:49 2017
New Revision: 316591
URL: https://svnweb.freebsd.org/changeset/base/316591

Log:
  Remove dead code.
  The #ifdef __FreeBSD__ section within the OpenBSD tpm_attach() implementation
  can never be active.

Modified:
  head/sys/dev/tpm/tpm.c

Modified: head/sys/dev/tpm/tpm.c
==
--- head/sys/dev/tpm/tpm.c  Thu Apr  6 20:12:39 2017(r316590)
+++ head/sys/dev/tpm/tpm.c  Thu Apr  6 22:21:49 2017(r316591)
@@ -422,12 +422,8 @@ tpm_attach(device_t parent, device_t sel
return;
}
 
-#ifdef __FreeBSD__
-   sc->sc_suspend = 0;
-#else
sc->sc_suspend = PWR_RESUME;
sc->sc_powerhook = powerhook_establish(tpm_powerhook, sc);
-#endif
 }
 #endif
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r338503 - head/usr.sbin/services_mkdb

2018-09-06 Thread David E. O'Brien
Author: obrien
Date: Thu Sep  6 18:34:11 2018
New Revision: 338503
URL: https://svnweb.freebsd.org/changeset/base/338503

Log:
  Add MPLS LSP-echo (RFC8029, March 2017) port.
  
  Reviewed by:  stevek
  Approved by:  re(gjb)
  Obtained from:Juniper Networks

Modified:
  head/usr.sbin/services_mkdb/services

Modified: head/usr.sbin/services_mkdb/services
==
--- head/usr.sbin/services_mkdb/servicesThu Sep  6 17:25:50 2018
(r338502)
+++ head/usr.sbin/services_mkdb/servicesThu Sep  6 18:34:11 2018
(r338503)
@@ -2238,6 +2238,8 @@ vat-control   3457/tcp   #VAT default control
 vat-control3457/udp   #VAT default control
 nut3493/tcp   #Network UPS Tools
 nut3493/udp   #Network UPS Tools
+lsp-ping   3503/tcp   #MPLS LSP-echo (RFC8029)
+lsp-ping   3503/udp   #MPLS LSP-echo (RFC8029)
 m2pa   3565/sctp  #M2PA
 m2pa   3565/tcp   #M2PA
 tsp3653/tcp   #Tunnel Setup Protocol
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r343561 - in head/sys: arm64/include riscv/include

2019-01-29 Thread David E. O'Brien
Author: obrien
Date: Tue Jan 29 20:10:27 2019
New Revision: 343561
URL: https://svnweb.freebsd.org/changeset/base/343561

Log:
  Follow arm[32] and sparc64 KAPI and provide the FreeBSD standard spelling
  across all architectures for this header.
  
  Reviewed by:  stevek
  Obtained from:Juniper Networks

Added:
  head/sys/arm64/include/sigframe.h
 - copied unchanged from r343560, head/sys/arm/include/sigframe.h
  head/sys/riscv/include/sigframe.h
 - copied unchanged from r343560, head/sys/arm/include/sigframe.h

Copied: head/sys/arm64/include/sigframe.h (from r343560, 
head/sys/arm/include/sigframe.h)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/arm64/include/sigframe.h   Tue Jan 29 20:10:27 2019
(r343561, copy of r343560, head/sys/arm/include/sigframe.h)
@@ -0,0 +1,2 @@
+/* $FreeBSD$ */
+#include 

Copied: head/sys/riscv/include/sigframe.h (from r343560, 
head/sys/arm/include/sigframe.h)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/riscv/include/sigframe.h   Tue Jan 29 20:10:27 2019
(r343561, copy of r343560, head/sys/arm/include/sigframe.h)
@@ -0,0 +1,2 @@
+/* $FreeBSD$ */
+#include 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r344085 - head/lib/libc/gen

2019-02-12 Thread David E. O'Brien
Author: obrien
Date: Wed Feb 13 04:52:01 2019
New Revision: 344085
URL: https://svnweb.freebsd.org/changeset/base/344085

Log:
  Note that readpassphrase() came into FreeBSD's libc at 4.6.

Modified:
  head/lib/libc/gen/readpassphrase.3

Modified: head/lib/libc/gen/readpassphrase.3
==
--- head/lib/libc/gen/readpassphrase.3  Wed Feb 13 04:19:08 2019
(r344084)
+++ head/lib/libc/gen/readpassphrase.3  Wed Feb 13 04:52:01 2019
(r344085)
@@ -178,4 +178,6 @@ extension and should not be used if portability is des
 The
 .Fn readpassphrase
 function first appeared in
+.Fx 4.6
+and
 .Ox 2.9 .
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r251173 - head/tools/regression/filemon

2013-05-30 Thread David E. O'Brien
Author: obrien
Date: Fri May 31 04:19:13 2013
New Revision: 251173
URL: http://svnweb.freebsd.org/changeset/base/251173

Log:
  Allow building with clang (which is being really stupid here...).

Modified:
  head/tools/regression/filemon/timed-forkb.c

Modified: head/tools/regression/filemon/timed-forkb.c
==
--- head/tools/regression/filemon/timed-forkb.c Fri May 31 03:14:49 2013
(r251172)
+++ head/tools/regression/filemon/timed-forkb.c Fri May 31 04:19:13 2013
(r251173)
@@ -45,6 +45,7 @@
 #defineSLEEP   20  /* seconds */
 #endif
 
+extern int verbose;
 int verbose;
 
 static void
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r251174 - head/tools/regression/filemon

2013-05-30 Thread David E. O'Brien
Author: obrien
Date: Fri May 31 04:27:41 2013
New Revision: 251174
URL: http://svnweb.freebsd.org/changeset/base/251174

Log:
  Different approach to making all compilers happy.

Modified:
  head/tools/regression/filemon/timed-forkb.c

Modified: head/tools/regression/filemon/timed-forkb.c
==
--- head/tools/regression/filemon/timed-forkb.c Fri May 31 04:19:13 2013
(r251173)
+++ head/tools/regression/filemon/timed-forkb.c Fri May 31 04:27:41 2013
(r251174)
@@ -45,8 +45,7 @@
 #defineSLEEP   20  /* seconds */
 #endif
 
-extern int verbose;
-int verbose;
+static int verbose;
 
 static void
 usage(void)
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r251198 - head/sys/compat/freebsd32

2013-05-31 Thread David E. O'Brien
Author: obrien
Date: Fri May 31 21:43:17 2013
New Revision: 251198
URL: http://svnweb.freebsd.org/changeset/base/251198

Log:
  Add a "kern.features" MIB for 32bit support under a 64bit kernel.

Modified:
  head/sys/compat/freebsd32/freebsd32_misc.c

Modified: head/sys/compat/freebsd32/freebsd32_misc.c
==
--- head/sys/compat/freebsd32/freebsd32_misc.c  Fri May 31 21:31:38 2013
(r251197)
+++ head/sys/compat/freebsd32/freebsd32_misc.c  Fri May 31 21:43:17 2013
(r251198)
@@ -104,6 +104,8 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
+FEATURE(compat_freebsd_32bit, "Compatible with 32-bit FreeBSD");
+
 #ifndef __mips__
 CTASSERT(sizeof(struct timeval32) == 8);
 CTASSERT(sizeof(struct timespec32) == 8);
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r251368 - in head: sys/dev/filemon sys/modules/filemon tools/regression/filemon

2013-06-03 Thread David E. O'Brien
Author: obrien
Date: Tue Jun  4 06:38:01 2013
New Revision: 251368
URL: http://svnweb.freebsd.org/changeset/base/251368

Log:
  Match the options of the kernel.

Modified:
  head/sys/dev/filemon/filemon.c
  head/sys/dev/filemon/filemon_wrapper.c
  head/sys/modules/filemon/Makefile
  head/tools/regression/filemon/Makefile
  head/tools/regression/filemon/filemontest.c
  head/tools/regression/filemon/test_script.sh

Modified: head/sys/dev/filemon/filemon.c
==
--- head/sys/dev/filemon/filemon.c  Tue Jun  4 05:44:52 2013
(r251367)
+++ head/sys/dev/filemon/filemon.c  Tue Jun  4 06:38:01 2013
(r251368)
@@ -25,10 +25,11 @@
  * SUCH DAMAGE.
  */
 
-#include 
+#include 
 __FBSDID("$FreeBSD$");
 
-#include 
+#include "opt_compat.h"
+
 #include 
 #include 
 #include 

Modified: head/sys/dev/filemon/filemon_wrapper.c
==
--- head/sys/dev/filemon/filemon_wrapper.c  Tue Jun  4 05:44:52 2013
(r251367)
+++ head/sys/dev/filemon/filemon_wrapper.c  Tue Jun  4 06:38:01 2013
(r251368)
@@ -28,6 +28,8 @@
 #include 
 __FBSDID("$FreeBSD$");
 
+#include "opt_compat.h"
+
 #if __FreeBSD_version > 800032
 #define FILEMON_HAS_LINKAT
 #endif

Modified: head/sys/modules/filemon/Makefile
==
--- head/sys/modules/filemon/Makefile   Tue Jun  4 05:44:52 2013
(r251367)
+++ head/sys/modules/filemon/Makefile   Tue Jun  4 06:38:01 2013
(r251368)
@@ -4,6 +4,6 @@
 
 KMOD=  filemon
 SRCS=  ${KMOD}.c
-SRCS+= vnode_if.h opt_compat.h opt_capsicum.h
+SRCS+= opt_compat.h
 
 .include 

Modified: head/tools/regression/filemon/Makefile
==
--- head/tools/regression/filemon/Makefile  Tue Jun  4 05:44:52 2013
(r251367)
+++ head/tools/regression/filemon/Makefile  Tue Jun  4 06:38:01 2013
(r251368)
@@ -1,10 +1,20 @@
 # $FreeBSD$
 
-BINS=  \
+.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "ia64"
+BI_BITS=
+.endif
+
+_BINS= \
filemontest \
-   timed-forkb
+   timed-forkb \
+   sizeof_long
+
+BINS=  ${_BINS}
+.if defined(BI_BITS)
+BINS+= ${_BINS:C/$/32/g}
+.endif
 
-bins: filemontest timed-forkb
+bins: ${BINS}
 all: bins
 
 NO_MAN=
@@ -18,20 +28,25 @@ WITHOUT_CDDL=
 
 CLEANFILES+=   ${BINS}
 
-tests: bins
+
+.for f32 in ${BINS}
+${f32}32: ${f32}.c
+   ${CC} -m32 -DBIT=\"32\" -o ${.TARGET} ${CFLAGS} ${.ALLSRC}
+.endfor
+
+tests:
kldstat | grep filemon
-   ${MAKE} test
-   @echo "Without filemon(4) active:"
-   ./timed-forkb
-   @echo "With filemon(4) active:"
-   script -f typescript-timed-forkb ./timed-forkb
-   ls -l typescript-timed-forkb.filemon
+   @echo ""
+   ${MAKE} test01
+   ${MAKE} test02
+.if defined(BI_BITS)
+   ${MAKE} test32
+.endif
@echo "filemon(4) tests passed."
 
 # Cannot use .OBJDIR -- 'filemontest' expects 'test_script.sh' in .
-#FILEMONTEST32=filemontest32
-test: filemontest clean-test
-.for BIN in filemontest ${FILEMONTEST32}
+test01: ${BINS:Mfilemontest*} ${BINS:Msizeof_long*} clean-test
+.for BIN in ${BINS:Mfilemontest}
cd ${.CURDIR} ; \
for A in 1 2 3 4 5 6 7 8 9 0; do \
for B in 1 2 3 4 5 6 7 8 9 0; do \
@@ -41,13 +56,30 @@ test: filemontest clean-test
done ;\
done
@cd ${.CURDIR} ; set +e ; egrep '(Start|Stop) .*\.' filemon_log.* | \
-   grep -q -v '\.[0-9][0-9][0-9][0-9][0-9][0-9]$$' || echo "Time stamp 
format OK"
+   grep -q -v '\.[0-9][0-9][0-9][0-9][0-9][0-9]$$' || printf "Time 
stamp format OK\n\n"
 .endfor
+   @cd ${.CURDIR} ; set +e ; for F in filemon_log.* ; do \
+   tail -1 $$F | grep -q '# Bye bye' || echo "$$F missing filemon 
bye-bye" ; \
+   NL=`wc -l $$F | awk '{print $$1}'` ; \
+   if [ "$${NL}" != 97 ]; then echo "$$F BAD, contains $${NL} lines" ; 
exit 1 ; fi ; done
+
+test02: ${BINS:Mtimed-forkb*}
+   @echo "Without filemon(4) active:"
+   ./timed-forkb
+   @echo "With filemon(4) active:"
+   script -f typescript-timed-forkb ./timed-forkb
+   ls -l typescript-timed-forkb.filemon
+
+test32: ${BINS:M*32*}
+   script -f typescript.${.TARGET} ./sizeof_long32 >/dev/null
+   @tail -1 typescript.test32.filemon | grep -q '# Bye bye' || (echo 
'32-bit comapt filemon Missing "bye-bye"' ; exit 1)
+   @egrep -q '^X [0-9]+ 0$$' typescript.test32.filemon || (echo "32-bit 
binary exit ERROR" ; exit 1)
+   @printf "filemon(4) 32bit FreeBSD support passed.\n\n"
 
 CLEANFILES+=   typescript-timed-forkb typescript-timed-forkb.filemon
 
 clean-test:
-   cd ${.CURDIR} ; rm -f filemon_log.*
+   cd ${.CURDIR} ; rm -f filemon_log*.*
 
 clean-tests: clean-test
 

Modified: head/tools/regression/filemon/fi

svn commit: r252348 - head/usr.sbin/pkg_install/lib

2013-06-28 Thread David E. O'Brien
Author: obrien
Date: Fri Jun 28 17:18:28 2013
New Revision: 252348
URL: http://svnweb.freebsd.org/changeset/base/252348

Log:
  sysconf(3) returns a long, not an int.

Modified:
  head/usr.sbin/pkg_install/lib/exec.c

Modified: head/usr.sbin/pkg_install/lib/exec.c
==
--- head/usr.sbin/pkg_install/lib/exec.cFri Jun 28 16:39:52 2013
(r252347)
+++ head/usr.sbin/pkg_install/lib/exec.cFri Jun 28 17:18:28 2013
(r252348)
@@ -34,7 +34,8 @@ vsystem(const char *fmt, ...)
 {
 va_list args;
 char *cmd;
-int ret, maxargs;
+long maxargs;
+int ret;
 
 maxargs = sysconf(_SC_ARG_MAX);
 maxargs -= 32; /* some slop for the sh -c */
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r252363 - in head/usr.sbin/pkg_install: add create lib

2013-06-28 Thread David E. O'Brien
Author: obrien
Date: Sat Jun 29 00:37:49 2013
New Revision: 252363
URL: http://svnweb.freebsd.org/changeset/base/252363

Log:
  sysconf(3) returns a long, not an int.

Modified:
  head/usr.sbin/pkg_install/add/extract.c
  head/usr.sbin/pkg_install/create/pl.c
  head/usr.sbin/pkg_install/lib/exec.c

Modified: head/usr.sbin/pkg_install/add/extract.c
==
--- head/usr.sbin/pkg_install/add/extract.c Fri Jun 28 22:47:33 2013
(r252362)
+++ head/usr.sbin/pkg_install/add/extract.c Sat Jun 29 00:37:49 2013
(r252363)
@@ -110,7 +110,8 @@ extract_plist(const char *home, Package 
 PackingList p = pkg->head;
 char *last_file, *prefix = NULL;
 char *where_args, *perm_args, *last_chdir;
-int maxargs, where_count = 0, perm_count = 0, add_count;
+long maxargs;
+int where_count = 0, perm_count = 0, add_count;
 Boolean preserve;
 
 maxargs = sysconf(_SC_ARG_MAX) / 2;/* Just use half the argument 
space */

Modified: head/usr.sbin/pkg_install/create/pl.c
==
--- head/usr.sbin/pkg_install/create/pl.c   Fri Jun 28 22:47:33 2013
(r252362)
+++ head/usr.sbin/pkg_install/create/pl.c   Sat Jun 29 00:37:49 2013
(r252363)
@@ -140,7 +140,8 @@ copy_plist(const char *home, Package *pl
 const char *there = NULL, *mythere;
 char *where_args, *prefix = NULL;
 const char *last_chdir, *root = "/";
-int maxargs, where_count = 0, add_count;
+long maxargs;
+int where_count = 0, add_count;
 struct stat stb;
 dev_t curdir;
 

Modified: head/usr.sbin/pkg_install/lib/exec.c
==
--- head/usr.sbin/pkg_install/lib/exec.cFri Jun 28 22:47:33 2013
(r252362)
+++ head/usr.sbin/pkg_install/lib/exec.cSat Jun 29 00:37:49 2013
(r252363)
@@ -65,7 +65,7 @@ vpipe(const char *fmt, ...)
 {
FILE *fp;
char *cmd, *rp;
-   int maxargs;
+   long maxargs;
va_list args;
 
 rp = malloc(MAXPATHLEN);
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r258931 - head/usr.bin/yacc

2013-12-04 Thread David E. O'Brien
Author: obrien
Date: Wed Dec  4 19:15:56 2013
New Revision: 258931
URL: http://svnweb.freebsd.org/changeset/base/258931

Log:
  Add missing bits from the vendor's 2005-05-04 change to
  contrib/byacc/makefile.in ("add YYPATCH here so it can be tested by
  applications") so that applications have a hope of detecting newer
  FreeBSD YACC output from an older one.
  
  Submitted by: Juniper Networks

Modified:
  head/usr.bin/yacc/Makefile

Modified: head/usr.bin/yacc/Makefile
==
--- head/usr.bin/yacc/Makefile  Wed Dec  4 19:04:56 2013(r258930)
+++ head/usr.bin/yacc/Makefile  Wed Dec  4 19:15:56 2013(r258931)
@@ -1,7 +1,8 @@
 #  @(#)Makefile5.3 (Berkeley) 5/12/90
 # $FreeBSD$
 
-.PATH: ${.CURDIR}/../../contrib/byacc
+BYACC_SRC= ${.CURDIR}/../../contrib/byacc
+.PATH: ${BYACC_SRC}
 
 PROG=  yacc
 SRCS=  closure.c error.c graph.c lalr.c lr0.c main.c mkpar.c output.c \
@@ -12,7 +13,10 @@ CFLAGS+= -DMIXEDCASE_FILENAMES=1 \
-DHAVE_FCNTL_H=1 \
-DHAVE_ATEXIT=1 \
-DHAVE_MKSTEMP=1
-   
+
+YYPATCH!=  cat ${BYACC_SRC}/VERSION
+CFLAGS+=   -DYYPATCH=${YYPATCH}
+
 LINKS= ${BINDIR}/yacc ${BINDIR}/byacc
 MLINKS=yacc.1 byacc.1
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r279376 - in head/cddl/usr.bin: ctfconvert ctfmerge

2015-02-27 Thread David E. O'Brien
Author: obrien
Date: Fri Feb 27 22:10:31 2015
New Revision: 279376
URL: https://svnweb.freebsd.org/changeset/base/279376

Log:
  These CTF tools do not use anything from libctf, so no need to link with it.

Modified:
  head/cddl/usr.bin/ctfconvert/Makefile
  head/cddl/usr.bin/ctfmerge/Makefile

Modified: head/cddl/usr.bin/ctfconvert/Makefile
==
--- head/cddl/usr.bin/ctfconvert/Makefile   Fri Feb 27 21:35:36 2015
(r279375)
+++ head/cddl/usr.bin/ctfconvert/Makefile   Fri Feb 27 22:10:31 2015
(r279376)
@@ -36,7 +36,7 @@ CFLAGS+=  -I${.CURDIR}/../../../sys/cddl/
-I${OPENSOLARIS_USR_DISTDIR}/tools/ctf/cvt \
-I${OPENSOLARIS_SYS_DISTDIR}/uts/common
 
-DPADD= ${LIBCTF} ${LIBDWARF} ${LIBELF} ${LIBZ} ${LIBPTHREAD}
-LDADD= -lctf -ldwarf -lelf -lz -lpthread
+DPADD= ${LIBDWARF} ${LIBELF} ${LIBZ} ${LIBPTHREAD}
+LDADD= -ldwarf -lelf -lz -lpthread
 
 .include 

Modified: head/cddl/usr.bin/ctfmerge/Makefile
==
--- head/cddl/usr.bin/ctfmerge/Makefile Fri Feb 27 21:35:36 2015
(r279375)
+++ head/cddl/usr.bin/ctfmerge/Makefile Fri Feb 27 22:10:31 2015
(r279376)
@@ -33,7 +33,7 @@ CFLAGS+=  -I${.CURDIR}/../../../sys/cddl/
-I${OPENSOLARIS_USR_DISTDIR}/tools/ctf/cvt \
-I${OPENSOLARIS_SYS_DISTDIR}/uts/common
 
-DPADD= ${LIBCTF} ${LIBDWARF} ${LIBELF} ${LIBZ} ${LIBPTHREAD}
-LDADD= -lctf -ldwarf -lelf -lz -lpthread
+DPADD= ${LIBDWARF} ${LIBELF} ${LIBZ} ${LIBPTHREAD}
+LDADD= -ldwarf -lelf -lz -lpthread
 
 .include 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r279378 - head/share/mk

2015-02-27 Thread David E. O'Brien
Author: obrien
Date: Fri Feb 27 22:18:33 2015
New Revision: 279378
URL: https://svnweb.freebsd.org/changeset/base/279378

Log:
  Update r279018 so it only applies to Clang version 3.5+ and not 3.4.[1-9].

Modified:
  head/share/mk/bsd.sys.mk

Modified: head/share/mk/bsd.sys.mk
==
--- head/share/mk/bsd.sys.mkFri Feb 27 22:16:54 2015(r279377)
+++ head/share/mk/bsd.sys.mkFri Feb 27 22:18:33 2015(r279378)
@@ -119,7 +119,7 @@ CLANG_NO_IAS=-no-integrated-as
 .endif
 CLANG_OPT_SMALL= -mstack-alignment=8 -mllvm -inline-threshold=3\
 -mllvm -simplifycfg-dup-ret -mllvm
-.if ${COMPILER_VERSION} > 30400
+.if ${COMPILER_VERSION} >= 30500
 CLANG_OPT_SMALL+= -enable-gvn=false
 .endif
 CFLAGS.clang+=  -Qunused-arguments
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r279380 - in head/sys/boot/amd64: boot1.efi efi

2015-02-27 Thread David E. O'Brien
Author: obrien
Date: Fri Feb 27 22:20:07 2015
New Revision: 279380
URL: https://svnweb.freebsd.org/changeset/base/279380

Log:
  Remove duplicated -I.

Modified:
  head/sys/boot/amd64/boot1.efi/Makefile
  head/sys/boot/amd64/efi/Makefile

Modified: head/sys/boot/amd64/boot1.efi/Makefile
==
--- head/sys/boot/amd64/boot1.efi/Makefile  Fri Feb 27 22:19:49 2015
(r279379)
+++ head/sys/boot/amd64/boot1.efi/Makefile  Fri Feb 27 22:20:07 2015
(r279380)
@@ -53,8 +53,6 @@ boot1.efi: loader.sym
-j .rela.dyn -j .reloc -j .eh_frame -j set_Xcommand_set \
--output-target=${EFI_TARGET} ${.ALLSRC} ${.TARGET}
 
-CFLAGS+=   -I${.CURDIR}/../../common
-
 boot1.o: ${.CURDIR}/../../common/ufsread.c
 
 # The following inserts out objects into a template FAT file system

Modified: head/sys/boot/amd64/efi/Makefile
==
--- head/sys/boot/amd64/efi/MakefileFri Feb 27 22:19:49 2015
(r279379)
+++ head/sys/boot/amd64/efi/MakefileFri Feb 27 22:20:07 2015
(r279380)
@@ -84,7 +84,6 @@ loader.efi: loader.sym
--output-target=${EFI_TARGET} ${.ALLSRC} ${.TARGET}
 
 LIBEFI=${.OBJDIR}/../../efi/libefi/libefi.a
-CFLAGS+=   -I${.CURDIR}/../../common
 
 DPADD= ${LIBFICL} ${LIBEFI} ${LIBSTAND}
 LDADD= ${LIBFICL} ${LIBEFI} ${LIBSTAND}
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r279381 - head/sys/boot/amd64/efi

2015-02-27 Thread David E. O'Brien
Author: obrien
Date: Fri Feb 27 22:22:05 2015
New Revision: 279381
URL: https://svnweb.freebsd.org/changeset/base/279381

Log:
  Use sys/boot/userboot/libstand/ and not /usr/lib/libstand.a.

Modified:
  head/sys/boot/amd64/efi/Makefile

Modified: head/sys/boot/amd64/efi/Makefile
==
--- head/sys/boot/amd64/efi/MakefileFri Feb 27 22:20:07 2015
(r279380)
+++ head/sys/boot/amd64/efi/MakefileFri Feb 27 22:22:05 2015
(r279381)
@@ -84,6 +84,7 @@ loader.efi: loader.sym
--output-target=${EFI_TARGET} ${.ALLSRC} ${.TARGET}
 
 LIBEFI=${.OBJDIR}/../../efi/libefi/libefi.a
+LIBSTAND=   ${.OBJDIR}/../../userboot/libstand/libstand.a
 
 DPADD= ${LIBFICL} ${LIBEFI} ${LIBSTAND}
 LDADD= ${LIBFICL} ${LIBEFI} ${LIBSTAND}
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r279382 - head/sys/boot/userboot/libstand

2015-02-27 Thread David E. O'Brien
Author: obrien
Date: Fri Feb 27 22:23:35 2015
New Revision: 279382
URL: https://svnweb.freebsd.org/changeset/base/279382

Log:
  sys/boot/userboot/libstand/libstand.a should also include strtoul.c;
  as lib/libstand/ and sys/boot/libstand32/ already does.

Modified:
  head/sys/boot/userboot/libstand/Makefile

Modified: head/sys/boot/userboot/libstand/Makefile
==
--- head/sys/boot/userboot/libstand/MakefileFri Feb 27 22:22:05 2015
(r279381)
+++ head/sys/boot/userboot/libstand/MakefileFri Feb 27 22:23:35 2015
(r279382)
@@ -43,7 +43,7 @@ CFLAGS+=  -msoft-float -D_STANDALONE
 
 # standalone components and stuff we have modified locally
 SRCS+= gzguts.h zutil.h __main.c assert.c bcd.c bswap.c environment.c getopt.c 
gets.c \
-   globals.c pager.c printf.c strdup.c strerror.c strtol.c random.c \
+   globals.c pager.c printf.c strdup.c strerror.c strtol.c strtoul.c 
random.c \
sbrk.c twiddle.c zalloc.c zalloc_malloc.c
 
 # private (pruned) versions of libc string functions
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r271049 - head/share/man/man4

2014-09-03 Thread David E. O'Brien
Author: obrien
Date: Wed Sep  3 19:06:08 2014
New Revision: 271049
URL: http://svnweb.freebsd.org/changeset/base/271049

Log:
  Note that script(1) consumes filemon(4).

Modified:
  head/share/man/man4/filemon.4

Modified: head/share/man/man4/filemon.4
==
--- head/share/man/man4/filemon.4   Wed Sep  3 19:01:34 2014
(r271048)
+++ head/share/man/man4/filemon.4   Wed Sep  3 19:06:08 2014
(r271049)
@@ -165,6 +165,7 @@ buffer contents to it.
 .Sh SEE ALSO
 .Xr dtrace 1 ,
 .Xr ktrace 1 ,
+.Xr script 1 ,
 .Xr truss 1 ,
 .Xr ioctl 2
 .Sh HISTORY
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r285645 - head/bin/dd

2015-07-16 Thread David E. O'Brien
Author: obrien
Date: Thu Jul 16 23:38:12 2015
New Revision: 285645
URL: https://svnweb.freebsd.org/changeset/base/285645

Log:
  Mention the dd-like recoverdisk(1) to help folks find this great BSD command.

Modified:
  head/bin/dd/dd.1

Modified: head/bin/dd/dd.1
==
--- head/bin/dd/dd.1Thu Jul 16 22:07:13 2015(r285644)
+++ head/bin/dd/dd.1Thu Jul 16 23:38:12 2015(r285645)
@@ -416,6 +416,7 @@ if necessary, to a 1MiB boundary:
 .Sh SEE ALSO
 .Xr cp 1 ,
 .Xr mt 1 ,
+.Xr recoverdisk 1 ,
 .Xr tr 1 ,
 .Xr geom 4
 .Sh STANDARDS
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r296966 - head/contrib/libxo

2016-03-19 Thread David E. O'Brien
Author: obrien
Date: Wed Mar 16 23:42:57 2016
New Revision: 296966
URL: https://svnweb.freebsd.org/changeset/base/296966

Log:
  Block the r296965 vendor/Juniper/libxo cleanup (to match the release tarball)
  from being merged in -- backing out FreeBSD localizations.

Modified:
Directory Properties:
  head/contrib/libxo/   (props changed)
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r296968 - in head/contrib/libxo: . bin build libxo

2016-03-19 Thread David E. O'Brien
Author: obrien
Date: Wed Mar 16 23:59:29 2016
New Revision: 296968
URL: https://svnweb.freebsd.org/changeset/base/296968

Log:
  Bring down 0.4.5 vendor files and other catchups with the distribution 
tarball.
  
  Reviewed by:  phil

Added:
 - copied unchanged from r296967, 
vendor/Juniper/libxo/dist/libxo/xo_config.h.in
Directory Properties:
  head/contrib/libxo/libxo/xo_config.h.in   (props changed)
Deleted:
  head/contrib/libxo/bin/
  head/contrib/libxo/build/
Modified:
  head/contrib/libxo/install-sh

Modified: head/contrib/libxo/install-sh
==
--- head/contrib/libxo/install-sh   Wed Mar 16 23:50:41 2016
(r296967)
+++ head/contrib/libxo/install-sh   Wed Mar 16 23:59:29 2016
(r296968)
@@ -1,7 +1,7 @@
 #!/bin/sh
 # install - install a program, script, or datafile
 
-scriptversion=2011-11-20.07; # UTC
+scriptversion=2013-12-25.23; # UTC
 
 # This originates from X11R5 (mit/util/scripts/install.sh), which was
 # later released in X11R6 (xc/config/util/install.sh) with the
@@ -41,19 +41,15 @@ scriptversion=2011-11-20.07; # UTC
 # This script is compatible with the BSD install script, but was written
 # from scratch.
 
+tab='  '
 nl='
 '
-IFS=" ""   $nl"
+IFS=" $tab$nl"
 
-# set DOITPROG to echo to test this script
+# Set DOITPROG to "echo" to test this script.
 
-# Don't use :- since 4.3BSD and earlier shells don't like it.
 doit=${DOITPROG-}
-if test -z "$doit"; then
-  doit_exec=exec
-else
-  doit_exec=$doit
-fi
+doit_exec=${doit:-exec}
 
 # Put in absolute file names if you don't have them in your path;
 # or use environment vars.
@@ -68,17 +64,6 @@ mvprog=${MVPROG-mv}
 rmprog=${RMPROG-rm}
 stripprog=${STRIPPROG-strip}
 
-posix_glob='?'
-initialize_posix_glob='
-  test "$posix_glob" != "?" || {
-if (set -f) 2>/dev/null; then
-  posix_glob=
-else
-  posix_glob=:
-fi
-  }
-'
-
 posix_mkdir=
 
 # Desired mode of installed file.
@@ -97,7 +82,7 @@ dir_arg=
 dst_arg=
 
 copy_on_change=false
-no_target_directory=
+is_target_a_directory=possibly
 
 usage="\
 Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
@@ -137,46 +122,57 @@ while test $# -ne 0; do
 -d) dir_arg=true;;
 
 -g) chgrpcmd="$chgrpprog $2"
-   shift;;
+shift;;
 
 --help) echo "$usage"; exit $?;;
 
 -m) mode=$2
-   case $mode in
- *' '* | *''* | *'
-'*   | *'*'* | *'?'* | *'['*)
-   echo "$0: invalid mode: $mode" >&2
-   exit 1;;
-   esac
-   shift;;
+case $mode in
+  *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
+echo "$0: invalid mode: $mode" >&2
+exit 1;;
+esac
+shift;;
 
 -o) chowncmd="$chownprog $2"
-   shift;;
+shift;;
 
 -s) stripcmd=$stripprog;;
 
--t) dst_arg=$2
-   # Protect names problematic for 'test' and other utilities.
-   case $dst_arg in
- -* | [=\(\)!]) dst_arg=./$dst_arg;;
-   esac
-   shift;;
+-t)
+is_target_a_directory=always
+dst_arg=$2
+# Protect names problematic for 'test' and other utilities.
+case $dst_arg in
+  -* | [=\(\)!]) dst_arg=./$dst_arg;;
+esac
+shift;;
 
--T) no_target_directory=true;;
+-T) is_target_a_directory=never;;
 
 --version) echo "$0 $scriptversion"; exit $?;;
 
---)shift
-   break;;
+--) shift
+break;;
 
--*)echo "$0: invalid option: $1" >&2
-   exit 1;;
+-*) echo "$0: invalid option: $1" >&2
+exit 1;;
 
 *)  break;;
   esac
   shift
 done
 
+# We allow the use of options -d and -T together, by making -d
+# take the precedence; this is for compatibility with GNU install.
+
+if test -n "$dir_arg"; then
+  if test -n "$dst_arg"; then
+echo "$0: target directory not allowed when installing a directory." >&2
+exit 1
+  fi
+fi
+
 if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
   # When -d is used, all remaining arguments are directories to create.
   # When -t is used, the destination is already specified.
@@ -208,6 +204,15 @@ if test $# -eq 0; then
 fi
 
 if test -z "$dir_arg"; then
+  if test $# -gt 1 || test "$is_target_a_directory" = always; then
+if test ! -d "$dst_arg"; then
+  echo "$0: $dst_arg: Is not a directory." >&2
+  exit 1
+fi
+  fi
+fi
+
+if test -z "$dir_arg"; then
   do_exit='(exit $ret); exit $ret'
   trap "ret=129; $do_exit" 1
   trap "ret=130; $do_exit" 2
@@ -223,16 +228,16 @@ if test -z "$dir_arg"; then
 
 *[0-7])
   if test -z "$stripcmd"; then
-   u_plus_rw=
+u_plus_rw=
   else
-   u_plus_rw='% 200'
+u_plus_rw='% 200'
   fi
   cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
 *)
   if test -z "$stripcmd"; then
-   u_plus_rw=
+u_plus_rw=
   else
-   u_plus_rw=,u+rw
+u_plus_rw=,u+rw
   fi
   cp_umask=$mode$u_plus_rw;;
   esac
@@ -269,41 

svn commit: r234449 - in head: contrib/file contrib/file/Magdir contrib/file/tests lib/libmagic usr.bin/file

2012-04-18 Thread David E. O'Brien
Author: obrien
Date: Thu Apr 19 03:20:13 2012
New Revision: 234449
URL: http://svn.freebsd.org/changeset/base/234449

Log:
  Update file(1) to version 5.11.

Added:
  head/contrib/file/Magdir/assembler
 - copied unchanged from r234250, vendor/file/dist/Magdir/assembler
  head/contrib/file/Magdir/blcr
 - copied unchanged from r234250, vendor/file/dist/Magdir/blcr
  head/contrib/file/Magdir/bsi
 - copied unchanged from r234250, vendor/file/dist/Magdir/bsi
  head/contrib/file/Magdir/cups
 - copied unchanged from r234250, vendor/file/dist/Magdir/cups
  head/contrib/file/Magdir/ebml
 - copied unchanged from r234250, vendor/file/dist/Magdir/ebml
  head/contrib/file/Magdir/fusecompress
 - copied unchanged from r234250, vendor/file/dist/Magdir/fusecompress
  head/contrib/file/Magdir/geo
 - copied unchanged from r234250, vendor/file/dist/Magdir/geo
  head/contrib/file/Magdir/guile
 - copied unchanged from r234250, vendor/file/dist/Magdir/guile
  head/contrib/file/Magdir/isz
 - copied unchanged from r234250, vendor/file/dist/Magdir/isz
  head/contrib/file/Magdir/m4
 - copied unchanged from r234250, vendor/file/dist/Magdir/m4
  head/contrib/file/Magdir/make
 - copied unchanged from r234250, vendor/file/dist/Magdir/make
  head/contrib/file/Magdir/marc21
 - copied unchanged from r234250, vendor/file/dist/Magdir/marc21
  head/contrib/file/Magdir/metastore
 - copied unchanged from r234250, vendor/file/dist/Magdir/metastore
  head/contrib/file/Magdir/msooxml
 - copied unchanged from r234250, vendor/file/dist/Magdir/msooxml
  head/contrib/file/Magdir/music
 - copied unchanged from r234250, vendor/file/dist/Magdir/music
  head/contrib/file/Magdir/oasis
 - copied unchanged from r234250, vendor/file/dist/Magdir/oasis
  head/contrib/file/Magdir/parrot
 - copied unchanged from r234250, vendor/file/dist/Magdir/parrot
  head/contrib/file/Magdir/pascal
 - copied unchanged from r234250, vendor/file/dist/Magdir/pascal
  head/contrib/file/Magdir/rinex
 - copied unchanged from r234250, vendor/file/dist/Magdir/rinex
  head/contrib/file/Magdir/selinux
 - copied unchanged from r234250, vendor/file/dist/Magdir/selinux
  head/contrib/file/Magdir/sisu
 - copied unchanged from r234250, vendor/file/dist/Magdir/sisu
  head/contrib/file/Magdir/smile
 - copied unchanged from r234250, vendor/file/dist/Magdir/smile
  head/contrib/file/Magdir/ssh
 - copied unchanged from r234250, vendor/file/dist/Magdir/ssh
  head/contrib/file/Magdir/ssl
 - copied unchanged from r234250, vendor/file/dist/Magdir/ssl
  head/contrib/file/Magdir/tcl
 - copied unchanged from r234250, vendor/file/dist/Magdir/tcl
  head/contrib/file/Magdir/virtual
 - copied unchanged from r234250, vendor/file/dist/Magdir/virtual
  head/contrib/file/Magdir/wsdl
 - copied unchanged from r234250, vendor/file/dist/Magdir/wsdl
  head/contrib/file/Magdir/zfs
 - copied unchanged from r234250, vendor/file/dist/Magdir/zfs
  head/contrib/file/getline.c
 - copied unchanged from r234250, vendor/file/dist/getline.c
Deleted:
  head/contrib/file/Magdir/alpha
  head/contrib/file/Magdir/psion
  head/contrib/file/patchlevel.h
Modified:
  head/contrib/file/ChangeLog
  head/contrib/file/Header
  head/contrib/file/INSTALL
  head/contrib/file/Magdir/acorn
  head/contrib/file/Magdir/adi
  head/contrib/file/Magdir/adventure
  head/contrib/file/Magdir/allegro
  head/contrib/file/Magdir/alliant
  head/contrib/file/Magdir/amanda
  head/contrib/file/Magdir/amigaos
  head/contrib/file/Magdir/animation
  head/contrib/file/Magdir/apl
  head/contrib/file/Magdir/apple
  head/contrib/file/Magdir/applix
  head/contrib/file/Magdir/archive
  head/contrib/file/Magdir/asterix
  head/contrib/file/Magdir/att3b
  head/contrib/file/Magdir/audio
  head/contrib/file/Magdir/basis
  head/contrib/file/Magdir/bflt
  head/contrib/file/Magdir/blender
  head/contrib/file/Magdir/blit
  head/contrib/file/Magdir/bout
  head/contrib/file/Magdir/bsdi
  head/contrib/file/Magdir/btsnoop
  head/contrib/file/Magdir/c-lang
  head/contrib/file/Magdir/c64
  head/contrib/file/Magdir/cad
  head/contrib/file/Magdir/cafebabe
  head/contrib/file/Magdir/cddb
  head/contrib/file/Magdir/chord
  head/contrib/file/Magdir/cisco
  head/contrib/file/Magdir/citrus
  head/contrib/file/Magdir/clarion
  head/contrib/file/Magdir/claris
  head/contrib/file/Magdir/clipper
  head/contrib/file/Magdir/commands
  head/contrib/file/Magdir/communications
  head/contrib/file/Magdir/compress
  head/contrib/file/Magdir/console
  head/contrib/file/Magdir/convex
  head/contrib/file/Magdir/cracklib
  head/contrib/file/Magdir/ctags
  head/contrib/file/Magdir/dact
  head/contrib/file/Magdir/database
  head/contrib/file/Magdir/diamond
  head/contrib/file/Magdir/diff
  head/contrib/file/Magdir/digital
  head/contrib/file/Magdir/dolby
  head/contrib/file/Magdir/dump
  head/contrib/file/Magdir/dyadic
  head/contrib/file/Magdir/editors
  head/contrib/file/Magdir/efi
  head/co

svn commit: r234690 - head/lib/libedit/edit/readline

2012-04-25 Thread David E. O'Brien
Author: obrien
Date: Thu Apr 26 00:51:43 2012
New Revision: 234690
URL: http://svn.freebsd.org/changeset/base/234690

Log:
  Correct r228114 and use the same implementation for tilde.h as for history.h

Added:
  head/lib/libedit/edit/readline/tilde.h
 - copied unchanged from r234451, head/lib/libedit/edit/readline/history.h
Modified:
  head/lib/libedit/edit/readline/Makefile

Modified: head/lib/libedit/edit/readline/Makefile
==
--- head/lib/libedit/edit/readline/Makefile Thu Apr 26 00:18:38 2012
(r234689)
+++ head/lib/libedit/edit/readline/Makefile Thu Apr 26 00:51:43 2012
(r234690)
@@ -1,8 +1,7 @@
 # Copyright (c) 2011 David E O'Brien
 # $FreeBSD$
 
-INCS=  readline.h history.h
-INCSLINKS= readline.h ${INCSDIR}/tilde.h
+INCS=  readline.h history.h tilde.h
 
 INCSDIR= ${INCLUDEDIR}/edit/readline
 

Copied: head/lib/libedit/edit/readline/tilde.h (from r234451, 
head/lib/libedit/edit/readline/history.h)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/lib/libedit/edit/readline/tilde.h  Thu Apr 26 00:51:43 2012
(r234690, copy of r234451, head/lib/libedit/edit/readline/history.h)
@@ -0,0 +1,32 @@
+/*-
+ * Copyright (c) 2011 David E. O'Brien
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the author nor the names of contributors
+ *may be used to endorse or promote products derived from this software
+ *without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+#include 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r234746 - in head: . lib/libmd

2012-04-27 Thread David E. O'Brien
Author: obrien
Date: Sat Apr 28 02:48:51 2012
New Revision: 234746
URL: http://svn.freebsd.org/changeset/base/234746

Log:
  Remove the RFC 1319 MD2 Message-Digest Algorithm routines from libmd.
  
  1. The licensing terms for the MD2 routines from RFC is not under a BSD-like
 license.  Instead it is only granted for non-commercial Internet
 Privacy-Enhanced Mail.
  2. MD2 is quite deprecated as it is no longer considered a cryptographically
 strong algorithm.
  
  Discussed with:   so (cperciva), core

Deleted:
  head/lib/libmd/md2.copyright
  head/lib/libmd/md2.h
  head/lib/libmd/md2c.c
Modified:
  head/ObsoleteFiles.inc
  head/lib/libmd/Makefile
  head/lib/libmd/mdX.3

Modified: head/ObsoleteFiles.inc
==
--- head/ObsoleteFiles.inc  Sat Apr 28 00:12:23 2012(r234745)
+++ head/ObsoleteFiles.inc  Sat Apr 28 02:48:51 2012(r234746)
@@ -582,6 +582,7 @@ OLD_LIBS+=lib/libipx.so.4
 OLD_LIBS+=lib/libkiconv.so.3
 OLD_LIBS+=lib/libkvm.so.4
 OLD_LIBS+=lib/libmd.so.4
+OLD_LIBS+=lib/libmd.so.5
 OLD_LIBS+=lib/libncurses.so.7
 OLD_LIBS+=lib/libncursesw.so.7
 OLD_LIBS+=lib/libnvpair.so.1

Modified: head/lib/libmd/Makefile
==
--- head/lib/libmd/Makefile Sat Apr 28 00:12:23 2012(r234745)
+++ head/lib/libmd/Makefile Sat Apr 28 02:48:51 2012(r234746)
@@ -1,20 +1,18 @@
 # $FreeBSD$
 
 LIB=   md
+SHLIB_MAJOR= 6
 SHLIBDIR?= /lib
-SRCS=  md2c.c md4c.c md5c.c md2hl.c md4hl.c md5hl.c \
+SRCS=  md4c.c md5c.c md4hl.c md5hl.c \
rmd160c.c rmd160hl.c \
sha0c.c sha0hl.c sha1c.c sha1hl.c \
sha256c.c sha256hl.c \
sha512c.c sha512hl.c
-INCS=  md2.h md4.h md5.h ripemd.h sha.h sha256.h sha512.h
+INCS=  md4.h md5.h ripemd.h sha.h sha256.h sha512.h
 
 WARNS?=0
 
-MAN+=  md2.3 md4.3 md5.3 ripemd.3 sha.3 sha256.3 sha512.3
-MLINKS+=md2.3 MD2Init.3 md2.3 MD2Update.3 md2.3 MD2Final.3
-MLINKS+=md2.3 MD2End.3  md2.3 MD2File.3   md2.3 MD2FileChunk.3
-MLINKS+=md2.3 MD2Data.3
+MAN+=  md4.3 md5.3 ripemd.3 sha.3 sha256.3 sha512.3
 MLINKS+=md4.3 MD4Init.3 md4.3 MD4Update.3 md4.3 MD4Final.3
 MLINKS+=md4.3 MD4End.3  md4.3 MD4File.3   md4.3 MD4FileChunk.3
 MLINKS+=md4.3 MD4Data.3
@@ -59,10 +57,6 @@ CFLAGS+= -DRMD160_ASM
 ACFLAGS+= -DELF -Wa,--noexecstack
 .endif
 
-md2hl.c: mdXhl.c
-   (echo '#define LENGTH 16'; \
-   sed -e 's/mdX/md2/g' -e 's/MDX/MD2/g' ${.ALLSRC}) > ${.TARGET}
-
 md4hl.c: mdXhl.c
(echo '#define LENGTH 16'; \
sed -e 's/mdX/md4/g' -e 's/MDX/MD4/g' ${.ALLSRC}) > ${.TARGET}
@@ -105,16 +99,6 @@ md${i}.3: ${.CURDIR}/mdX.3
cat ${.CURDIR}/md${i}.copyright >> ${.TARGET}
 .endfor
 
-md2.ref:
-   echo 'MD2 test suite:' > ${.TARGET}
-   @echo 'MD2 ("") = 8350e5a3e24c153df2275c9f80692773' >> ${.TARGET}
-   @echo 'MD2 ("a") = 32ec01ec4a6dac72c0ab96fb34c0b5d1' >> ${.TARGET}
-   @echo 'MD2 ("abc") = da853b0d3f88d99b30283a69e6ded6bb' >> ${.TARGET}
-   @echo 'MD2 ("message digest") = ab4f496bfb2a530b219ff33031fe06b0' >> 
${.TARGET}
-   @echo 'MD2 ("abcdefghijklmnopqrstuvwxyz") = 
4e8ddff3650292ab5a4108c3aa47940b' >> ${.TARGET}
-   @echo 'MD2 
("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789") = 
da33def2a42df13975352846c30338cd' >> ${.TARGET}
-   @echo 'MD2 
("12345678901234567890123456789012345678901234567890123456789012345678901234567890")
 = d5976f79d83d3a0dc9806c3c66f3efd8' >> ${.TARGET}
-
 md4.ref:
echo 'MD4 test suite:' > ${.TARGET}
@echo 'MD4 ("") = 31d6cfe0d16ae931b73c59d7e0c089c0' >> ${.TARGET}
@@ -205,12 +189,9 @@ rmd160.ref:
@echo 'RIPEMD160 
("12345678901234567890123456789012345678901234567890123456789012345678901234567890")
 =' \
'9b752e45573d4b39f4dbd3323cab82bf63326bfb' >> ${.TARGET}
 
-test:  md2.ref md4.ref md5.ref sha0.ref rmd160.ref sha1.ref sha256.ref 
sha512.ref
+test:  md4.ref md5.ref sha0.ref rmd160.ref sha1.ref sha256.ref sha512.ref
@${ECHO} if any of these test fail, the code produces wrong results
@${ECHO} and should NOT be used.
-   ${CC} ${CFLAGS} ${LDFLAGS} -DMD=2 -o mddriver ${.CURDIR}/mddriver.c 
./libmd.a
-   ./mddriver | cmp md2.ref -
-   @${ECHO} MD2 passed test
${CC} ${CFLAGS} ${LDFLAGS} -DMD=4 -o mddriver ${.CURDIR}/mddriver.c 
libmd.a
./mddriver | cmp md4.ref -
@${ECHO} MD4 passed test

Modified: head/lib/libmd/mdX.3
==
--- head/lib/libmd/mdX.3Sat Apr 28 00:12:23 2012(r234745)
+++ head/lib/libmd/mdX.3Sat Apr 28 02:48:51 2012(r234746)
@@ -52,8 +52,7 @@ This net result is a
 .Dq fingerprint
 of the input-data, which does not disclose the actual input.
 .Pp
-MD2 is the slowest, MD4 is the fastest and MD5 is somewhere in the middle.
-MD2 can only be used for Privacy-Enhanced Mail.
+MD

svn commit: r235794 - head/contrib/gcc

2012-05-22 Thread David E. O'Brien
Author: obrien
Date: Tue May 22 17:11:18 2012
New Revision: 235794
URL: http://svn.freebsd.org/changeset/base/235794

Log:
  Record that r235793 (-objc) has been merged from vendor/gcc into HEAD.

Modified:
Directory Properties:
  head/contrib/gcc/   (props changed)
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r235797 - head/contrib/gcc

2012-05-22 Thread David E. O'Brien
Author: obrien
Date: Tue May 22 18:18:06 2012
New Revision: 235797
URL: http://svn.freebsd.org/changeset/base/235797

Log:
  Do not incorrectly warn when printing a quad_t using "%qd" on 64-bit 
platforms.

Modified:
  head/contrib/gcc/c-format.c

Modified: head/contrib/gcc/c-format.c
==
--- head/contrib/gcc/c-format.c Tue May 22 17:44:01 2012(r235796)
+++ head/contrib/gcc/c-format.c Tue May 22 18:18:06 2012(r235797)
@@ -287,7 +287,11 @@ static const format_length_info printf_l
 {
   { "h", FMT_LEN_h, STD_C89, "hh", FMT_LEN_hh, STD_C99 },
   { "l", FMT_LEN_l, STD_C89, "ll", FMT_LEN_ll, STD_C9L },
+#ifdef __LP64__
+  { "q", FMT_LEN_l, STD_EXT, NULL, 0, 0 },
+#else
   { "q", FMT_LEN_ll, STD_EXT, NULL, 0, 0 },
+#endif
   { "L", FMT_LEN_L, STD_C89, NULL, 0, 0 },
   { "z", FMT_LEN_z, STD_C99, NULL, 0, 0 },
   { "Z", FMT_LEN_z, STD_EXT, NULL, 0, 0 },
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r235865 - head/contrib/gcc

2012-05-23 Thread David E. O'Brien
Author: obrien
Date: Wed May 23 23:43:55 2012
New Revision: 235865
URL: http://svn.freebsd.org/changeset/base/235865

Log:
  Revert r235797.  GCC's mis-assumptions has led to incorrect usage of
  "%q[diouxX]" within FreeBSD sources.

Modified:
  head/contrib/gcc/c-format.c

Modified: head/contrib/gcc/c-format.c
==
--- head/contrib/gcc/c-format.c Wed May 23 21:48:49 2012(r235864)
+++ head/contrib/gcc/c-format.c Wed May 23 23:43:55 2012(r235865)
@@ -287,11 +287,7 @@ static const format_length_info printf_l
 {
   { "h", FMT_LEN_h, STD_C89, "hh", FMT_LEN_hh, STD_C99 },
   { "l", FMT_LEN_l, STD_C89, "ll", FMT_LEN_ll, STD_C9L },
-#ifdef __LP64__
-  { "q", FMT_LEN_l, STD_EXT, NULL, 0, 0 },
-#else
   { "q", FMT_LEN_ll, STD_EXT, NULL, 0, 0 },
-#endif
   { "L", FMT_LEN_L, STD_C89, NULL, 0, 0 },
   { "z", FMT_LEN_z, STD_C99, NULL, 0, 0 },
   { "Z", FMT_LEN_z, STD_EXT, NULL, 0, 0 },
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


  1   2   >