Re: Some pending pathches for review/commit

2004-09-22 Thread Ben Laurie
William A. Rowe, Jr. wrote:
At 10:47 AM 9/19/2004, Mladen Turk wrote:
Actually, it inhibits discussion to do that :(  I would like
to see Ben Laurie feedback to 2. and 5. since he understand
these better than most, and they implicate some unspoken
assumptions that he should review.  Ben?
For your 1. and 3. and 4. they are fine, simply commit them,
+1 to fix in both head and APR_0_9.

2. apr_random.patch
Set the hash tables to zero on init.
Although the test are passing now, some deep explanation
would be fine (probably from Ben Laurie).
I presume that the unix is setting the
memory to zero while on WIN32 it is set to 0xCD, and that's
why the expected test values are never met on WIN32.
Ah, this would also explain David's problems with BeOS, probably. 
However, I am concerned that unused memory shouldn't be, err, used. I'm 
not sure about this, though, since using unused memory for random 
numbers is a rare case where its OK - and I don't have time to check the 
code right now, but I'm wondering if this is indicative of some deeper bug?

5. sha2.patch
Just fixes the compile time warnings caused by assigning 64
bit values to 32 bit integers, by casting them to unsigned int.
I'd be happier if the assignees were changed to the correct type.
Cheers,
Ben.
--
ApacheCon! 13-17 November! http://www.apachecon.com/
http://www.apache-ssl.org/ben.html   http://www.thebunker.net/
There is no limit to what a man can do or how far he can go if he
doesn't mind who gets the credit. - Robert Woodruff


Planejamento Estrat�gico

2004-09-22 Thread Instituto de Planejamento e Gest�o Estrat�gica


   

  

  


   
Planejamento 
Estratgico  Empresarial 
  
 
  
Caxias 
do Sul

1/out (sexta)




  Local: 
Parthenon Caxias do Sul
Rua Os Dezoito do Forte, 1934, Centro, Caxias do Sul,
RS
  
  
 
So 
  Paulo
  
  15/out (sexta)
  
  
  
  
Local: 
  Alameda Santos,1909/1897 - 11º andar, So Paulo
  (Clique
aqui e 
  veja o mapa)
  
  
  
 
Campinas 
  (UNICAMP)
  
  25/out (segunda)
  
  
  
  
Local: 
  Campus UNICAMP s/nmero 
  Baro Geraldo, Campinas, SP
  (Clique
aqui 
  e veja o mapa)
  
  

  
  
 
  Objetivo: 
  
  Demonstrar 
  como fazer do processo de planejamento anual uma tarefa
integrada, 
  com ganho de qualidade e compromisso de toda a
equipe.
  Pblico-alvo:
  Todos os profissionais envolvidos com o processo
oramentrio 
  na empresa, especialmente Diretores e Gerentes de Vendas,
Marketing, 
  Produo e Controladoria.

 
   

   
 1. 
Planejamento Estratgico
 Mercado Total, Disponvel, Alvo
 Processo e Metodologia (Anlise SWOT)
 Plano A, Plano B, etc... 
 Conceito e Aplicao de Balanced
Scorecard 

 Gesto por Projetos (Estratgia
Aplicada).

2. 
  Estratgia de Mercado
   Marketing Estratgico x Gesto
Comercial 
  
   Produtos Velhos e Novos
   Nveis de Preo x Valor
Percebido
   Estratgia de Preo e Lucro
   Organizao de Vendas
   Territrios, Canais, Key Accounts,
etc...

 3. 
Planejamento Integrado de Lucro
 Volume, Preo e Custos Operacionais
 Ponto de Equilbrio
 Modelagem Estratgica (Mercado X
Margem) 
 Planilhas de Projeo (Receitas,
Custos 
e Lucro Operacional)
 Valor da Empresa (Metodologia Internacional de
Clculo)
  


 
   
  Investimento: 
R$ 360
O preo inclui: CD com o material
apresentado, 
kit para exerccios e certificado. Recomendamos
trazer 
calculadora.
Sero servidos dois coffee-breaks, o intervalo do
almoo 
 livre.
Inscreva-se on-line em www.ipge.com.br 
ou ligue (11) 5505-1968 das 9 s
17 hs

  

  
  
 
   
 
  Clique 
aqui para ver a lista de Empresas que j realizaram
nossos 
cursos.
  


   
 Outros 
cursos em So Paulo:

 * 
Preo 
e Custo para deciso Comercial - 21/09
 * 
Bsico 
de Vendas - Produtos e Servios - 22/09
* 
Administrao 
de Vendas (Organizao, Clientes e
Equipes) 
- 23/09
  
  
Lista completa de cursos em
www.ipge.com.br
  
 

Gesto 
Estratgica nas Pequenas e Mdias
Empresas 
  
  
  
Est 
fora de So Paulo?
Faa nossos cursos online!
Clique aqui para ler
mais...
  


  

  
  


  Para 
  REMOVER ou INCLUIR seu e-mail deste
informativo 
  a qualquer momento visite nosso website (clique
aqui).



Re: apr compiling errors

2004-09-22 Thread Joe Orton
On Wed, Sep 22, 2004 at 12:32:29PM -0700, Mark wrote:
 checking for MAP_ANON in sys/mman.h... yes
 checking for /dev/zero... yes
 ./configure:Error: decision on anonymous shared memory allocation method 
 failed

If you are using apr from an httpd tarball, then what version?  Please
upload the config.log somewhere so we can have a look at it.

joe


Re: cvs commit: apr/network_io/win32 sendrecv.c

2004-09-22 Thread William A. Rowe, Jr.
At 01:21 PM 9/22/2004, [EMAIL PROTECTED] wrote:
  --- ap_regkey.c   9 Feb 2004 20:40:49 -   1.11
  +++ ap_regkey.c   22 Sep 2004 18:21:29 -  1.12
  @@ -185,7 +185,7 @@
*/
   LONG rc;
   DWORD type;
  -DWORD size = 0;
  +apr_size_t size = 0;
   
   #if APR_HAS_UNICODE_FS
   IF_WIN_OS_IS_UNICODE 
  @@ -201,7 +201,7 @@
   else if (valuelen)
   return APR_ENAMETOOLONG;
   /* Read to NULL buffer to determine value size */
  -rc = RegQueryValueExW(key-hkey, wvalname, 0, type, NULL, size);
  +rc = RegQueryValueExW(key-hkey, wvalname, 0, type, NULL, (DWORD 
 *)size);

Allen!!!  This is insidiously evil!!!  This change makes assumptions
of the endianness will bite us some day!

Please don't use casts :(  Certainly, never recast pointer types
in this manner.  Can you explain your choice of type below, I'm
not grokking it... (perhaps we mean ULONG_PTR instead?)

  --- readwrite.c   13 Feb 2004 09:38:27 -  1.80
  +++ readwrite.c   22 Sep 2004 18:21:30 -  1.81
  @@ -68,7 +69,8 @@
   file-pOverlapped-OffsetHigh = (DWORD)(file-filePtr  32);
   }
   
  -rv = ReadFile(file-filehand, buf, len, nbytes, file-pOverlapped);
  +*nbytes = 0;
  +rv = ReadFile(file-filehand, buf, len, (LPDWORD)nbytes, 
 file-pOverlapped);
   
   if (!rv) {
   rv = apr_get_os_error();
  @@ -85,7 +87,7 @@
   switch (rv) {
   case WAIT_OBJECT_0:
   GetOverlappedResult(file-filehand, file-pOverlapped, 
  -nbytes, TRUE);
  +(LPDWORD)nbytes, TRUE);
   rv = APR_SUCCESS;
   break;
   case WAIT_TIMEOUT:
  @@ -309,7 +311,7 @@
   rv = WaitForSingleObject(thefile-pOverlapped-hEvent, 
 INFINITE);
   switch (rv) {
   case WAIT_OBJECT_0:
  -GetOverlappedResult(thefile-filehand, 
 thefile-pOverlapped, nbytes, TRUE);
  +GetOverlappedResult(thefile-filehand, 
 thefile-pOverlapped, (LPDWORD)nbytes, TRUE);
   rv = APR_SUCCESS;
   break;
   case WAIT_TIMEOUT:

Otherwise nice work :)

I wish you would have broken out the xmitfile bit, it was a pretty
comprehensive change in and of itself.

Bill 



Re: apr compiling errors

2004-09-22 Thread Mark Toung
On Sep22, 22:00, Joe Orton wrote:
 On Wed, Sep 22, 2004 at 09:30:15PM +0100, Joe Orton wrote:
  On Wed, Sep 22, 2004 at 12:32:29PM -0700, Mark wrote:
   checking for MAP_ANON in sys/mman.h... yes
   checking for /dev/zero... yes
   ./configure:Error: decision on anonymous shared memory allocation method 
   failed
  
  If you are using apr from an httpd tarball, then what version?  Please
  upload the config.log somewhere so we can have a look at it.
 
 The config.log Mark sent me had:
 
 configure:16382: checking for mmap
 configure:16432: gcc -o conftest -g -O2 -pthreads -DSOLARIS2=8 
 -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT  conftest.c -lm
 +-lsocket -lns
 l -lresolv  -lpthread 5
 collect2: ld terminated with signal 11 [Segmentation Fault], core dumped
 configure:16435: $? = 1
 
 is there a reason you passed --with-gnu-ld to configure?  I'd try it
 without.  Otherwise, it looks like you have a broken GCC installation. 
 Can you compile simple programs with it?
 
 joe

i tried without the tag as well..but didnt work

gcc does compile other programs without problems..


Re: [PATCH] apr_file_dup() doesn't set mutex on Win32

2004-09-22 Thread Stas Bekman
Stas Bekman wrote:
Steve Hay wrote:
I've just been experiencing problems using a tracing facility in 
mod_perl 2 (latest CVS sources) with Apache httpd-2.0.50.

folks, apr_file_dup on win32 is broken. Steve has posted a patch. Can 
someone on win32 review it and commit if it's good? Thank you.
I suppose, since no one cares, I'll just commit it. I can't test this 
patch, but I trust Steve that it's good. Let me know if you have any 
objections.

It seems to boil down, at least in part, to a bug in apr_file_dup() on 
Win32, namely that the mutex member of the new apr_file_t * is not 
being set.

The attached patch (against whichever apr is in httpd-2.0.50) seems to 
help, although there is still one situation causing a crash that I 
haven't been able to fix yet.

Please see this thread on the dev@perl.apache.org list for more 
details:  http://marc.theaimsgroup.com/?t=10952407611r=1w=2.

Is the patch correct?
Is there another bug lurking here somewhere that is still causing the 
crash with MOD_PERL_TRACE=g described in 
http://marc.theaimsgroup.com/?l=apache-modperl-devm=109534744919759w=2 
?  Sorry, I've no idea how to reproduce that crash outside of mod_perl 
land, or even if it definitely is an apr problem.

The MOD_PERL_TRACE feature is apparently working fine on Unix/Linux.
Thanks,


--- srclib/apr/file_io/win32/filedup.c.orig2004-02-13 
00:33:44.0 +
+++ srclib/apr/file_io/win32/filedup.c2004-09-16 
16:47:10.028472900 +0100
@@ -44,6 +44,13 @@
 (*new_file)-buffered = FALSE;
 (*new_file)-ungetchar = old_file-ungetchar;
 
+#if APR_HAS_THREADS
+if (old_file-mutex) {
+apr_thread_mutex_create(((*new_file)-mutex),
+APR_THREAD_MUTEX_DEFAULT, p);
+}
+#endif
+
 apr_pool_cleanup_register((*new_file)-pool, (void *)(*new_file), 
file_cleanup,
 apr_pool_cleanup_null);
 
@@ -114,6 +121,13 @@
 new_file-buffered = FALSE;
 new_file-ungetchar = old_file-ungetchar;
 
+#if APR_HAS_THREADS
+if (old_file-mutex) {
+apr_thread_mutex_create((new_file-mutex),
+APR_THREAD_MUTEX_DEFAULT, p);
+}
+#endif
+
 return APR_SUCCESS;
 #endif /* !defined(_WIN32_WCE) */
 }



--
__
Stas BekmanJAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide --- http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com