Re: wprintf and friends
On Fri, Apr 22, 2011 at 03:50:28PM +0200, Mark Kettenis wrote: === RCS file: /cvs/src/lib/libc/shlib_version,v retrieving revision 1.128 diff -u -p -r1.128 shlib_version @@ -1,4 +1,4 @@ -major=58 +major=59 minor=1 # note: If changes were made to include/thread_private.h or if system # calls were added/changed then libpthread must also be updated. Since you're only adding new functions, you should bump the minor instead of the major. Also, note that if you do bump the major, you should reset the minor to 0. Index: gnu/lib/libstdc++-v3/shlib_version === RCS file: /cvs/src/gnu/lib/libstdc++-v3/shlib_version,v retrieving revision 1.1 diff -u -p -r1.1 shlib_version @@ -1,2 +1,2 @@ -major=50 +major=51 minor=0 Here, bumping the major is probably the right thing to do, since the availability of wprintf is likely to affect the ABI through autoconf magic that is difficult to track. Thanks, here's a proper bump diff: Index: lib/libc/shlib_version === RCS file: /cvs/src/lib/libc/shlib_version,v retrieving revision 1.128 diff -u -p -r1.128 shlib_version @@ -1,4 +1,4 @@ major=58 -minor=1 +minor=2 # note: If changes were made to include/thread_private.h or if system # calls were added/changed then libpthread must also be updated. Index: gnu/lib/libstdc++-v3/shlib_version === RCS file: /cvs/src/gnu/lib/libstdc++-v3/shlib_version,v retrieving revision 1.1 diff -u -p -r1.1 shlib_version @@ -1,2 +1,2 @@ -major=50 +major=51 minor=0
Re: wprintf and friends
X-Envelope-From: s...@stsp.name Date: Fri, 22 Apr 2011 15:54:32 +0200 From: Stefan Sperling s...@openbsd.org Cc: tech@openbsd.org Mail-Followup-To: Mark Kettenis mark.kette...@xs4all.nl, tech@openbsd.org X-Scanned-By: MIMEDefang_at_IN-Berlin_e.V. on 192.109.42.8 List-Owner: mailto:owner-t...@openbsd.org X-Loop: tech@openbsd.org Sender: owner-t...@openbsd.org X-XS4ALL-DNSBL-Checked: mxdrop225.xs4all.nl checked 192.43.244.163 against DNS blacklists X-CNFS-Analysis: v=1.1 cv=0zc6fmG9YcuPB4Yp6G+9JUp7sX0X0uIJmZE+jPYAbEE= c=1 sm=0 a=wom5GMh1gUkA:10 a=ICHTHJBzbYQA:10 a=kj9zAlcOel0A:10 a=A3duGc4wJ8K8BtNzzvyz4A==:17 a=wpzRm42BFkQPQqV9ocMA:9 a=Ps3mTcVvHI0M6VU3s1wA:7 a=CjuIK1q_8ugA:10 a=A3duGc4wJ8K8BtNzzvyz4A==:117 X-Virus-Scanned: by XS4ALL Virus Scanner X-XS4ALL-Spam-Score: 0.0 () none X-XS4ALL-Spam: NO Envelope-To: mark.kette...@xs4all.nl On Fri, Apr 22, 2011 at 03:50:28PM +0200, Mark Kettenis wrote: === RCS file: /cvs/src/lib/libc/shlib_version,v retrieving revision 1.128 diff -u -p -r1.128 shlib_version @@ -1,4 +1,4 @@ -major=58 +major=59 minor=1 # note: If changes were made to include/thread_private.h or if system # calls were added/changed then libpthread must also be updated. Since you're only adding new functions, you should bump the minor instead of the major. Also, note that if you do bump the major, you should reset the minor to 0. Index: gnu/lib/libstdc++-v3/shlib_version === RCS file: /cvs/src/gnu/lib/libstdc++-v3/shlib_version,v retrieving revision 1.1 diff -u -p -r1.1 shlib_version @@ -1,2 +1,2 @@ -major=50 +major=51 minor=0 Here, bumping the major is probably the right thing to do, since the availability of wprintf is likely to affect the ABI through autoconf magic that is difficult to track. Thanks, here's a proper bump diff: Index: lib/libc/shlib_version === RCS file: /cvs/src/lib/libc/shlib_version,v retrieving revision 1.128 diff -u -p -r1.128 shlib_version @@ -1,4 +1,4 @@ major=58 -minor=1 +minor=2 # note: If changes were made to include/thread_private.h or if system # calls were added/changed then libpthread must also be updated. Index: gnu/lib/libstdc++-v3/shlib_version === RCS file: /cvs/src/gnu/lib/libstdc++-v3/shlib_version,v retrieving revision 1.1 diff -u -p -r1.1 shlib_version @@ -1,2 +1,2 @@ -major=50 +major=51 minor=0 With that change, the diff is ok kettenis@, assuming this is all done in coordination with the ports people
relayd rsession void pointer
Hi, Can we get rid of those casts in relayd by not declaring a void pointer for struct rsession? That way the compiler can do its job and enforce correct types. ok? bluhm Index: usr.sbin/relayd/relay.c === RCS file: /data/mirror/openbsd/cvs/src/usr.sbin/relayd/relay.c,v retrieving revision 1.133 diff -u -p -r1.133 relay.c --- usr.sbin/relayd/relay.c 12 Apr 2011 12:37:22 - 1.133 +++ usr.sbin/relayd/relay.c 22 Apr 2011 13:37:11 - @@ -907,7 +907,7 @@ void relay_write(struct bufferevent *bev, void *arg) { struct ctl_relay_event *cre = (struct ctl_relay_event *)arg; - struct rsession *con = (struct rsession *)cre-con; + struct rsession *con = cre-con; if (gettimeofday(con-se_tv_last, NULL) == -1) con-se_done = 1; if (con-se_done) @@ -936,7 +936,7 @@ void relay_read(struct bufferevent *bev, void *arg) { struct ctl_relay_event *cre = (struct ctl_relay_event *)arg; - struct rsession *con = (struct rsession *)cre-con; + struct rsession *con = cre-con; struct evbuffer *src = EVBUFFER_INPUT(bev); if (gettimeofday(con-se_tv_last, NULL) == -1) @@ -961,7 +961,7 @@ int relay_resolve(struct ctl_relay_event *cre, struct protonode *proot, struct protonode *pn) { - struct rsession *con = (struct rsession *)cre-con; + struct rsession *con = cre-con; char buf[IBUF_READ_SIZE], *ptr; int id; @@ -1028,7 +1028,7 @@ relay_resolve(struct ctl_relay_event *cr char * relay_expand_http(struct ctl_relay_event *cre, char *val, char *buf, size_t len) { - struct rsession *con = (struct rsession *)cre-con; + struct rsession *con = cre-con; struct relay*rlay = (struct relay *)con-se_relay; char ibuf[128]; @@ -1105,7 +1105,7 @@ int relay_handle_http(struct ctl_relay_event *cre, struct protonode *proot, struct protonode *pn, struct protonode *pk, int header) { - struct rsession *con = (struct rsession *)cre-con; + struct rsession *con = cre-con; char buf[IBUF_READ_SIZE], *ptr; int ret = PN_DROP, mark = 0; struct protonode*next; @@ -1221,7 +1221,7 @@ void relay_read_httpcontent(struct bufferevent *bev, void *arg) { struct ctl_relay_event *cre = (struct ctl_relay_event *)arg; - struct rsession *con = (struct rsession *)cre-con; + struct rsession *con = cre-con; struct evbuffer *src = EVBUFFER_INPUT(bev); size_t size; @@ -1256,7 +1256,7 @@ void relay_read_httpchunks(struct bufferevent *bev, void *arg) { struct ctl_relay_event *cre = (struct ctl_relay_event *)arg; - struct rsession *con = (struct rsession *)cre-con; + struct rsession *con = cre-con; struct evbuffer *src = EVBUFFER_INPUT(bev); char*line; long lval; @@ -1374,7 +1374,7 @@ void relay_read_http(struct bufferevent *bev, void *arg) { struct ctl_relay_event *cre = (struct ctl_relay_event *)arg; - struct rsession *con = (struct rsession *)cre-con; + struct rsession *con = cre-con; struct relay*rlay = (struct relay *)con-se_relay; struct protocol *proto = rlay-rl_proto; struct evbuffer *src = EVBUFFER_INPUT(bev); @@ -1672,7 +1672,7 @@ static int _relay_lookup_url(struct ctl_relay_event *cre, char *host, char *path, char *query, enum digest_type type) { - struct rsession *con = (struct rsession *)cre-con; + struct rsession *con = cre-con; struct protonode*proot, *pnv, pkv; char*val, *md = NULL; int ret = PN_FAIL; @@ -1726,7 +1726,7 @@ int relay_lookup_url(struct ctl_relay_event *cre, const char *str, enum digest_type type) { - struct rsession *con = (struct rsession *)cre-con; + struct rsession *con = cre-con; int i, j, dots; char*hi[RELAY_MAXLOOKUPLEVELS], *p, *pp, *c, ch; char ph[MAXHOSTNAMELEN]; @@ -1803,7 +1803,7 @@ relay_lookup_url(struct ctl_relay_event int relay_lookup_query(struct ctl_relay_event *cre) { - struct rsession *con = (struct rsession *)cre-con; + struct rsession *con = cre-con; struct protonode*proot, *pnv, pkv; char*val, *ptr; int ret; @@ -1846,7 +1846,7 @@ relay_lookup_query(struct ctl_relay_even int relay_lookup_cookie(struct ctl_relay_event *cre, const char *str) { - struct rsession *con = (struct rsession
Re: wprintf and friends
On 2011/04/22 16:55, Landry Breuil wrote: On Fri, Apr 22, 2011 at 04:04:29PM +0200, Mark Kettenis wrote: With that change, the diff is ok kettenis@, assuming this is all done in coordination with the ports people Since we did the bulk builds and stefan proactively fixed the affected ports, that's ok on porters' side... Build fallout yes, but we will need to look out for runtime fallout too. Users of the following in particular should keep alert after packages using the new libs are available. That said, the sooner the better: ok with me. audio/madplay audio/streamripper audio/vorbis-tools audio/xmms cad/geda-gaf cad/pcb comms/gnokii devel/arm-elf/newlib devel/boost devel/gettext education/verbiste emulators/mednafen games/enigma games/lbreakout2 games/xmoto graphics/libexif-gtk inputmethods/scim inputmethods/scim-anthy inputmethods/scim-hangul inputmethods/scim-pinyin inputmethods/scim-tables lang/gcc/3.3 mail/abook math/R misc/libutf8 misc/lifelines misc/mc net/cadaver net/gftp net/snort net/wol net/xchat print/epdfview print/lyx productivity/grisbi productivity/workrave security/ccrypt security/gnupg sysutils/e2fsprogs textproc/clucene textproc/hunspell textproc/opensp textproc/pinfo www/aria2 www/wml x11/gentoo x11/pekwm x11/roxterm x11/wxWidgets x11/xfe
Re: wprintf and friends
I'm happy with this as well. I think the libstdc++ is a good way to track i18n progress. When we implement enough of it, more code will activate. Even if we don't use it much directly wfscanf would be nice. My guess is that having both wfprintf and wfscanf will lead to working wide streams, for instance.
bsd.README: DOCDIR tweak
we could replace the example, but this seems simplest. any objections? jmc Index: bsd.README === RCS file: /cvs/src/share/mk/bsd.README,v retrieving revision 1.43 diff -u -r1.43 bsd.README --- bsd.README 12 Mar 2011 05:12:14 - 1.43 +++ bsd.README 22 Apr 2011 19:12:14 - @@ -183,7 +183,7 @@ LIBMODELibrary mode. [${NONBINMODE}] -DOCDIR Base path for system documentation (e.g. PSD, USD, etc.) +DOCDIR Base path for system documentation installation. [/usr/share/doc] DOCGRP Documentation group. [bin]
ncurses 5.7 update and define USE_SIGWINCH
Hi, I was troubleshooting issue with window resize in net/ekg. In the past it was working properly, but stopped. I figured out that breakage happened between OpenBSD 4.6 and 4.7, when ncurses was updated. I've recompiled ncurses with -DTRACE and and used it with very simple program to test (see screensize.c under url mentioned below). Comparing tracing of above code from OpenBSD 4.6 and OpenBSD 4.9 (-current) show that in the latest code function _nc_update_screensize() is not executed in doupdate() (lib/libcurses/tty/tty_update.c). It is executed however in OpenBSD 4.6. Reason is that USE_SIZECHANGE is defined as 0 (zero) bacause of following code (curses.priv.h from 4.9): #if HAVE_SIZECHANGE USE_SIGWINCH defined(SIGWINCH) #define USE_SIZECHANGE 1 #else #define USE_SIZECHANGE 0 #undef USE_SIGWINCH #define USE_SIGWINCH 0 #endif HAVE_SIZECHANGE is defined to 1 in OpenBSD 4.6 and 4.9, but USE_SIGWINCH is not defined to 1. In OpenBSD 4.6 only HAVE_SIZECHANGE was checked to set USE_SIZECHANGE to 1 (curses.priv.h from 4.6): #if HAVE_SIZECHANGE #define USE_SIZECHANGE 1 #else #undef USE_SIGWINCH #endif Is there any reason why USE_SIGWINCH is not defined to 1 in current OpenBSD (in ncurses_cfg.h)? You can find my debugging files under following location: http://www1.kucharski.name/pub/ekg/ - screensize.c -- code to test the issue - patches for libcurses which enable tracing and adds some additional logging - trace logs, so you can compare how ncurses on OpenBSD 4.6, unpatched 4.9 and with USE_SIGWINCH defined to 1 on 4.9 behave -- best regards q#
Re: ncurses 5.7 update and define USE_SIGWINCH
On Fri, Apr 22, 2011 at 01:33:14PM -0600, Theo de Raadt wrote: Is there any reason why USE_SIGWINCH is not defined to 1 in current OpenBSD (in ncurses_cfg.h)? Yes. Libraries should not use signals like that. We could start off by pointing out that the code it enables in curses is NOT SAFE. Ok. What options do I have to fix net/ekg? Compare it with mutt or irssi (they aren't affected by USE_SIGWINCH define) and leave libcurses as it is or is there any way to bring back behaviour from ncurses 5.2 to 5.7? -- best regards q#
Re: ncurses 5.7 update and define USE_SIGWINCH
Hi, On Fri, Apr 22, 2011 at 08:55:35PM +0100, Mikolaj Kucharski wrote: Ok. What options do I have to fix net/ekg? Compare it with mutt or irssi (they aren't affected by USE_SIGWINCH define) and leave libcurses as it is or is there any way to bring back behaviour from ncurses 5.2 to 5.7? You may have a look at www/snownews, from 2008-09-12 22:07. Martynas and I hacked a little bit (installing our own signal handler). This had been merged upstream to snownews later. Ciao, Kili
Re: ncurses 5.7 update and define USE_SIGWINCH
On Fri, Apr 22, 2011 at 10:08:59PM +0200, Matthias Kilian wrote: Hi, On Fri, Apr 22, 2011 at 08:55:35PM +0100, Mikolaj Kucharski wrote: Ok. What options do I have to fix net/ekg? Compare it with mutt or irssi (they aren't affected by USE_SIGWINCH define) and leave libcurses as it is or is there any way to bring back behaviour from ncurses 5.2 to 5.7? You may have a look at www/snownews, from 2008-09-12 22:07. Martynas and I hacked a little bit (installing our own signal handler). This had been merged upstream to snownews later. Problem is net/ekg handles SIGWINCH in the same way like www/snownews. That means both are affected by USE_SIGWINCH define to 0. Start snownews, open help window and resize the screen. -- best regards q#
PATCH: ACPI aml dereference diff
This diff creates a common aml_dereference function, please test on as many systems as possible and send dmesg Index: acpiprt.c === RCS file: /cvs/src/sys/dev/acpi/acpiprt.c,v retrieving revision 1.43 diff -u -p -b -r1.43 acpiprt.c --- acpiprt.c 3 Aug 2010 22:54:12 - 1.43 +++ acpiprt.c 22 Apr 2011 18:28:57 - @@ -237,25 +237,10 @@ acpiprt_prt_add(struct acpiprt_softc *sc return; } - pp = v-v_package[2]; - if (pp-type == AML_OBJTYPE_STRING) { - node = aml_searchrel(sc-sc_devnode, pp-v_string); - if (node == NULL) { + pp = aml_dereference(sc-sc_devnode, v-v_package[2]); + if (pp == NULL) { printf(Invalid device\n); return; - } - pp = node-value; - } - if (pp-type == AML_OBJTYPE_NAMEREF) { - node = aml_searchrel(sc-sc_devnode, pp-v_nameref); - if (node == NULL) { - printf(Invalid device\n); - return; - } - pp = node-value; - } - if (pp-type == AML_OBJTYPE_OBJREF) { - pp = pp-v_objref.ref; } if (pp-type == AML_OBJTYPE_DEVICE) { node = pp-node; Index: acpitz.c === RCS file: /cvs/src/sys/dev/acpi/acpitz.c,v retrieving revision 1.42 diff -u -p -b -r1.42 acpitz.c --- acpitz.c7 Apr 2011 20:16:19 - 1.42 +++ acpitz.c22 Apr 2011 18:28:57 - @@ -239,7 +239,6 @@ acpitz_attach(struct device *parent, str int acpitz_setfan(struct acpitz_softc *sc, int i, char *method) { - struct aml_node *node; struct aml_valueres1, *ref; charname[8]; int rv = 1, x, y; @@ -267,20 +266,12 @@ acpitz_setfan(struct acpitz_softc *sc, i continue; } for (y = 0; y res1.length; y++) { - ref = res1.v_package[y]; - if (ref-type == AML_OBJTYPE_STRING) { - node = aml_searchrel(sc-sc_devnode, - ref-v_string); - if (node == NULL) { + ref = aml_dereference(sc-sc_devnode, res1.v_package[y]); + if (ref == NULL) { printf(%s: %s[%d.%d] _PRO not a valid device\n, DEVNAME(sc), name, x, y); continue; - } - ref = node-value; - } - if (ref-type == AML_OBJTYPE_OBJREF) { - ref = ref-v_objref.ref; } if (ref-type != AML_OBJTYPE_DEVICE ref-type != AML_OBJTYPE_POWERRSRC) { Index: dsdt.c === RCS file: /cvs/src/sys/dev/acpi/dsdt.c,v retrieving revision 1.185 diff -u -p -b -r1.185 dsdt.c --- dsdt.c 22 Apr 2011 18:22:01 - 1.185 +++ dsdt.c 22 Apr 2011 18:28:59 - @@ -1810,6 +1810,27 @@ aml_findscope(struct aml_scope *scope, i } struct aml_value * +aml_dereference(struct aml_node *node, struct aml_value *val) +{ + printf(deref: %s %x\n, aml_nodename(node), val-type); + if (val-type == AML_OBJTYPE_STRING) { + node = aml_searchrel(node, val-v_string); + if (node == NULL) + return NULL; + val = node-value; + } + if (val-type == AML_OBJTYPE_NAMEREF) { + node = aml_searchrel(node, val-v_string); + if (node == NULL) + return NULL; + val = node-value; + } + while (val-type == AML_OBJTYPE_OBJREF) + val = val-v_objref.ref; + return val; +} + +struct aml_value * aml_getstack(struct aml_scope *scope, int opcode) { struct aml_value *sp; Index: dsdt.h === RCS file: /cvs/src/sys/dev/acpi/dsdt.h,v retrieving revision 1.58 diff -u -p -b -r1.58 dsdt.h --- dsdt.h 18 Apr 2011 00:40:26 - 1.58 +++ dsdt.h 22 Apr 2011 18:28:59 - @@ -46,6 +46,7 @@ int64_t aml_val2int(struct aml_value * struct aml_node*aml_searchname(struct aml_node *, const void *); struct aml_node*aml_searchrel(struct aml_node *, const void *); +struct aml_value *aml_dereference(struct aml_node *, struct aml_value *); struct aml_value *aml_getstack(struct aml_scope *, int); struct aml_value *aml_allocvalue(int,
INVITO A PARTECIPARE AL SALONE DELLA SPOSA E DEL MEDITERRANEO
[IMAGE] Spettabile Ente/Azienda, Gentile Operatrice, Egregio Operatore, Al tradizionale appuntamento autunnale con lâAlta Moda Sposa, giunto alla sua 3^edizione, questâanno lâEvento si arricchisce di nuovi settori merceologici, in particolare dellâArtigianato, dellâEnogastronomia e del Turismo che fondendosi hanno creato il âMediterraneo Expoâ. Dal 15 al 23 ottobre 2011, i Padiglioni delâaccogliente, suggestivo e sontuoso Centro Polifunzionale âPolo della Qualit`â sito in Marcianise (Caserta) ospiteranno la manifestazione che mantiene anche questâanno la sua funzione di polo di attrazione per lâincontro tra domanda e offerta nel territorio della Campania. Oltre al tradizionale appuntamento con gli espositori riguardanti la filiera del Matrimonio, divenuto ormai di rito, lâevento si rinnova offrendo una proposta ricca di nuovi stimoli e opportunit` per lâArtigianato, per la Filiera Agro â Alimentare, Turistica e dei Servizi. Fedele al suo ruolo di strumento dâimpulso del territorio, âMediterraneo Expoâ si prefigge di valorizzare le realt` produttive presenti e sostenere le piccole e medie imprese, allo scopo di offrire nuove opportunit` di sviluppo economico e commerciale grazie anche allâincontro e lo scambio culturale e commerciale con Buyer ed Espositori Esteri. âMediterraneo Expoâ h un evento destinato agli operatori e al business. Lâevento sin dallâinizio si h caratterizzato come valido strumento di promozione per le piccole e medie imprese del territorio campano e italiano al fine non solo di tradurre il presente, e quindi di fornire delle chiare linee guida, ma anche di porsi come interprete del cambiamento e come punto di riferimento, ogni anno, per tutti gli operatori che desiderano confrontarsi con il mercato e contribuire allo sviluppo del tessuto economico del Paese. La partecipazione al âMediterraneo Expoâ, come espositore o come sponsor, h unâoccasione unica sia per consolidare la propria attivit`, sia per cogliere nuove opportunit` di business. La posizione strategica cui h ubicato lâExpo, incuneata nei gangli vitali dellâeconomia campana, italiana e internazionale: Interporto Sud Europa, Centro Orafo il Tarl, Centro Commerciale Campania, Oromare e Outlet La Reggia rappresenta, il luogo adatto per esporre, prodotti e servizi in un contesto al passo coi tempi e nei luoghi suggeriti dal mercato nazionale e internazionale. Lâampia area espositiva del Polo della Qualit` h munita di tutti i comfort necessari. Gli espositori oltre a un articolato programma di Seminari, Laboratori, Sfilate di Moda e Concorsi, saranno allietati da un ricco programma di spettacoli per trascorrere divertenti serate. Gli standisti potranno usufruire di una serie di servizi dedicati e saranno continuamente assistiti da parte dello staff organizzativo per ogni esigenza. Nel ringraziarvi per lâattenzione e auspicandoci di potervi annoverare tra i nostri graditi ospiti, porgiamo i nostri piy cordiali saluti. Star Media s.r.l. Caserta 22/aprile/2011 Tel. +39 0823 1700340 - fax +39 0823 1761335 - i...@mediterraneoexpo.it www.mediterraneoexpo.it