From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28823 invoked from network); 19 Jun 2001 06:45:55 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 19 Jun 2001 06:45:55 -0000 Received: (qmail 27829 invoked by alias); 19 Jun 2001 06:45:20 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 14973 Received: (qmail 27817 invoked from network); 19 Jun 2001 06:45:19 -0000 X-Envelope-Sender-Is: Andrej.Borsenkow@mow.siemens.ru (at relayer david.siemens.de) From: "Andrej Borsenkow" To: "ZSH Workers Mailing List" Subject: AIX patch Date: Tue, 19 Jun 2001 10:45:45 +0400 Message-ID: <000601c0f88b$77806660$21c9ca95@mow.siemens.ru> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0007_01C0F8AC.FE920660" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Importance: Normal This is a multi-part message in MIME format. ------=_NextPart_000_0007_01C0F8AC.FE920660 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 7bit I am going to commit the following to HEAD. From feedback I had it should at least fix reported compile problem. Of course, it does not mean that compiled zsh will run, but that patch is needed in any case. Note, that it adds test for type of third argument to accept (that is used in some other functions as well). It currently checks for size_t, unsigned long and int (those I have on systems here and reported on AIX 4.x) and works on ReliantUNIX, Cygwin (up to date net release) and Mandrake with gcc-2.96/glibc-2.2.3. Feel free to add more types as needed for your system. -andrej ------=_NextPart_000_0007_01C0F8AC.FE920660 Content-Type: application/octet-stream; name="zsh-aix.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="zsh-aix.diff" Index: acconfig.h=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /cvsroot/zsh/zsh/acconfig.h,v=0A= retrieving revision 1.11=0A= diff -u -r1.11 acconfig.h=0A= --- acconfig.h 2001/05/09 05:42:12 1.11=0A= +++ acconfig.h 2001/06/19 06:39:31=0A= @@ -320,3 +320,6 @@=0A= =0A= /* Define if term.h chokes without curses.h */=0A= #undef TERM_H_NEEDS_CURSES_H=0A= +=0A= +/* Define to the base type of the third argument of accept */=0A= +#undef SOCKLEN_T=0A= Index: aczsh.m4=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /cvsroot/zsh/zsh/aczsh.m4,v=0A= retrieving revision 1.10=0A= diff -u -r1.10 aczsh.m4=0A= --- aczsh.m4 2001/04/23 19:59:03 1.10=0A= +++ aczsh.m4 2001/06/19 06:39:32=0A= @@ -683,3 +683,31 @@=0A= then LIBS=3D"$4"=0A= else LIBS=3D"$enable_libs"=0A= fi)])=0A= +=0A= +dnl =0A= +dnl zsh_CHECK_SOCKLEN_T=0A= +dnl=0A= +dnl check type of third argument of some network functions; currently=0A= +dnl tested are size_t *, unsigned long *, int *.=0A= +dnl=0A= +AC_DEFUN([zsh_CHECK_SOCKLEN_T],[=0A= + AC_CACHE_CHECK(=0A= + [base type of the third argument to accept],=0A= + [zsh_cv_type_socklen_t],=0A= + [zsh_cv_type_socklen_t=3D=0A= + for zsh_type in int "unsigned long" size_t ; do=0A= + AC_TRY_COMPILE(=0A= + [#include =0A= + #include ],=0A= + [extern int accept (int, struct sockaddr *, $zsh_type *);],=0A= + [zsh_cv_type_socklen_t=3D"$zsh_type"; break],=0A= + []=0A= + )=0A= + done=0A= + if test -z "$zsh_cv_type_socklen_t"; then=0A= + zsh_cv_type_socklen_t=3Dint=0A= + fi]=0A= + )=0A= + AC_DEFINE_UNQUOTED([SOCKLEN_T], [$zsh_cv_type_socklen_t])]=0A= +)=0A= +=0A= Index: zshconfig.ac=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /cvsroot/zsh/zsh/zshconfig.ac,v=0A= retrieving revision 1.7=0A= diff -u -r1.7 zshconfig.ac=0A= --- zshconfig.ac 2001/06/17 16:16:23 1.7=0A= +++ zshconfig.ac 2001/06/19 06:39:33=0A= @@ -1486,6 +1486,12 @@=0A= =0A= =0A= dnl ---------------=0A= +dnl check for the type of third argument of accept=0A= +dnl ---------------=0A= +=0A= +zsh_CHECK_SOCKLEN_T=0A= +=0A= +dnl ---------------=0A= dnl dynamic loading=0A= dnl ---------------=0A= L=3DN=0A= @@ -1497,29 +1503,30 @@=0A= MOD_IMPORT_FUNCTION=3D=0A= aixdynamic=3Dno=0A= hpuxdynamic=3Dno=0A= -if test "$ac_cv_func_dlopen" !=3D yes ||=0A= - test "$ac_cv_func_dlsym" !=3D yes ||=0A= - test "$ac_cv_func_dlerror" !=3D yes; then=0A= - if test "$ac_cv_func_load" !=3D yes ||=0A= - test "$ac_cv_func_unload" !=3D yes ||=0A= - test "$ac_cv_func_loadbind" !=3D yes ||=0A= - test "$ac_cv_func_loadquery" !=3D yes; then=0A= - if test "$ac_cv_func_shl_load" !=3D yes ||=0A= - test "$ac_cv_func_shl_unload" !=3D yes ||=0A= - test "$ac_cv_func_shl_findsym" !=3D yes; then=0A= - dynamic=3Dno=0A= - elif test "x$dynamic" =3D xyes; then=0A= - hpuxdynamic=3Dyes=0A= - DL_EXT=3D"${DL_EXT=3Dsl}"=0A= - dnl autoheader won't allow us to define anything which isn't=0A= - dnl going into a header, and we can't undefine anything, so=0A= - dnl just define this anyway and rely on the later tests to=0A= - dnl define DYNAMIC or not.=0A= - AC_DEFINE(HPUXDYNAMIC)dnl=0A= - fi=0A= - elif test "x$dynamic" =3D xyes; then=0A= +if test "$ac_cv_func_load" =3D yes &&=0A= + test "$ac_cv_func_unload" =3D yes &&=0A= + test "$ac_cv_func_loadbind" =3D yes &&=0A= + test "$ac_cv_func_loadquery" =3D yes; then=0A= + dnl Force AIXDYNAMIC even on newer versions that have dl family=0A= + if test "x$dynamic" =3D xyes; then=0A= aixdynamic=3Dyes=0A= fi=0A= +elif test "$ac_cv_func_dlopen" !=3D yes ||=0A= + test "$ac_cv_func_dlsym" !=3D yes ||=0A= + test "$ac_cv_func_dlerror" !=3D yes; then=0A= + if test "$ac_cv_func_shl_load" !=3D yes ||=0A= + test "$ac_cv_func_shl_unload" !=3D yes ||=0A= + test "$ac_cv_func_shl_findsym" !=3D yes; then=0A= + dynamic=3Dno=0A= + elif test "x$dynamic" =3D xyes; then=0A= + hpuxdynamic=3Dyes=0A= + DL_EXT=3D"${DL_EXT=3Dsl}"=0A= + dnl autoheader won't allow us to define anything which isn't=0A= + dnl going into a header, and we can't undefine anything, so=0A= + dnl just define this anyway and rely on the later tests to=0A= + dnl define DYNAMIC or not.=0A= + AC_DEFINE(HPUXDYNAMIC)dnl=0A= + fi=0A= fi=0A= =0A= test -n "$GCC" && LDARG=3D-Wl,=0A= @@ -1537,7 +1544,7 @@=0A= zsh_cv_sys_dynamic_execsyms=3D"${zsh_cv_sys_dynamic_execsyms=3Dyes}"=0A= zsh_cv_sys_dynamic_strip_exe=3D"${zsh_cv_sys_dynamic_strip_exe=3Dyes}"=0A= zsh_cv_sys_dynamic_strip_lib=3D"${zsh_cv_sys_dynamic_strip_lib=3Dyes}"=0A= - zsh_cv_sys_dynamic_broken=3D"${zsh_cv_sys_dynamic_broken=3Dno}"=0A= + zsh_cv_shared_environ=3D"${zsh_cv_shared_environ=3Dyes}"=0A= elif test "$host_os" =3D cygwin; then=0A= DL_EXT=3D"${DL_EXT=3Ddll}"=0A= DLLD=3D"${DLLD=3Ddllwrap}"=0A= @@ -1723,7 +1730,6 @@=0A= if test "x$dynamic" =3D xyes; then=0A= zsh_SHARED_VARIABLE([environ], [char **])=0A= test "$zsh_cv_shared_environ" =3D yes || dynamic=3Dno=0A= -dnl test "$zsh_cv_sys_dynamic_broken" =3D no || dynamic=3Dno=0A= if test "$ac_cv_func_tgetent" =3D yes; then=0A= zsh_SHARED_FUNCTION([tgetent])=0A= fi=0A= Index: Src/Modules/zftp.c=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /cvsroot/zsh/zsh/Src/Modules/zftp.c,v=0A= retrieving revision 1.17=0A= diff -u -r1.17 zftp.c=0A= --- Src/Modules/zftp.c 2001/06/15 13:01:42 1.17=0A= +++ Src/Modules/zftp.c 2001/06/19 06:39:33=0A= @@ -972,7 +972,8 @@=0A= #else=0A= char portcmd[40];=0A= #endif=0A= - int ret, len;=0A= + SOCKLEN_T len;=0A= + int ret;=0A= =0A= if (!(zfprefs & ZFPF_SNDP)) {=0A= zwarnnam(name, "only sendport mode available for data", NULL, 0);=0A= @@ -1064,7 +1065,8 @@=0A= static int=0A= zfgetdata(char *name, char *rest, char *cmd, int getsize)=0A= {=0A= - int len, newfd, is_passive;=0A= + SOCKLEN_T len;=0A= + int newfd, is_passive;=0A= union tcp_sockaddr zdsock;=0A= =0A= if (zfopendata(name, &zdsock, &is_passive))=0A= @@ -1698,7 +1700,8 @@=0A= struct servent *zservp;=0A= struct hostent *zhostp =3D NULL;=0A= char **addrp, *fname;=0A= - int err, len, tmout;=0A= + int err, tmout;=0A= + SOCKLEN_T len;=0A= int herrno, af, hlen;=0A= =0A= if (!*args) {=0A= ------=_NextPart_000_0007_01C0F8AC.FE920660--