RE: memory.h confusion: Is it needed?

2010-12-29 Thread Bhola Ray
memory.h is in the following path: [ I am using Linux debian 2.6.26-2-686 #1
SMP Thu Nov 25 01:53:57 UTC 2010 i686 GNU/Linux ]
 /usr/src/linux-headers-2.6.26-2-686/include/linux/memory.h
So make sure your path is set properly to include the linux include files

-Original Message-
From: owner-openssl-...@openssl.org [mailto:owner-openssl-...@openssl.org]
On Behalf Of Michael Bergandi
Sent: Wednesday, December 29, 2010 2:37 PM
To: openssl-dev@openssl.org
Subject: memory.h confusion: Is it needed?

Hi all,

While porting OpenSSL v1.0.0c I got a 'no such file' error on an include of
memory.h. The error is correct. My platform has no memory.h. So, I
investigated a little further as to where and if it is needed. I only see
memory.h included in the following:

$ grep  \memory\.h\ . -r -C2
./crypto/asn1/bio_ndef.c-
./crypto/asn1/bio_ndef.c-#ifndef OPENSSL_SYSNAME_NETWARE
./crypto/asn1/bio_ndef.c:#include memory.h ./crypto/asn1/bio_ndef.c-#endif
./crypto/asn1/bio_ndef.c-#include stdio.h
grep: ./crypto/cms/cms.h: Too many levels of symbolic links
--
./crypto/jpake/jpake.c-#include openssl/sha.h
./crypto/jpake/jpake.c-#include openssl/err.h
./crypto/jpake/jpake.c:#include memory.h
./crypto/jpake/jpake.c-
./crypto/jpake/jpake.c-/*
--
./crypto/pkcs7/bio_pk7.c-
./crypto/pkcs7/bio_pk7.c-#ifndef OPENSSL_SYSNAME_NETWARE
./crypto/pkcs7/bio_pk7.c:#include memory.h ./crypto/pkcs7/bio_pk7.c-#endif
./crypto/pkcs7/bio_pk7.c-#include stdio.h
--
./crypto/seed/seed.c-#include string.h ./crypto/seed/seed.c-#ifdef WIN32
./crypto/seed/seed.c:#include memory.h ./crypto/seed/seed.c-#endif
./crypto/seed/seed.c-
--
./demos/ssl/cli.cpp-
./demos/ssl/cli.cpp-#include stdio.h
./demos/ssl/cli.cpp:#include memory.h
./demos/ssl/cli.cpp-#include errno.h
./demos/ssl/cli.cpp-#include sys/types.h
--
./demos/ssl/serv.cpp-#include unistd.h ./demos/ssl/serv.cpp-#include
stdlib.h ./demos/ssl/serv.cpp:#include memory.h
./demos/ssl/serv.cpp-#include errno.h ./demos/ssl/serv.cpp-#include
sys/types.h
grep: ./include/openssl/cms.h: Too many levels of symbolic links

My concern is with the actual library code, not the demo stuff. My confusion
comes from the #ifdef's around the include. In one place, it gets include
for everyone but NETWARE, in another only for WIN32, and in JPAKE (i know
this experimental code) says include it for everyone.
I looked through the source for each and I can't determine where anything
from memory.h is even being used.

Can someone else confirm whether or not memory.h is actually needed?

If so, under what system should it be included?

I can submit a patch to clean it up after we sort it out.


--
Mike
__
OpenSSL Project http://www.openssl.org
Development Mailing List   openssl-dev@openssl.org
Automated List Manager   majord...@openssl.org

__
OpenSSL Project http://www.openssl.org
Development Mailing List   openssl-dev@openssl.org
Automated List Manager   majord...@openssl.org


Re: memory.h confusion: Is it needed?

2010-12-29 Thread Michael Bergandi
Bhola,

On Wed, Dec 29, 2010 at 3:55 PM, Bhola Ray bhola...@acadiaoptronics.com wrote:
 memory.h is in the following path: [ I am using Linux debian 2.6.26-2-686 #1
 SMP Thu Nov 25 01:53:57 UTC 2010 i686 GNU/Linux ]
                 /usr/src/linux-headers-2.6.26-2-686/include/linux/memory.h
 So make sure your path is set properly to include the linux include files

Yes, I know where memory.h is on a linux machine. However, I am
working on a port to eCos which I mentioned in my first post as quoted
below.

 While porting OpenSSL v1.0.0c I got a 'no such file' error on an include of
 memory.h. The error is correct. My platform has no memory.h.

Thanks for a response, but it unfortunately doesn't address the issue.

-- 
Mike
__
OpenSSL Project http://www.openssl.org
Development Mailing List   openssl-dev@openssl.org
Automated List Manager   majord...@openssl.org


Re: memory.h confusion: Is it needed?

2010-12-29 Thread Guenter

Hi Michael,
Am 29.12.2010 20:36, schrieb Michael Bergandi:

My concern is with the actual library code, not the demo stuff. My
confusion comes from the #ifdef's around the include. In one place, it
gets include for everyone but NETWARE, in another only for WIN32, and
in JPAKE (i know this experimental code) says include it for everyone.
I looked through the source for each and I can't determine where
anything from memory.h is even being used.

Can someone else confirm whether or not memory.h is actually needed?

I can confirm that it is certainly not needed for NetWare;
the only reasons why this has not yet borked the NetWare builds is 
simply because NetWare has a ./include/nks folder which holds a 
NetWare-specific memory.h which contains nothing comparable to other 
memory.h files. So I'm fine with a patch which disables memory.h for all 
files for NetWare platform.



If so, under what system should it be included?

I can submit a patch to clean it up after we sort it out.
I think the memory.h include should be axed from all files you listed 
and then be included only from e_os.h for only those systems which may 
need it - if there are any at all.


Gün.


__
OpenSSL Project http://www.openssl.org
Development Mailing List   openssl-dev@openssl.org
Automated List Manager   majord...@openssl.org