[fpc-pascal] OpenSSL

2015-11-17 Thread Torsten Bonde Christiansen
Hi all. In my program I need to use the OpenSSL unit from fpc (packages/openssl) AND I also need to use the lNET package. However my problem is that lNET also include a file named openssl.pas, although it seems to be never that the one included in packages it does not have the same methods

[fpc-pascal] OpenSSL

2015-11-17 Thread Serguei TARASSOV
On 17/11/2015 15:24, fpc-pascal-requ...@lists.freepascal.org wrote: Hi all. In my program I need to use the OpenSSL unit from fpc (packages/openssl) AND I also need to use the lNET package. However my problem is that lNET also include a file named openssl.pas, although it seems to be never that

Re: [fpc-pascal] OpenSSL

2015-11-17 Thread Michael Van Canneyt
On Tue, 17 Nov 2015, Torsten Bonde Christiansen wrote: Hi all. In my program I need to use the OpenSSL unit from fpc (packages/openssl) AND I also need to use the lNET package. However my problem is that lNET also include a file named openssl.pas, although it seems to be never that the one

Re: [fpc-pascal] OpenSSL

2015-11-17 Thread Dmitry Boyarintsev
On Tue, Nov 17, 2015 at 8:15 AM, Michael Van Canneyt wrote: > Simply said: You can't. The lnet one needs to be renamed. > One day when namespaces will be generally used, that should solve itself. > (but then that is of course the same as renaming) > Why not make -Fu option be "package" specific

Re: [fpc-pascal] OpenSSL

2015-11-17 Thread Jonas Maebe
Dmitry Boyarintsev wrote on Tue, 17 Nov 2015: Why not make -Fu option be "package" specific instead? In this case "lnet" would search for openssl.pas in its own directory rather than packages/openssl ? It would be a special case hack that would not solve the general problem. E.g., the text

Re: [fpc-pascal] OpenSSL

2015-11-17 Thread Michael Van Canneyt
On Tue, 17 Nov 2015, Dmitry Boyarintsev wrote: On Tue, Nov 17, 2015 at 8:15 AM, Michael Van Canneyt wrote: Simply said: You can't. The lnet one needs to be renamed. One day when namespaces will be generally used, that should solve itself. (but then that is of course the same as renaming)

Re: [fpc-pascal] OpenSSL

2015-11-17 Thread Dmitry Boyarintsev
On Tue, Nov 17, 2015 at 8:35 AM, Michael Van Canneyt wrote: > Because the 'package' idea does not exist in the compiler. > It is an informal concept. The formal concept are... namespaces. > Yep, that's exactly why it's directory based. Due to a practice of separating packages into a stand alone

Re: [fpc-pascal] OpenSSL

2015-11-17 Thread Michael Van Canneyt
On Tue, 17 Nov 2015, Dmitry Boyarintsev wrote: On Tue, Nov 17, 2015 at 8:35 AM, Michael Van Canneyt wrote: Because the 'package' idea does not exist in the compiler. It is an informal concept. The formal concept are... namespaces. Yep, that's exactly why it's directory based. Due to a p

Re: [fpc-pascal] OpenSSL

2015-11-17 Thread Dmitry Boyarintsev
On Tue, Nov 17, 2015 at 9:19 AM, Michael Van Canneyt wrote: > I fail to see how this will solve the problem that you want to use 2 units > with the same name at the same time, as for the OP. > I presume in this case the compiler would recognize that lnet code should use "lnet/openssl.pas" instead

Re: [fpc-pascal] OpenSSL

2015-11-17 Thread Tomas Hajny
On Tue, November 17, 2015 15:24, Dmitry Boyarintsev wrote: > On Tue, Nov 17, 2015 at 9:19 AM, Michael Van Canneyt > > wrote: > >> I fail to see how this will solve the problem that you want to use 2 >> units >> with the same name at the same time, as for the OP. >> > I presume in this case the comp

Re: [fpc-pascal] OpenSSL

2015-11-17 Thread Dmitry Boyarintsev
On Tue, Nov 17, 2015 at 9:29 AM, Tomas Hajny wrote: > How should the linker know which of the equally named symbols should be > linked in out of those equally named object files then? > > Let me ask you this: why should they be equally named? thanks, Dmitry __

Re: [fpc-pascal] OpenSSL

2015-11-17 Thread Marcos Douglas
On Tue, Nov 17, 2015 at 12:29 PM, Tomas Hajny wrote: > > On Tue, November 17, 2015 15:24, Dmitry Boyarintsev wrote: > > On Tue, Nov 17, 2015 at 9:19 AM, Michael Van Canneyt > > >> wrote: > > > >> I fail to see how this will solve the problem that you want to use 2 > >> units > >> with the same na

Re: [fpc-pascal] OpenSSL

2015-11-17 Thread Tomas Hajny
On Tue, November 17, 2015 15:29, Dmitry Boyarintsev wrote: > On Tue, Nov 17, 2015 at 9:29 AM, Tomas Hajny wrote: > >> How should the linker know which of the equally named symbols should be >> linked in out of those equally named object files then? >> >> Let me ask you this: why should they be equ

Re: [fpc-pascal] OpenSSL

2015-11-17 Thread Dmitry Boyarintsev
On Tue, Nov 17, 2015 at 10:02 AM, Tomas Hajny wrote: > First, the two units serve as interfaces to the same external library, > thus they provide the same functions with the same parameters. For the external functions, it shouldn't be a problem at all. Since it's happening today, since it's allo

Re: [fpc-pascal] OpenSSL

2015-11-17 Thread Joost van der Sluis
Op 17-11-15 om 13:28 schreef Torsten Bonde Christiansen: In my program I need to use the OpenSSL unit from fpc (packages/openssl) AND I also need to use the lNET package. However my problem is that lNET also include a file named openssl.pas, although it seems to be never that the one include

Re: [fpc-pascal] OpenSSL

2015-11-17 Thread Torsten Bonde Christiansen
On 2015-11-17 18:25, Serguei TARASSOV wrote: On 17/11/2015 15:24, fpc-pascal-requ...@lists.freepascal.org wrote: Hi all. In my program I need to use the OpenSSL unit from fpc (packages/openssl) AND I also need to use the lNET package. However my problem is that lNET also include a file named o

Re: [fpc-pascal] OpenSSL

2015-11-18 Thread Joost van der Sluis
Op 18-11-15 om 08:00 schreef Torsten Bonde Christiansen: On 2015-11-17 18:25, Serguei TARASSOV wrote: On 17/11/2015 15:24, fpc-pascal-requ...@lists.freepascal.org wrote: In my program I need to use the OpenSSL unit from fpc (packages/openssl) AND I also need to use the lNET package. However m

Re: [fpc-pascal] OpenSSL

2015-11-18 Thread Michael Van Canneyt
On Wed, 18 Nov 2015, Joost van der Sluis wrote: Op 18-11-15 om 08:00 schreef Torsten Bonde Christiansen: On 2015-11-17 18:25, Serguei TARASSOV wrote: On 17/11/2015 15:24, fpc-pascal-requ...@lists.freepascal.org wrote: In my program I need to use the OpenSSL unit from fpc (packages/openssl)

Re: [fpc-pascal] OpenSSL

2015-11-18 Thread Torsten Bonde Christiansen
On 2015-11-18 13:32, Joost van der Sluis wrote: Op 18-11-15 om 08:00 schreef Torsten Bonde Christiansen: On 2015-11-17 18:25, Serguei TARASSOV wrote: On 17/11/2015 15:24, fpc-pascal-requ...@lists.freepascal.org wrote: In my program I need to use the OpenSSL unit from fpc (packages/openssl) AN

Re: [fpc-pascal] OpenSSL

2015-11-19 Thread Joost van der Sluis
Op 18-11-15 om 13:52 schreef Michael Van Canneyt: On Wed, 18 Nov 2015, Joost van der Sluis wrote: Btw: the openssl unit form lnet is exactly the same as the openssl unit in fpc. if that is so, then why still distribute it with lnet ? It is not. Joost. ___

Re: [fpc-pascal] OpenSSL

2015-11-19 Thread Joost van der Sluis
Op 18-11-15 om 13:52 schreef Torsten Bonde Christiansen: On 2015-11-18 13:32, Joost van der Sluis wrote: But where did you install lnet from in the first place? Just update to the latest version isn't that hard? I do not know which version you are using, but if it is a recent one, the rename

Re: [fpc-pascal] OpenSSL

2015-11-19 Thread Mark Morgan Lloyd
Joost van der Sluis wrote: Op 18-11-15 om 13:52 schreef Torsten Bonde Christiansen: On 2015-11-18 13:32, Joost van der Sluis wrote: But where did you install lnet from in the first place? Just update to the latest version isn't that hard? I do not know which version you are using, but if it