Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Build problems on AIX 5.3



Bas de Bakker wrote:
> I tried to build zsh 4.2.1 on our new AIX 5.3 machine using gcc 3.4.3. 
> This failed, because the SOCKLEN_T define used in zsh conflicts with a 
> SOCKLEN_T define used internally by the AIX header files.

(Hi Bas!)

Renaming it globally is easy.

Index: aczsh.m4
===================================================================
RCS file: /cvsroot/zsh/zsh/aczsh.m4,v
retrieving revision 1.16
diff -u -r1.16 aczsh.m4
--- aczsh.m4	14 Feb 2004 18:50:16 -0000	1.16
+++ aczsh.m4	16 Nov 2004 10:41:23 -0000
@@ -695,6 +695,7 @@
 dnl
 dnl	check type of third argument of some network functions; currently
 dnl	tested are size_t *, unsigned long *, int *.
+dnl     call the result ZSOCKLEN_T since some systems have SOCKLEN_T already
 dnl
 AC_DEFUN([zsh_CHECK_SOCKLEN_T],[
   AC_CACHE_CHECK(
@@ -714,7 +715,7 @@
       zsh_cv_type_socklen_t=int
     fi]
   )
-  AC_DEFINE_UNQUOTED([SOCKLEN_T], [$zsh_cv_type_socklen_t],
+  AC_DEFINE_UNQUOTED([ZSOCKLEN_T], [$zsh_cv_type_socklen_t],
   [Define to the base type of the third argument of accept])]
 )
 
Index: Src/Modules/socket.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Modules/socket.c,v
retrieving revision 1.6
diff -u -r1.6 socket.c
--- Src/Modules/socket.c	2 Jun 2004 22:15:00 -0000	1.6
+++ Src/Modules/socket.c	16 Nov 2004 10:41:24 -0000
@@ -61,7 +61,7 @@
 bin_zsocket(char *nam, char **args, Options ops, UNUSED(int func))
 {
     int err=1, verbose=0, test=0, targetfd=0;
-    SOCKLEN_T len;
+    ZSOCKLEN_T len;
     struct sockaddr_un soun;
     int sfd;
 
Index: Src/Modules/tcp.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Modules/tcp.c,v
retrieving revision 1.39
diff -u -r1.39 tcp.c
--- Src/Modules/tcp.c	2 Jun 2004 22:15:00 -0000	1.39
+++ Src/Modules/tcp.c	16 Nov 2004 10:41:24 -0000
@@ -340,7 +340,7 @@
 bin_ztcp(char *nam, char **args, Options ops, UNUSED(int func))
 {
     int herrno, err=1, destport, force=0, verbose=0, test=0, targetfd=0;
-    SOCKLEN_T  len;
+    ZSOCKLEN_T  len;
     char **addrp, *desthost, *localname, *remotename;
     struct hostent *zthost = NULL, *ztpeer = NULL;
     struct servent *srv;
Index: Src/Modules/zftp.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Modules/zftp.c,v
retrieving revision 1.34
diff -u -r1.34 zftp.c
--- Src/Modules/zftp.c	21 Oct 2004 00:33:51 -0000	1.34
+++ Src/Modules/zftp.c	16 Nov 2004 10:41:25 -0000
@@ -972,7 +972,7 @@
 #else
 	char portcmd[40];
 #endif
-	SOCKLEN_T len;
+	ZSOCKLEN_T len;
 	int ret;
 
 	if (!(zfprefs & ZFPF_SNDP)) {
@@ -1065,7 +1065,7 @@
 static int
 zfgetdata(char *name, char *rest, char *cmd, int getsize)
 {
-    SOCKLEN_T len;
+    ZSOCKLEN_T len;
     int newfd, is_passive;
     union tcp_sockaddr zdsock;
 
@@ -1702,7 +1702,7 @@
     char **addrp, *fname, *tmpptr, *portnam = "ftp";
     char *hostnam, *hostsuffix;
     int err, tmout, port = -1;
-    SOCKLEN_T  len;
+    ZSOCKLEN_T  len;
     int herrno, af, hlen;
 
     if (!*args) {

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************



Messages sorted by: Reverse Date, Date, Thread, Author