Re: fontconfig-user.html location wrong in man pages

2015-07-13 Thread Matthieu Herrb
On Mon, Jul 13, 2015 at 07:59:00PM -0500, Chris Bennett wrote:
> After reading several man pages like fc-scan, etc.
> I found at the bottom:
> 
> The fontconfig user's guide, in HTML format:
> /usr/share/doc/fontconfig/fontconfig-user.html.
> 
> This is not the correct location, which is
> /usr/X11R6/share/doc/fontconfig/fontconfig-user.html
> 
> OK?

No. I prefer to avoid this kind of local changes. They are painful to
maintain with CVS.

Either make that path configurable and let configure expand it, or do
some substituions in the OpenBSD makefile wrapper.

> 
> Chris
> 
> 
> Index: fc-cache.1
> ===
> RCS file: /cvs/xenocara/dist/fontconfig/fc-cache/fc-cache.1,v
> retrieving revision 1.2
> diff -u -p -r1.2 fc-cache.1
> --- fc-cache.19 Mar 2013 13:58:47 -   1.2
> +++ fc-cache.114 Jul 2015 00:42:03 -
> @@ -77,7 +77,7 @@ appropriate fonts.
>  \fBfc-scan\fR(1)
>  .PP
>  The fontconfig user's guide, in HTML format:
> -\fI/usr/share/doc/fontconfig/fontconfig-user.html\fR\&.
> +\fI/usr/X11R6/share/doc/fontconfig/fontconfig-user.html\fR\&.
>  .SH "AUTHOR"
>  .PP
>  This manual page was written by Keith Packard
> Index: fc-cache.sgml
> ===
> RCS file: /cvs/xenocara/dist/fontconfig/fc-cache/fc-cache.sgml,v
> retrieving revision 1.2
> diff -u -p -r1.2 fc-cache.sgml
> --- fc-cache.sgml 9 Mar 2013 13:58:47 -   1.2
> +++ fc-cache.sgml 14 Jul 2015 00:43:16 -
> @@ -198,7 +198,7 @@ manpage.1: manpage.sgml
>  
>  
>  The fontconfig user's guide, in HTML format:
> -  
> /usr/share/doc/fontconfig/fontconfig-user.html.
> +  
> /usr/X11R6/share/doc/fontconfig/fontconfig-user.html.
>  
>   
>
> Index: fc-cat.1
> ===
> RCS file: /cvs/xenocara/dist/fontconfig/fc-cat/fc-cat.1,v
> retrieving revision 1.1.1.1
> diff -u -p -r1.1.1.1 fc-cat.1
> --- fc-cat.1  9 Mar 2013 13:34:09 -   1.1.1.1
> +++ fc-cat.1  14 Jul 2015 00:43:48 -
> @@ -39,7 +39,7 @@ Show version of the program and exit.
>  \fBfc-scan\fR(1)
>  .PP
>  The fontconfig user's guide, in HTML format:
> -\fI/usr/share/doc/fontconfig/fontconfig-user.html\fR\&.
> +\fI/usr/X11R6/share/doc/fontconfig/fontconfig-user.html\fR\&.
>  .SH "AUTHOR"
>  .PP
>  This manual page was written by Patrick Lam \&.
> Index: fc-cat.sgml
> ===
> RCS file: /cvs/xenocara/dist/fontconfig/fc-cat/fc-cat.sgml,v
> retrieving revision 1.1.1.1
> diff -u -p -r1.1.1.1 fc-cat.sgml
> --- fc-cat.sgml   9 Mar 2013 13:34:09 -   1.1.1.1
> +++ fc-cat.sgml   14 Jul 2015 00:43:59 -
> @@ -140,7 +140,7 @@ manpage.1: manpage.sgml
>  
>  
>  The fontconfig user's guide, in HTML format:
> -  
> /usr/share/doc/fontconfig/fontconfig-user.html.
> +  
> /usr/X11R6/share/doc/fontconfig/fontconfig-user.html.
>  
>   
>
> Index: fc-list.1
> ===
> RCS file: /cvs/xenocara/dist/fontconfig/fc-list/fc-list.1,v
> retrieving revision 1.2
> diff -u -p -r1.2 fc-list.1
> --- fc-list.1 18 May 2014 10:33:05 -  1.2
> +++ fc-list.1 14 Jul 2015 00:44:27 -
> @@ -69,7 +69,7 @@ fonts.
>  \fBfc-scan\fR(1)
>  .PP
>  The fontconfig user's guide, in HTML format:
> -\fI/usr/share/doc/fontconfig/fontconfig-user.html\fR\&.
> +\fI/usr/X11R6/share/doc/fontconfig/fontconfig-user.html\fR\&.
>  .SH "AUTHOR"
>  .PP
>  This manual page was written by Keith Packard
> Index: fc-list.sgml
> ===
> RCS file: /cvs/xenocara/dist/fontconfig/fc-list/fc-list.sgml,v
> retrieving revision 1.2
> diff -u -p -r1.2 fc-list.sgml
> --- fc-list.sgml  18 May 2014 10:33:05 -  1.2
> +++ fc-list.sgml  14 Jul 2015 00:44:54 -
> @@ -197,7 +197,7 @@ manpage.1: manpage.sgml
>  
>  
>  The fontconfig user's guide, in HTML format:
> -  
> /usr/share/doc/fontconfig/fontconfig-user.html.
> +  
> /usr/X11R6/share/doc/fontconfig/fontconfig-user.html.
>  
>   
>
> Index: fc-match.1
> ===
> RCS file: /cvs/xenocara/dist/fontconfig/fc-match/fc-match.1,v
> retrieving revision 1.1.1.1
> diff -u -p -r1.1.1.1 fc-match.1
> --- fc-match.19 Mar 2013 13:34:26 -   1.1.1.1
> +++ fc-match.114 Jul 2015 00:45:23 -
> @@ -68,7 +68,7 @@ is displayed for matching fonts.
>  \fBfc-scan\fR(1)
>  .PP
>  The fontconfig user's guide, in HTML format:
> -\fI/usr/share/doc/fontconfig/fontconfig-user.html\fR\&.
> +\fI/usr/X11R6/share/doc/fontconfig/fontconfig-user.html\fR\&.
>  .SH "AUTHOR"
>  .PP
>  This manual page was updated by Patrick Lam \&.
> Index: fc-match.sgml
> ===
> RCS file: /cvs/xenocara/dist/fontconfig/fc-match/

Re: unwritable PKG_CACHE directory

2015-07-13 Thread Marc Espie
On Mon, Jul 13, 2015 at 12:21:07PM -0600, Dale Lindskog wrote:
> On Mon, 13 Jul 2015, li...@wrant.com wrote:
> 
> > > I object to the "silent" part... if you're trying to actually use 
> > > PKG_CACHE
> > > then, having it fail silently and then discovering several GB later that 
> > > oops,
> > > it didn't save anything anywhere looks like a huge mistake.
> > > 
> > > But I'll try to make the error message be completely explicit.
> > 
> > http://marc.info/?l=openbsd-cvs&m=143671276012679
> > 
> > Thank you, Marc.
> > 
> > http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.sbin/pkg_add/OpenBSD/PackageRepository.pm.diff?r1=1.113&r2=1.114
> > 
> 
> Thanks Marc, t I disagree that pkg_add should "always error outwhen 
> PKG_CACHE is unwritable.  Specifically, when pkg_add is invoked the -s 
> option, no package is copied to the package cache even if it is writable.
> 
> Unless you think that pkg_add should always be run by root?  -- Dale

For fuck's sake, undefining PKG_CACHE if you want to run things as non-root
is easy enough. Stop talking crap.

It's simple. PKG_CACHE is a "parameter" to pkg_add.   If you run other options,
like -n or -s, there is an obvious interface conflict. What should pkg_add
obey ?

I will err on the side of KEEPING THINGS SIMPLE. If PKG_CACHE is defined,
pkg_add will obey it. Don't want PKG_CACHE ? unset it while running pkg_add
with those options. That way, I don't have to put more tests in there.



fontconfig-user.html location wrong in man pages

2015-07-13 Thread Chris Bennett
After reading several man pages like fc-scan, etc.
I found at the bottom:

The fontconfig user's guide, in HTML format:
/usr/share/doc/fontconfig/fontconfig-user.html.

This is not the correct location, which is
/usr/X11R6/share/doc/fontconfig/fontconfig-user.html

OK?

Chris


Index: fc-cache.1
===
RCS file: /cvs/xenocara/dist/fontconfig/fc-cache/fc-cache.1,v
retrieving revision 1.2
diff -u -p -r1.2 fc-cache.1
--- fc-cache.1  9 Mar 2013 13:58:47 -   1.2
+++ fc-cache.1  14 Jul 2015 00:42:03 -
@@ -77,7 +77,7 @@ appropriate fonts.
 \fBfc-scan\fR(1)
 .PP
 The fontconfig user's guide, in HTML format:
-\fI/usr/share/doc/fontconfig/fontconfig-user.html\fR\&.
+\fI/usr/X11R6/share/doc/fontconfig/fontconfig-user.html\fR\&.
 .SH "AUTHOR"
 .PP
 This manual page was written by Keith Packard
Index: fc-cache.sgml
===
RCS file: /cvs/xenocara/dist/fontconfig/fc-cache/fc-cache.sgml,v
retrieving revision 1.2
diff -u -p -r1.2 fc-cache.sgml
--- fc-cache.sgml   9 Mar 2013 13:58:47 -   1.2
+++ fc-cache.sgml   14 Jul 2015 00:43:16 -
@@ -198,7 +198,7 @@ manpage.1: manpage.sgml
 
 
 The fontconfig user's guide, in HTML format:
-  
/usr/share/doc/fontconfig/fontconfig-user.html.
+  
/usr/X11R6/share/doc/fontconfig/fontconfig-user.html.
 
  
   
Index: fc-cat.1
===
RCS file: /cvs/xenocara/dist/fontconfig/fc-cat/fc-cat.1,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 fc-cat.1
--- fc-cat.19 Mar 2013 13:34:09 -   1.1.1.1
+++ fc-cat.114 Jul 2015 00:43:48 -
@@ -39,7 +39,7 @@ Show version of the program and exit.
 \fBfc-scan\fR(1)
 .PP
 The fontconfig user's guide, in HTML format:
-\fI/usr/share/doc/fontconfig/fontconfig-user.html\fR\&.
+\fI/usr/X11R6/share/doc/fontconfig/fontconfig-user.html\fR\&.
 .SH "AUTHOR"
 .PP
 This manual page was written by Patrick Lam \&.
Index: fc-cat.sgml
===
RCS file: /cvs/xenocara/dist/fontconfig/fc-cat/fc-cat.sgml,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 fc-cat.sgml
--- fc-cat.sgml 9 Mar 2013 13:34:09 -   1.1.1.1
+++ fc-cat.sgml 14 Jul 2015 00:43:59 -
@@ -140,7 +140,7 @@ manpage.1: manpage.sgml
 
 
 The fontconfig user's guide, in HTML format:
-  
/usr/share/doc/fontconfig/fontconfig-user.html.
+  
/usr/X11R6/share/doc/fontconfig/fontconfig-user.html.
 
  
   
Index: fc-list.1
===
RCS file: /cvs/xenocara/dist/fontconfig/fc-list/fc-list.1,v
retrieving revision 1.2
diff -u -p -r1.2 fc-list.1
--- fc-list.1   18 May 2014 10:33:05 -  1.2
+++ fc-list.1   14 Jul 2015 00:44:27 -
@@ -69,7 +69,7 @@ fonts.
 \fBfc-scan\fR(1)
 .PP
 The fontconfig user's guide, in HTML format:
-\fI/usr/share/doc/fontconfig/fontconfig-user.html\fR\&.
+\fI/usr/X11R6/share/doc/fontconfig/fontconfig-user.html\fR\&.
 .SH "AUTHOR"
 .PP
 This manual page was written by Keith Packard
Index: fc-list.sgml
===
RCS file: /cvs/xenocara/dist/fontconfig/fc-list/fc-list.sgml,v
retrieving revision 1.2
diff -u -p -r1.2 fc-list.sgml
--- fc-list.sgml18 May 2014 10:33:05 -  1.2
+++ fc-list.sgml14 Jul 2015 00:44:54 -
@@ -197,7 +197,7 @@ manpage.1: manpage.sgml
 
 
 The fontconfig user's guide, in HTML format:
-  
/usr/share/doc/fontconfig/fontconfig-user.html.
+  
/usr/X11R6/share/doc/fontconfig/fontconfig-user.html.
 
  
   
Index: fc-match.1
===
RCS file: /cvs/xenocara/dist/fontconfig/fc-match/fc-match.1,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 fc-match.1
--- fc-match.1  9 Mar 2013 13:34:26 -   1.1.1.1
+++ fc-match.1  14 Jul 2015 00:45:23 -
@@ -68,7 +68,7 @@ is displayed for matching fonts.
 \fBfc-scan\fR(1)
 .PP
 The fontconfig user's guide, in HTML format:
-\fI/usr/share/doc/fontconfig/fontconfig-user.html\fR\&.
+\fI/usr/X11R6/share/doc/fontconfig/fontconfig-user.html\fR\&.
 .SH "AUTHOR"
 .PP
 This manual page was updated by Patrick Lam \&.
Index: fc-match.sgml
===
RCS file: /cvs/xenocara/dist/fontconfig/fc-match/fc-match.sgml,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 fc-match.sgml
--- fc-match.sgml   9 Mar 2013 13:34:26 -   1.1.1.1
+++ fc-match.sgml   14 Jul 2015 00:45:48 -
@@ -188,7 +188,7 @@ output is requested.
 
 
 The fontconfig user's guide, in HTML format:
-  
/usr/share/doc/fontconfig/fontconfig-user.html.
+  
/usr/X11R6/share/doc/fontconfig/fontconfig-user.html.
 
  
   
Index: fc-pattern.1
===
RCS file: /cvs/xenocara/dist/fontconfig/fc-pattern/fc-patt

vlc, gobject and -Wl,nodelete

2015-07-13 Thread Stuart Henderson
On 2015/07/13 13:48, Stuart Henderson wrote:
> CVSROOT:  /cvs
> Module name:  ports
> Changes by:   st...@cvs.openbsd.org   2015/07/13 13:48:13
> 
> Added files:
>   x11/vlc/patches: patch-bin_Makefile_am 
> 
> Log message:
> Force LD_PRELOAD=/usr/local/lib/libgobject-2.0.so when running vlc-cache-gen,
> working around an intermittent crash during build. ok brad@ aja@ robert@
> 
> "Some of the plugins are linked (indirectly) to gobject. During the generation
> of the plugin cache, these plugins are loaded and unloaded again. In some
> circumstances this causes gobject to be unloaded at the wrong time and
> vlc-cache-gen crashes." (debian bug 752544)

This was supposed to have been fixed in glib2 (gobject) upstream by using
-Wl,nodelete when linking gobject:

$ LD_DEBUG=1 ./vlc-cache-gen -f ../modules/ 2>&1 | grep -i nodel
objname /usr/lib/libpthread.so.19.0 is nodelete
objname /usr/local/lib/libgobject-2.0.so.4200.1 is nodelete

But it doesn't appear to be working here.

$ LD_DEBUG=1 ./vlc-cache-gen -f ../modules/ 2>&1 | grep -i unload.*libgobject | 
uniq -c
  34 unload_shlib called on /usr/local/lib/libgobject-2.0.so.4200.1

Does anyone have an idea why nodelete doesn't seem to be working here?



Re: unwritable PKG_CACHE directory

2015-07-13 Thread Dale Lindskog
Sorry!  My email was garbled: a combination of a failure to refresh the 
screen and no morning coffee.  Here it is again:

I disagree that pkg_add should "always error out when PKG_CACHE is 
unwritable".  Specifically, when pkg_add is invoked with the -s option, no 
package is copied to the package cache even if it is writable.

Unless you think that pkg_add should always be run by root?  -- Dale



Re: mips64_send_ipi() can block

2015-07-13 Thread Miod Vallat
> Function mips64_send_ipi() will block if the target core has a pending
> IPI request. This will degrade performance in a system that has more
> than a few cores and where there is a heavy IPI load.
> 
> The blocking can be avoided by coalescing requests. The mips64 code
> should handle this just fine. The only place where exact,
> non-coalescing IPI delivery is needed is the rendezvous mechanism, but
> there invocations are serialized by the rendezvous mutex anyway.
> 
> The order of the sending and receiving steps is important. I hope that
> I got it right.

Your diff looks correct at first glance. I'm giving it some beating on
an MP sgi system at the moment.

Miod



Re: unwritable PKG_CACHE directory

2015-07-13 Thread Dale Lindskog
On Mon, 13 Jul 2015, li...@wrant.com wrote:

> > I object to the "silent" part... if you're trying to actually use PKG_CACHE
> > then, having it fail silently and then discovering several GB later that 
> > oops,
> > it didn't save anything anywhere looks like a huge mistake.
> > 
> > But I'll try to make the error message be completely explicit.
> 
> http://marc.info/?l=openbsd-cvs&m=143671276012679
> 
> Thank you, Marc.
> 
> http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.sbin/pkg_add/OpenBSD/PackageRepository.pm.diff?r1=1.113&r2=1.114
> 

Thanks Marc, t I disagree that pkg_add should "always error outwhen 
PKG_CACHE is unwritable.  Specifically, when pkg_add is invoked the -s 
option, no package is copied to the package cache even if it is writable.

Unless you think that pkg_add should always be run by root?  -- Dale



[patch] Defunct companies in products.html

2015-07-13 Thread Michael McConville
ping

On Fri, Jul 10, 2015 at 12:11:43AM -0400, Michael McConville wrote:
> On Thu, Jul 09, 2015 at 11:51:23PM -0400, Michael McConville wrote:
> > Core Systems' website has been down for a while, and it seems that
> > they no may longer exist. Can anyone confirm or deny?
> 
> Also, MIPS-Informatics seems to be serving World Cup updates these days.
> 
> 
> Index: products.html
> ===
> RCS file: /cvs/www/products.html,v
> retrieving revision 1.97
> diff -u -p -r1.97 products.html
> --- products.html 2 Jul 2015 05:49:04 -   1.97
> +++ products.html 10 Jul 2015 04:04:15 -
> @@ -105,16 +105,6 @@ href="http://www.opensound.com/openbsd.h
>  for OpenBSD/i386 3.x
>  
>  
> -Core Systems
> -http://www.core.dk";>Core Systems sells  -href="http://www.core.dk/products/insite/index_en.html";>InSite, an
> -easy to use, server-side web statistics utility, for OpenBSD/i386.
> -InSite is similar to products such as WebTrends, but can also be
> -configured through a web interface to generate reports on the fly, using
> -very little CPU time. (Upon request, Core may be able to provide InSite
> -for platforms other then i386.)
> -
> -
>  Software2Go Motif (i386 
> and SPARC only)
>  http://www.apps2go.com";>Software2Go, LLC has Motif 2.1.20
>  Development and Runtime toolkits for OpenBSD.
> @@ -152,13 +142,6 @@ Ordering, 817-431-8775 (phone/fax)
>  http://www.interact.se";>Interact
>  Lulea, Sweden.
>  
> -
> -Spain
> -
> -http://www.mips-informatics.com";>MIPS-Informatics
> -Sabadell, Spain.
> -
> -
>  
>  
>  
> 



mips64_send_ipi() can block

2015-07-13 Thread Visa Hankala
Function mips64_send_ipi() will block if the target core has a pending
IPI request. This will degrade performance in a system that has more
than a few cores and where there is a heavy IPI load.

The blocking can be avoided by coalescing requests. The mips64 code
should handle this just fine. The only place where exact,
non-coalescing IPI delivery is needed is the rendezvous mechanism, but
there invocations are serialized by the rendezvous mutex anyway.

The order of the sending and receiving steps is important. I hope that
I got it right.


Index: arch/mips64/mips64/ipifuncs.c
===
RCS file: src/sys/arch/mips64/mips64/ipifuncs.c,v
retrieving revision 1.10
diff -u -p -r1.10 ipifuncs.c
--- arch/mips64/mips64/ipifuncs.c   20 Apr 2015 19:08:52 -  1.10
+++ arch/mips64/mips64/ipifuncs.c   13 Jul 2015 13:18:12 -
@@ -98,15 +98,12 @@ mips64_ipi_intr(void *arg)
 
KASSERT (cpuid == cpu_number());
 
-   /* figure out which ipi are pending */
-   pending_ipis = ipi_mailbox[cpuid];
/* clear ipi interrupt */
hw_ipi_intr_clear(cpuid);
+   /* get and clear pending ipis */
+   pending_ipis = atomic_swap_uint(&ipi_mailbox[cpuid], 0);

if (pending_ipis > 0) {
-   /* clear pending ipi, since we're about to handle them */
-   atomic_clearbits_int(&ipi_mailbox[cpuid], pending_ipis);
-
for (bit = 0; bit < MIPS64_NIPIS; bit++)
if (pending_ipis & (1UL << bit))
(*ipifuncs[bit])();
@@ -128,7 +125,7 @@ mips64_send_ipi(unsigned int cpuid, unsi
panic("mips_send_ipi: CPU %ld not running", cpuid);
 #endif
 
-   atomic_wait_and_setbits_int(&ipi_mailbox[cpuid], ipimask);
+   atomic_setbits_int(&ipi_mailbox[cpuid], ipimask);
 
hw_ipi_intr_set(cpuid);
 }



[PATCH] Enable -f in ndp(8)

2015-07-13 Thread Dimitris Papastamos
Hi,

I noticed -f in ndp(8) did nothing at all so I've enabled it and
documented the file syntax in the man page.

===
RCS file: /cvs/src/usr.sbin/ndp/ndp.8,v
retrieving revision 1.33
diff -u -p -r1.33 ndp.8
--- ndp.8   3 Sep 2014 10:39:41 -   1.33
+++ ndp.8   13 Jul 2015 13:02:49 -
@@ -122,6 +122,12 @@ Delete the specified NDP entry.
 .It Fl f Ar filename
 Parse the file specified by
 .Ar filename .
+Entries in the file should be of the form:
+.Bd -ragged -offset indent -compact
+.Ar nodename etheraddr
+.Op Ar temp
+.Op Ar proxy
+.Ed
 .It Fl H
 Harmonize consistency between the routing table and the default router
 list; install the top entry of the list into the kernel routing table.
Index: ndp.c
===
RCS file: /cvs/src/usr.sbin/ndp/ndp.c,v
retrieving revision 1.61
diff -u -p -r1.61 ndp.c
--- ndp.c   3 Jun 2015 08:10:53 -   1.61
+++ ndp.c   13 Jul 2015 13:02:49 -
@@ -241,6 +241,8 @@ main(int argc, char *argv[])
}
delete(arg);
break;
+   case 'f':
+   exit(file(arg) ? 1 : 0);
case 'p':
if (argc != 0) {
usage();



Re: tcpdump -A: really printable characters

2015-07-13 Thread ludovic coues
2015-07-13 13:14 GMT+02:00  :
> Ignore this if it wastes time, what is 'vis' and is it platform /
> architecture specific? Rather means to get what it was planned to
> achieve probably..
>
$ man vis
[...]
NAME
vis ─ display non-printable characters in a visual format


-- 

Cordialement, Coues Ludovic
+336 148 743 42



Re: unwritable PKG_CACHE directory

2015-07-13 Thread lists
> I object to the "silent" part... if you're trying to actually use PKG_CACHE
> then, having it fail silently and then discovering several GB later that oops,
> it didn't save anything anywhere looks like a huge mistake.
> 
> But I'll try to make the error message be completely explicit.

http://marc.info/?l=openbsd-cvs&m=143671276012679

Thank you, Marc.

http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.sbin/pkg_add/OpenBSD/PackageRepository.pm.diff?r1=1.113&r2=1.114



Re: [patch] xlocale part 7: Switch _toupper_tab_ from global variable to per-thread function

2015-07-13 Thread Sebastien Marie
On Mon, Jul 13, 2015 at 06:47:44AM -0400, vtamara wrote:
> I saw fine your patches, just I wonder why you didn't introduce isalnum_l,
> toupper_l and tolower_l and call them from isalnum, toupper and tolower, in
> this way I guess possible to get rid completely of _tolower_tab and
> _toupper_tab.

The _l variants will be introduced by another patch. I follow a simple
principe for patches: keep them as simples as possible.

This method augments the number of patches, but it should simplify the
reviewing (because my patches are proposed for review as any others
patches, and if no other openbsd developer tell ok, they won't be
commited). A drawback is the global view as a whole isn't too easy.

The current patch just resolv one problem: _toupper_tab_ is a global
variable, and it wouldn't be possible to copte with it in a world in
per-thread locale state. So I change it to a function to grab the
current locale state: it just resolv this problem, no more.

After that, for implementing toupper_l(), I will need to change the
prototype of _toupper_tab_(void) to _toupper_tab_(locale_t), and I will
rewrite toupper() to call toupper_l(). But it is another problem.

Eventually I could have directly integrate _toupper_tab_(locale_t)
function, but when I wrote this patch, I wasn't sure it will be the good
way.

About getting rid _toupper_tab (or _tolower_tab), I am not sure it will
be possible. Yes, if toupper() call toupper_l() there is no _toupper_tab
need here. But toupper_l() implementation will need
_toupper_tab(locale_t).

Regards.
-- 
Sebastien Marie



Re: tcpdump -A: really printable characters

2015-07-13 Thread lists
Historic overview of OpenBSD across platforms has always been intriguing
to say the least.

> I sent a mail to naddy mentioning that a long time ago (feels like 10
> years ago) we talked about using vis, but this would have made our

Ignore this if it wastes time, what is 'vis' and is it platform /
architecture specific? Rather means to get what it was planned to
achieve probably..

> tcpdump far too different from others.  Not that it is very similar,
> because of the baked-in privsep work.  Which reminds me... I have a
> diff to send out...

Could you draw some lines in the sand for people anticipating "tame"?



Re: sndiod hangs

2015-07-13 Thread Alexandre Ratchov
On Sat, Jul 11, 2015 at 02:23:03PM +0200, Mark Kettenis wrote:
> Every now and then sndiod hangs on me.  Usually I discover this as
> mplayer hangs while playing a video or hangs while opening the audio
> device on startup.  Restarting sndiod using the /etc/rc.d/sndiod
> script doesn't work; it blocks trying to stop the running sndiod.  I
> have to use kill -9 to get rid of it.
> 
> Happened again last night and I investigated a bit.  This was after I
> tried restarting it using /etc/rc.d/sndiod, but before resorting to
> kill -9.  Attaching with gdb revealed that it was stuck in poll(2)
> with the 2nd argument being 0 and the last argument being -1.  Since
> no file descriptors are being monitored and the timeout is infinite,
> the process just blocks forevere.

noemally it gets periodic SIGALRM which interrupt poll(2) with
EINTR.

> I did look at the file_list, and only the rsnd/0 file descriptor was
> on the list.  That probably corresponded to the mplayer that hung (and
> which I subsequently killed) as I had nothing else running that was
> doing audio output.  Obviously the sndiod polling code had decided not
> to poll for activity on rsnd/0, causing it to block as described
> above.

if there are no clients, rsnd/0 is supposed to be closed, very strange



Re: [patch] xlocale part 7: Switch _toupper_tab_ from global variable to per-thread function

2015-07-13 Thread vtamara
I saw fine your patches, just I wonder why you didn't introduce 
isalnum_l, toupper_l and tolower_l and call them from isalnum, toupper 
and tolower, in this way I guess possible to get rid completely of 
_tolower_tab and _toupper_tab.



El 2015-07-12 09:58, Sebastien Marie escribió:

Same as previous, but for _toupper_tab_.
--
Sebastien Marie

Index: b/include/ctype.h
===
--- a/include/ctype.h   2015-06-30 12:19:07.342557440 +0200
+++ b/include/ctype.h   2015-06-30 12:19:31.892786432 +0200
@@ -55,7 +55,7 @@

 extern const char  *_ctype_(void);
 extern const short *_tolower_tab_;
-extern const short *_toupper_tab_;
+extern const short *_toupper_tab_(void);

 #if defined(__GNUC__) || defined(_ANSI_LIBRARY)
 intisalnum(int);
@@ -165,7 +165,7 @@
 {
if ((unsigned int)_c > 255)
return (_c);
-   return ((_toupper_tab_ + 1)[_c]);
+   return ((_toupper_tab_() + 1)[_c]);
 }

 #if __BSD_VISIBLE || __ISO_C_VISIBLE >= 1999 || __POSIX_VISIBLE > 
200112 \

Index: b/lib/libc/gen/toupper_.c
===
--- a/lib/libc/gen/toupper_.c   2015-06-30 12:00:10.023193401 +0200
+++ b/lib/libc/gen/toupper_.c   2015-06-30 12:19:31.892786432 +0200
@@ -46,13 +46,11 @@
0xf8,   0xf9,   0xfa,   0xfb,   0xfc,   0xfd,   0xfe,   0xff
 };

-const short *_toupper_tab_ = _C_toupper_;
-
 #undef toupper
 int
 toupper(int c)
 {
if ((unsigned int)c > 255)
return(c);
-   return((_toupper_tab_ + 1)[c]);
+   return((_toupper_tab_() + 1)[c]);
 }
Index: b/lib/libc/locale/runeglue.c
===
--- a/lib/libc/locale/runeglue.c2015-06-30 12:19:07.352556508 +0200
+++ b/lib/libc/locale/runeglue.c2015-06-30 12:19:31.902785988 +0200
@@ -119,13 +119,9 @@
 {
if (locale->lc_ctype->rl_tabs != NULL) {
/* LINTED const cast */
-   _toupper_tab_ = (const short *)
-   &(locale->lc_ctype->rl_tabs->toupper_tab);
-   /* LINTED const cast */
_tolower_tab_ = (const short *)
&(locale->lc_ctype->rl_tabs->tolower_tab);
} else {
-   _toupper_tab_ = _C_toupper_;
_tolower_tab_ = _C_tolower_;
}
 }
Index: b/lib/libc/locale/xlocale.c
===
--- a/lib/libc/locale/xlocale.c 2015-06-30 12:19:25.942714494 +0200
+++ b/lib/libc/locale/xlocale.c 2015-06-30 12:19:31.902785988 +0200
@@ -41,3 +41,15 @@
else
return (_C_ctype_);
 }
+
+/* exported via ctype.h */
+const short *
+_toupper_tab_()
+{
+   locale_t loc = _current_locale();
+
+   if (loc->lc_ctype->rl_tabs != NULL)
+   return (loc->lc_ctype->rl_tabs->toupper_tab);
+   else
+   return (_C_toupper_);
+}