Another longstanding part of the sys/socket.h specification:
* The header shall define the socklen_t type, which
is an integer type of width of at least 32 bits; see APPLICATION
USAGE.
* The header shall define the sa_family_t unsigned
integer type.
On mingw I see
nks again.
-Message d'origine-
De : Bruno Haible
Envoyé : 9 mai 2023 16:24
À : Yann Bourdeau
Cc : bug-gett...@gnu.org; bug-gnulib@gnu.org
Objet : Re: Missing socklen_t defintion on Windows 11 ARM
[CCing bug-gnulib because that's where socklen.m4 comes from]
Hi,
Yann Bourdeau wr
t; The error occurs while compile libtextstyle:
> ...
>
> checking for socklen_t... no
> checking for socklen_t equivalent... configure: error: Cannot find a type to
> use in place of socklen_t
> configure: error: ./configure failed for libtextstyle
>
> I
> From: Bruno Haible
> Cc: Eli Zaretskii , Keith Marshall
> , Rahul Das
> Date: Tue, 30 Jun 2020 03:07:39 +0200
>
> >makes available a type, socklen_t, which is an
> > unsigned opaque integral type of length of at least 32 bits.
>
> The page you c
B_defined_socklen_t
> typedef int socklen_t;
> # define GNULIB_defined_socklen_t 1
> # endif
>
> # endif
>
> This unconditionally defines socklen_t on MS-Windows systems as a
> signed int data type. Why is this unconditional?
Earlier, it was unconditiona
Gnulib's sys/socket.h has this:
# if @HAVE_WINSOCK2_H@
/* Include headers needed by the emulation code. */
# include
# include
# if !GNULIB_defined_socklen_t
typedef int socklen_t;
# define GNULIB_defined_socklen_t 1
# endif
# endif
This unconditionally de
> In file included from ../../../../src/gdb-9.1/gnulib/import/sys_socket.c:3:
> ./sys/socket.h:533:13: error: conflicting types for 'socklen_t'
> 533 | typedef int socklen_t;
> |^
This may be related to <https://savannah.gnu.org/bugs/?57725>.
Bruno
Dustin J. Mitchell wrote:
> As you probably know, on HP/UX, accept, getpeername, et al. take (..,
> int *addrlen), not (.., socklen_t *addrlen) unless _XOPEN_SOURCE and
> _XOPEN_SOURCE_EXTENDED are defined. However, if these macros are not
> defined, socklen_t is still defined.
The
As you probably know, on HP/UX, accept, getpeername, et al. take (..,
int *addrlen), not (.., socklen_t *addrlen) unless _XOPEN_SOURCE and
_XOPEN_SOURCE_EXTENDED are defined. However, if these macros are not
defined, socklen_t is still defined.
This means that the test in socklen.m4 doesn't
e; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
-dnl From Albert Chin.
+dnl From Albert Chin, Windows fixes from Simon Josefsson.
dnl Check for socklen_t: historically on BSD it i
Simon Josefsson <[EMAIL PROTECTED]> writes:
> I think you could commit your patch to CVS meanwhile.
OK, I've done that, in both gnulib and coreutils.
___
bug-gnulib mailing list
bug-gnulib@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-gnulib
Paul Eggert <[EMAIL PROTECTED]> writes:
> Simon Josefsson <[EMAIL PROTECTED]> writes:
>
>> Thanks for doing this! I will test this shortly.
>
> You're welcome.
I have installed the file in GNUTLS and GNU SASL. I haven't done any
testing yet, but if any problem appear I'll report them. I think
Paul Eggert <[EMAIL PROTECTED]> writes:
> You're welcome. One thing I forgot to mention: the old m4/socklen.m4
> code is obviously incorrect because of the stray parenthesis in this
> line:
>
> #endif)
>
> That parenthesis is copied into the C header used for testing.
>
> GCC doesn't mind, but ot
Simon Josefsson <[EMAIL PROTECTED]> writes:
> Thanks for doing this! I will test this shortly.
You're welcome. One thing I forgot to mention: the old m4/socklen.m4
code is obviously incorrect because of the stray parenthesis in this
line:
#endif)
That parenthesis is copied into the C header u
Paul Eggert <[EMAIL PROTECTED]> writes:
> Albert Chin <[EMAIL PROTECTED]> writes:
>
>> Ok, paperwork is complete. I don't have time to submit a patch. Can
>> someone else do so?
>
> OK, everybody, how about this patch? I haven't tested it; all I've
> done is combined everybody's comments. Notabl
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
-dnl From Simon Josefsson.
+dnl From Albert Chin.
-AC_DEFUN([gl_SOCKLEN_T],
-[
- AC_CHECK_HEADERS_ONCE(sys/types.h sys/socket.h)
- AC_CHECK_TYPE([soc
> > > No. I'd like to see a liberal license with this though. Curl is under
> > > a very liberal license. We'd like to see other programs use this macro
> > > for detecting socklen_t as well (lftp has adopted a derivative of it
> > > and KDE I think h
(or the obsolete
AC_TRY_*) is not safe; it skips the cleanup of that macro.
Something like this is better:
...
],[
socklen_t_equiv="$t"
])
done
test -z "$socklen_t_equiv" && break
done
if -z "$sockle
Bruno Haible <[EMAIL PROTECTED]> writes:
> Simon Josefsson wrote:
>> Can I install this? Albert Chin proposed a better M4 test, but the
>> legal procedure will take time, and I'm already using my version in a
>> few projects. When the legal problems has been fixed, we can change
>> it to use the
Simon Josefsson wrote:
> Can I install this? Albert Chin proposed a better M4 test, but the
> legal procedure will take time, and I'm already using my version in a
> few projects. When the legal problems has been fixed, we can change
> it to use the new macro and test that. What do you think?
A
* socklen.m4: New file.
>
> Index: modules/socklen
> ===
> RCS file: modules/socklen
> diff -N modules/socklen
> --- /dev/null 1 Jan 1970 00:00:00 -
> +++ modules/socklen 31 Aug 2005 14:12:39 -
> @@ -0,0 +1,20 @@
> +Description:
> +Declare socklen_t in confi
Albert Chin <[EMAIL PROTECTED]> writes:
>> This is what M4 macros in gnulib generally use, is it ok?
>>
>> dnl Copyright (C) 2005 Free Software Foundation, Inc.
>> dnl This file is free software; the Free Software Foundation
>> dnl gives unlimited permission to copy and/or distribute it,
>> dnl w
ated the following macro for curl. It's been tested on the
> >> > following systems:
> >>
> >> Has the copyright been assigned to the FSF?
> >
> > No. I'd like to see a liberal license with this though. Curl is under
> > a very liberal
>>
>> Has the copyright been assigned to the FSF?
>
> No. I'd like to see a liberal license with this though. Curl is under
> a very liberal license. We'd like to see other programs use this macro
> for detecting socklen_t as well (lftp has adopted a derivative
to see a liberal license with this though. Curl is under
a very liberal license. We'd like to see other programs use this macro
for detecting socklen_t as well (lftp has adopted a derivative of it
and KDE I think has).
According to rms it is perfectly fine (preferable in fact!) to
distribute
x27;d like to see a liberal license with this though. Curl is under
a very liberal license. We'd like to see other programs use this macro
for detecting socklen_t as well (lftp has adopted a derivative of it
and KDE I think has).
> > dnl Check for socklen_t: historically on BSD it is an i
Bruno Haible <[EMAIL PROTECTED]> writes:
> Simon Josefsson wrote:
>> A bit weird approach of checking for a compatible type, perhaps, but
>> if it works, then I'm all for it. Bruno, what do you think?
>
> It's the standard way of determining a function's prototype. At first sight,
> it would be p
Simon Josefsson wrote:
> A bit weird approach of checking for a compatible type, perhaps, but
> if it works, then I'm all for it. Bruno, what do you think?
It's the standard way of determining a function's prototype. At first sight,
it would be possible to use a single loop instead of a double lo
Albert Chin <[EMAIL PROTECTED]> writes:
> We created the following macro for curl. It's been tested on the
> following systems:
Has the copyright been assigned to the FSF?
> dnl Check for socklen_t: historically on BSD it is an int, and in
> dnl POSIX 1g it is a ty
onflict in that case. The goal should
> be that
> #include "config.h"
> #include
> #include
> defines socklen_t.
>
> Like we do with EILSEQ: There are some systems which define it in
> but not in . So we needed to somehow transport the definition from
&g
PARC
> Tru64 UNIX 4.0D, 5.1
> ...
> int getpeername (int, $arg2 *, $t *);
Thanks a lot! Simon and I had completely overlooked that 'socklen_t' is
not only a by-value parameter (as in bind(), connect()), but also a
by-reference para
Simon Josefsson wrote:
> POSIX says both sys/socket.h and netdb.h should declare
> socklen_t, I was thinking of the case where a system doesn't have
> sys/socket.h but has netdb.h.
Yes, this is the case that can cause trouble. Some very old systems fall in
this category.
> Do yo
Bruno Haible <[EMAIL PROTECTED]> writes:
> Normally and should be sufficient to get
> socklen_t. Which are the systems where it needs ?
I don't know; POSIX says both sys/socket.h and netdb.h should declare
socklen_t, I was thinking of the case where a system doesn't hav
On Wed, Aug 31, 2005 at 04:18:20PM +0200, Simon Josefsson wrote:
> +AC_DEFUN([gl_SOCKLEN_T],
> +[
> + AC_CHECK_HEADERS_ONCE(sys/types.h sys/socket.h netdb.h)
> + AC_CHECK_TYPE([socklen_t],, [AC_DEFINE([socklen_t], [int],
> + [Map `socklen_t' to `i
Normally and should be sufficient to get
socklen_t. Which are the systems where it needs ?
Bruno
___
bug-gnulib mailing list
bug-gnulib@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-gnulib
ile: modules/socklen
diff -N modules/socklen
--- /dev/null 1 Jan 1970 00:00:00 -
+++ modules/socklen 31 Aug 2005 14:12:39 -
@@ -0,0 +1,20 @@
+Description:
+Declare socklen_t in config.h if the system doesn't have it.
+
+Files:
+m4/socklen.m4
+
+Depends-on:
+
+configure.
36 matches
Mail list logo