From: Philip K. <pa...@us...> - 2004-08-14 17:33:18
|
Update of /cvsroot/fuse-emulator/libspectrum In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16232 Modified Files: configure.in internals.h zlib.c Added Files: dll.c Log Message: Small Visual C++ compatability fixes. --- NEW FILE: dll.c --- /* dll.c: Visual C++ DLL entry point Copyright (c) 2004 Philip Kendall $Id: dll.c,v 1.1 2004/08/14 17:33:09 pak21 Exp $ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Author contact information: E-mail: pak...@sr... Postal address: 15 Crescent Road, Wokingham, Berks, RG40 2DB, England */ #include <config.h> #include "internals.h" BOOL APIENTRY DllMain( HANDLE module, DWORD reason, LPVOID opaque ( { switch( ul_reason_for_call ) { case DLL_PROCESS_ATTACH: case DLL_THREAD_ATTACH: case DLL_THREAD_DETACH: case DLL_PROCESS_DETACH: break; } return TRUE; } Index: internals.h =================================================================== RCS file: /cvsroot/fuse-emulator/libspectrum/internals.h,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** internals.h 2 Jun 2004 13:38:10 -0000 1.19 --- internals.h 14 Aug 2004 17:33:09 -0000 1.20 *************** *** 45,52 **** #endif /* #ifdef __GNUC__ */ ! /* Win32 systems have _strcmpi, but not strcasecmp */ ! #if !defined(HAVE_STRCASECMP) && defined(HAVE__STRCMPI) ! #define strcasecmp _strcmpi ! #endif /* #if !defined(HAVE_STRCASECMP) && defined(HAVE__STRCMPI) */ /* Print using the user-provided error function */ --- 45,61 ---- #endif /* #ifdef __GNUC__ */ ! /* On Win32 systems, map snprintf -> _snprintf, strcasecmp -> _stricmp and ! strncasecmp -> _strnicmp */ ! #if !defined(HAVE_SNPRINTF) && defined(HAVE__SNPRINTF) ! #define snprintf _snprintf ! #endif /* #if !defined(HAVE_SNPRINTF) && defined(HAVE__SNPRINTF) */ ! ! #if !defined(HAVE_STRCASECMP) && defined(HAVE__STRICMP) ! #define strcasecmp _stricmp ! #endif /* #if !defined(HAVE_STRCASECMP) && defined(HAVE__STRICMP) */ ! ! #if !defined(HAVE_STRNCASECMP) && defined(HAVE__STRNICMP) ! #define strncasecmp _strnicmp ! #endif /* #if !defined(HAVE_STRNCASECMP) && defined(HAVE__STRNICMP) */ /* Print using the user-provided error function */ Index: zlib.c =================================================================== RCS file: /cvsroot/fuse-emulator/libspectrum/zlib.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** zlib.c 27 Nov 2003 21:45:25 -0000 1.9 --- zlib.c 14 Aug 2004 17:33:09 -0000 1.10 *************** *** 35,39 **** --- 35,42 ---- #include <string.h> #include <sys/types.h> + + #ifdef HAVE_UNISTD_H #include <unistd.h> + #endif /* #ifdef HAVE_UNISTD_H */ #include <zlib.h> *************** *** 332,336 **** */ { ! uLongf gzl = ( length * 1.001 ) + 12; int gzret; --- 335,339 ---- */ { ! uLongf gzl = (uLongf)( length * 1.001 ) + 12; int gzret; Index: configure.in =================================================================== RCS file: /cvsroot/fuse-emulator/libspectrum/configure.in,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** configure.in 16 Jul 2004 09:22:20 -0000 1.32 --- configure.in 14 Aug 2004 17:33:09 -0000 1.33 *************** *** 38,42 **** dnl Checks for header files. AC_HEADER_STDC ! AC_CHECK_HEADERS(stdint.h strings.h) dnl Checks for typedefs, structures, and compiler characteristics. --- 38,42 ---- dnl Checks for header files. AC_HEADER_STDC ! AC_CHECK_HEADERS(stdint.h strings.h unistd.h) dnl Checks for typedefs, structures, and compiler characteristics. *************** *** 47,51 **** dnl Check for functions ! AC_CHECK_FUNCS(strcasecmp _strcmpi) dnl Allow the user to say that various libraries are in one place --- 47,51 ---- dnl Check for functions ! AC_CHECK_FUNCS(_snprintf _stricmp _strnicmp snprintf strcasecmp strncasecmp) dnl Allow the user to say that various libraries are in one place |