Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-ID: <3AC09B3E.DA198728@certum.pl> Date: Tue, 27 Mar 2001 15:53:02 +0200 From: Jacek Trzcinski Reply-To: jacek AT certum DOT pl X-Mailer: Mozilla 4.7 [en] (WinNT; U) X-Accept-Language: en,pdf MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: tcp_wrappers Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi ! I decided to create tcp_wrappers module (which contains very usefull tcpd daemon) getting sources from Read Hat 6.2. I did it and it work but... Creation required doing changes in one module which reports some errors changing numbers for strings. To do this it utilizes system constants-variables "extern int sys_nerr" and "extern char *sys_errlist[]". Unfortunately, I was not able to create library libwrap.a and further tcpd.exe beacuse it could not see mentioned variables during compilation and consolidation. When I did following changes: << this was: #ifndef SYS_ERRLIST_DEFINED extern char *sys_errlist[]; extern int sys_nerr; #endif I changed it to : //#ifndef SYS_ERRLIST_DEFINED extern __IMPORT char *sys_errlist[]; extern __IMPORT int _sys_nerr; //#endif Relation to this variables in module I had to change of course too: this was: if (errno < sys_nerr && errno > 0) { strcpy(bp, sys_errlist[errno]); } else { sprintf(bp, "Unknown error %d", errno); } I had to change to: if (errno < _sys_nerr && errno > 0) { strcpy(bp, _sys_errlist[errno]); } else { sprintf(bp, "Unknown error %d", errno); } In makefile I had to add library libcygwin.a to consolidation process. >> everything went OK. Does anybody know it can be made simpler ( with minimal changes). It seems to be typical names problem. This changes I made looking at libcygwin.a and watching what are correct names of needed variables. Jacek -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple