> There should be a standard way of writing this. It kind of sucks to have > two lines with almost exactly the same code. > > At 10:13 AM 9/5/2002 +0000, Anantha Kesari H Y wrote: > >+#if defined(NETWARE) && !defined(USE_WINSOCK) > >+ if (getsockname(ftp->fd, (struct sockaddr*) &ftp->localaddr, > >(unsigned int*)&size) == -1) { > >+#else > > if (getsockname(ftp->fd, (struct sockaddr*) &ftp->localaddr, > >&size) == -1) { > >+#endif > > Also is there a reason for all of those ugly: > + > +#if defined(NETWARE) && defined(USE_WINSOCK) /* Atleast for now, to allow > sockets to be freed */ > + /*THREAD_SWITCH_WITH_DELAY;*/ > + printf ("PHP | ftp_login: sending password...\n"); > +#endif > > > I think it's good you guys are working on novell support but you should try > and keep it as clean as possible. > yo, perhaps something like:
#define NETWARE_WINSOCK (defined(NETWARE) && defined(USE_WINSOCK)) you can then just use 1 _clear_ (understandable) constant throughout the code... -Sterling > Andi > > > -- > PHP CVS Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php