A 0.20.2 release?

18 views
Skip to first unread message

Claudio Saavedra

unread,
Apr 18, 2018, 6:23:23 AM4/18/18
to libpsl-bugs
Hi Tim,

Now that libsoup depends on libpsl, it would be very helpful if we
could have a new release out. Some of the fixes that have gone in since
0.20.1 would make the GNOME release team and distributors' life much
easier when building libsoup. :)

Thank you!

Claudio

Tim Rühsen

unread,
Apr 18, 2018, 6:51:23 AM4/18/18
to Claudio Saavedra, libpsl-bugs
Hi Claudio,


no problem,  but let's first fix
https://github.com/rockdaboot/libpsl/pull/97


Regards, Tim
signature.asc

davidt...@gmail.com

unread,
Apr 25, 2018, 5:59:50 PM4/25/18
to libpsl-bugs
https://github.com/rockdaboot/libpsl/pull/97 has been closed, but I still cannot build in Visual Studio 2015 without adding these to psl.c:

#define _CRT_SECURE_NO_WARNINGS    //for fopen()
#define ssize_t SSIZE_T
#define strdup _strdup

Anyone else seeing similar?

Tim Rühsen

unread,
Apr 26, 2018, 3:49:32 AM4/26/18
to davidt...@gmail.com, libpsl-bugs
What means "cannot build" ?

fopen() and strdup() should only print warnings. Not sure why Microsoft
*deprecates* POSIX and C99 functions for C sources. They say one should
use ISO C++ functions. But this is a C project, so maybe Visual Studio
is simply the wrong build tool then !?

Anyways, you can also switch off these warnings resp. add
_CRT_SECURE_NO_DEPRECATE to your project properties.
See https://stackoverflow.com/questions/14386/fopen-deprecated-warning

Same is true for strdup and ssize_t, I guess.

With Best Regards, Tim
signature.asc

Darshit Shah

unread,
Apr 26, 2018, 4:01:13 AM4/26/18
to Tim Rühsen, davidt...@gmail.com, libpsl-bugs
* Tim Rühsen <tim.r...@gmx.de> [180426 09:49]:
> What means "cannot build" ?
>
> fopen() and strdup() should only print warnings. Not sure why Microsoft
> *deprecates* POSIX and C99 functions for C sources. They say one should
> use ISO C++ functions. But this is a C project, so maybe Visual Studio
> is simply the wrong build tool then !?
>
MSVC has for years now treated C like a second-class citizen. They only
implement and support features that are required for the C++ compiler. So if
you need something which has a replacement in ISO C++, then you're out of luck
trying to use MSVC to compile your programs.

Can we try to use something like gnulib to provide good replacements here? I
think many of their modules are also LGPL'ed so it may be possible to use them
in LibPSL.
> --
> You received this message because you are subscribed to the Google Groups "libpsl-bugs" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to libpsl-bugs...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.




--
Thanking You,
Darshit Shah
PGP Fingerprint: 7845 120B 07CB D8D6 ECE5 FF2B 2A17 43ED A91A 35B6
signature.asc

Tim Rühsen

unread,
Apr 26, 2018, 4:09:43 AM4/26/18
to Darshit Shah, davidt...@gmail.com, libpsl-bugs
On 04/26/2018 10:01 AM, Darshit Shah wrote:
> * Tim Rühsen <tim.r...@gmx.de> [180426 09:49]:
>> What means "cannot build" ?
>>
>> fopen() and strdup() should only print warnings. Not sure why Microsoft
>> *deprecates* POSIX and C99 functions for C sources. They say one should
>> use ISO C++ functions. But this is a C project, so maybe Visual Studio
>> is simply the wrong build tool then !?
>>
> MSVC has for years now treated C like a second-class citizen. They only
> implement and support features that are required for the C++ compiler. So if
> you need something which has a replacement in ISO C++, then you're out of luck
> trying to use MSVC to compile your programs.
>
> Can we try to use something like gnulib to provide good replacements here? I
> think many of their modules are also LGPL'ed so it may be possible to use them
> in LibPSL.

Gnulib is a heavy-weight build tool, increases the time for
build-from-git dramatically and adds unneeded complexities here.
Shooting with a cannon at birds...

If someone creates a MSVC project file with the correct settings, we can
simply add it to libpsl and voila.

Regards, Tim
signature.asc

davidt...@gmail.com

unread,
Apr 26, 2018, 3:45:30 PM4/26/18
to libpsl-bugs
Sorry, here is more detail --- these are the errors from the Visual Studio 2015 build:

#define _CRT_SECURE_NO_WARNINGS       *corrects*
1>src\psl.c(1173): error C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>  C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdio.h(205): note: see declaration of 'fopen'

#define ssize_t SSIZE_T       *corrects*
1>src\psl.c(520): error C2061: syntax error: identifier '_utf8_to_utf32'
1>src\psl.c(520): error C2059: syntax error: ';'
1>src\psl.c(520): error C2059: syntax error: '<parameter-list>'
1>src\psl.c(589): error C2065: 'ssize_t': undeclared identifier

#define strdup _strdup       *corrects*
1>src\psl.c(797): error C4996: 'strdup': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _strdup. See online help for details.
1>  C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\string.h(552): note: see declaration of 'strdup'


Note that ssize_t is POSIX but is not ISO/C99.
Yes, so I can successfully build by adding the above definitions, but wonder if anyone else has a better solution.

Tim Rühsen

unread,
Apr 26, 2018, 4:33:42 PM4/26/18
to davidt...@gmail.com, libpsl-bugs


On 26.04.2018 21:45, davidt...@gmail.com wrote:
> Sorry, here is more detail --- these are the *errors* from the Visual
> Studio 2015 build:
>
> #define _CRT_SECURE_NO_WARNINGS       *corrects*
> 1>src\psl.c(1173): error C4996: 'fopen': This function or variable may
> be unsafe. Consider using fopen_s instead. To disable deprecation, use
> _CRT_SECURE_NO_WARNINGS. See online help for details.
> 1>  C:\Program Files (x86)\Windows
> Kits\10\Include\10.0.10240.0\ucrt\stdio.h(205): note: see declaration
> of 'fopen'
>
> #define ssize_t SSIZE_T       *corrects*
> 1>src\psl.c(520): error C2061: syntax error: identifier '_utf8_to_utf32'
> 1>src\psl.c(520): error C2059: syntax error: ';'
> 1>src\psl.c(520): error C2059: syntax error: '<parameter-list>'
> 1>src\psl.c(589): error C2065: 'ssize_t': undeclared identifier
>
> #define strdup _strdup       *corrects*
> 1>src\psl.c(797): error C4996: 'strdup': The POSIX name for this item
> is deprecated. Instead, use the ISO C and C++ conformant name:
> _strdup. See online help for details.
> 1>  C:\Program Files (x86)\Windows
> Kits\10\Include\10.0.10240.0\ucrt\string.h(552): note: see declaration
> of 'strdup'
>
>
> Note that ssize_t is POSIX but is not ISO/C99.
> Yes, so I can successfully build by adding the above definitions, but
> wonder if anyone else has a better solution.
>
I can't say much about it. @fanc999 (Github) made NMake / Visual Studio
build files as an PR (https://github.com/rockdaboot/libpsl/pull/99).
Maybe you can ask/discuss him why he hasn't your issue resp. why he did.

Regards, Tim


>
> On Thursday, April 26, 2018 at 4:09:43 AM UTC-4, tim.ruehsen wrote:
>
> On 04/26/2018 10:01 AM, Darshit Shah wrote:
> > * Tim Rühsen <tim.r...@gmx.de <javascript:>> [180426 09:49]:
> >> On 04/25/2018 11:59 PM, davidt...@gmail.com <javascript:> wrote:
> >>> https://github.com/rockdaboot/libpsl/pull/97
> it, send an email to libpsl-bugs...@googlegroups.com <javascript:>.
> >> For more options, visit https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>.
> >
> >
> >
> >
>
> --
> You received this message because you are subscribed to the Google
> Groups "libpsl-bugs" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to libpsl-bugs...@googlegroups.com
> <mailto:libpsl-bugs...@googlegroups.com>.
signature.asc
Reply all
Reply to author
Forward
0 new messages