--------------------- PatchSet 1012 Date: 2004/04/11 19:39:58 Author: serassio Branch: nt Tag: (none) Log: Some C++ arrangement for Visual Studio 6 compatibility Members: src/ACLMethodData.cc:1.1.2.5->1.1.2.6 src/ACLProtocolData.cc:1.1.2.5->1.1.2.6 src/asn.cc:1.8.2.9->1.8.2.10 src/comm.cc:1.19.2.24->1.19.2.25 Index: squid3/src/ACLMethodData.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/ACLMethodData.cc,v retrieving revision 1.1.2.5 retrieving revision 1.1.2.6 diff -u -r1.1.2.5 -r1.1.2.6 --- squid3/src/ACLMethodData.cc 1 Nov 2003 13:12:27 -0000 1.1.2.5 +++ squid3/src/ACLMethodData.cc 11 Apr 2004 19:39:59 -0000 1.1.2.6 @@ -1,5 +1,5 @@ /* - * $Id: ACLMethodData.cc,v 1.1.2.5 2003/11/01 13:12:27 serassio Exp $ + * $Id: ACLMethodData.cc,v 1.1.2.6 2004/04/11 19:39:59 serassio Exp $ * * DEBUG: section 28 Access Control * AUTHOR: Duane Wessels @@ -79,8 +79,10 @@ /* explicit instantiation required for some systems */ +#if !(defined(_MSC_VER) && (_MSC_VER == 1200)) /* Microsoft Visual C++ 6.0 Compiler ONLY */ template cbdata_type List ::CBDATA_List; +#endif wordlist * ACLMethodData::dump() Index: squid3/src/ACLProtocolData.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/ACLProtocolData.cc,v retrieving revision 1.1.2.5 retrieving revision 1.1.2.6 diff -u -r1.1.2.5 -r1.1.2.6 --- squid3/src/ACLProtocolData.cc 1 Nov 2003 13:12:28 -0000 1.1.2.5 +++ squid3/src/ACLProtocolData.cc 11 Apr 2004 19:39:59 -0000 1.1.2.6 @@ -1,5 +1,5 @@ /* - * $Id: ACLProtocolData.cc,v 1.1.2.5 2003/11/01 13:12:28 serassio Exp $ + * $Id: ACLProtocolData.cc,v 1.1.2.6 2004/04/11 19:39:59 serassio Exp $ * * DEBUG: section 28 Access Control * AUTHOR: Duane Wessels @@ -79,8 +79,10 @@ /* explicit instantiation required for some systems */ +#if !(defined(_MSC_VER) && (_MSC_VER == 1200)) /* Microsoft Visual C++ 6.0 Compiler ONLY */ template cbdata_type List ::CBDATA_List; +#endif wordlist * ACLProtocolData::dump() Index: squid3/src/asn.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/asn.cc,v retrieving revision 1.8.2.9 retrieving revision 1.8.2.10 diff -u -r1.8.2.9 -r1.8.2.10 --- squid3/src/asn.cc 1 Nov 2003 13:12:28 -0000 1.8.2.9 +++ squid3/src/asn.cc 11 Apr 2004 19:39:59 -0000 1.8.2.10 @@ -1,6 +1,6 @@ /* - * $Id: asn.cc,v 1.8.2.9 2003/11/01 13:12:28 serassio Exp $ + * $Id: asn.cc,v 1.8.2.10 2004/04/11 19:39:59 serassio Exp $ * * DEBUG: section 53 AS Number handling * AUTHOR: Duane Wessels, Kostas Anagnostakis @@ -65,8 +65,10 @@ /* explicit instantiation required for some systems */ +#if !(defined(_MSC_VER) && (_MSC_VER == 1200)) /* Microsoft Visual C++ 6.0 Compiler ONLY */ template cbdata_type List ::CBDATA_List; +#endif /* * Structure for as number information. it could be simply Index: squid3/src/comm.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/comm.cc,v retrieving revision 1.19.2.24 retrieving revision 1.19.2.25 diff -u -r1.19.2.24 -r1.19.2.25 --- squid3/src/comm.cc 5 Apr 2004 17:32:07 -0000 1.19.2.24 +++ squid3/src/comm.cc 11 Apr 2004 19:39:58 -0000 1.19.2.25 @@ -1,6 +1,6 @@ /* - * $Id: comm.cc,v 1.19.2.24 2004/04/05 17:32:07 serassio Exp $ + * $Id: comm.cc,v 1.19.2.25 2004/04/11 19:39:58 serassio Exp $ * * DEBUG: section 5 Socket Functions * AUTHOR: Harvest Derived @@ -792,30 +792,6 @@ return 0; } -template -bool -fdc_t::findCallback(P predicate) -{ - /* - * XXX I don't like having to walk the list! - * Instead, if this routine is called often enough, we should - * also maintain a linked list of _read_ events - we can just - * check if the list head a HEAD.. - * - adrian - */ - dlink_node *node = CommCallbackList.head; - - while (node != NULL) { - if (predicate((CommCallbackData *)node->data)) - return true; - - node = node->next; - } - - /* Not found */ - return false; -} - /* * return whether a file descriptor has a read handler * @@ -923,6 +899,30 @@ return write.handler != NULL; } +template +bool +fdc_t::findCallback(P predicate) +{ + /* + * XXX I don't like having to walk the list! + * Instead, if this routine is called often enough, we should + * also maintain a linked list of _read_ events - we can just + * check if the list head a HEAD.. + * - adrian + */ + dlink_node *node = CommCallbackList.head; + + while (node != NULL) { + if (predicate((CommCallbackData *)node->data)) + return true; + + node = node->next; + } + + /* Not found */ + return false; +} + /* * Attempt a write * @@ -2694,8 +2694,10 @@ /* explicit instantiation required for some systems */ +#if !(defined(_MSC_VER) && (_MSC_VER == 1200)) /* Microsoft Visual C++ 6.0 Compiler ONLY */ template cbdata_type List ::CBDATA_List; +#endif void DeferredReadManager::delayRead(DeferredRead const &aRead) {