# HG changeset patch # User jwe # Date 1162004814 0 # Node ID 483176585b84a3aa0dec58d33dabe90d45cc2691 # Parent ba9db42a1fe0ef7a759493e3c4af82d422ca262b [project @ 2006-10-28 03:06:32 by jwe] diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2006-10-27 John W. Eaton + * configure.in (AH_BOTTOM): Move DLL defs to + libcruft/misc/oct-dlldefs.h and include it here. + * aclocal.m4 (OCTAVE_PROG_TEXI2PDF): Require OCTAVE_PROG_TEXI2DVI. If texi2pdf is not found but texi2dvi is available, set TEXI2PDF to "$TEXI2DVI --pdf". diff --git a/configure.in b/configure.in --- a/configure.in +++ b/configure.in @@ -29,7 +29,7 @@ EXTERN_CXXFLAGS="$CXXFLAGS" AC_INIT -AC_REVISION($Revision: 1.539 $) +AC_REVISION($Revision: 1.540 $) AC_PREREQ(2.57) AC_CONFIG_SRCDIR([src/octave.cc]) AC_CONFIG_HEADER(config.h) @@ -1896,33 +1896,9 @@ #pragma warning (disable: 4996) /* deprecated function names (FIXME?) */ #pragma warning (disable: 4661) -#define OCTAVE_EXPORT __declspec(dllexport) -#define OCTAVE_IMPORT __declspec(dllimport) -#else -/* All other compilers */ -#define OCTAVE_EXPORT -#define OCTAVE_IMPORT #endif -/* API macro for libcruft */ -#ifdef CRUFT_DLL -#define CRUFT_API OCTAVE_EXPORT -#else -#define CRUFT_API OCTAVE_IMPORT -#endif -/* API macro for liboctave */ -#ifdef OCTAVE_DLL -#define OCTAVE_API OCTAVE_EXPORT -#else -#define OCTAVE_API OCTAVE_IMPORT -#endif -/* API macro for src */ -#ifdef OCTINTERP_DLL -#define OCTINTERP_API OCTAVE_EXPORT -#else -#define OCTINTERP_API OCTAVE_IMPORT -#endif - +#include "oct-dlldefs.h" #include "oct-types.h" ]) diff --git a/libcruft/ChangeLog b/libcruft/ChangeLog --- a/libcruft/ChangeLog +++ b/libcruft/ChangeLog @@ -1,5 +1,7 @@ 2006-10-27 John W. Eaton + * misc/oct-dlldefs.h: New file. + * mkf77def.in: Downcase all input to simplify matching. Match only lines beginning with whitespace. Match function return types. diff --git a/libcruft/misc/oct-dlldefs.h b/libcruft/misc/oct-dlldefs.h new file mode 100644 --- /dev/null +++ b/libcruft/misc/oct-dlldefs.h @@ -0,0 +1,63 @@ +/* + +Copyright (C) 2006 John W. Eaton + +This file is part of Octave. + +Octave 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, or (at your option) any +later version. + +Octave 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 Octave; see the file COPYING. If not, write to the Free +Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301, USA. + +*/ + +#if !defined (octave_dlldefs_h) +#define octave_dlldefs_h 1 + +#if defined (_MSC_VER) +#define OCTAVE_EXPORT __declspec(dllexport) +#define OCTAVE_IMPORT __declspec(dllimport) +#else +/* All other compilers, at least for now. */ +#define OCTAVE_EXPORT +#define OCTAVE_IMPORT +#endif + +/* API macro for libcruft */ +#ifdef CRUFT_DLL +#define CRUFT_API OCTAVE_EXPORT +#else +#define CRUFT_API OCTAVE_IMPORT +#endif + +/* API macro for liboctave */ +#ifdef OCTAVE_DLL +#define OCTAVE_API OCTAVE_EXPORT +#else +#define OCTAVE_API OCTAVE_IMPORT +#endif + +/* API macro for src */ +#ifdef OCTINTERP_DLL +#define OCTINTERP_API OCTAVE_EXPORT +#else +#define OCTINTERP_API OCTAVE_IMPORT +#endif + +#endif + +/* +;;; Local Variables: *** +;;; mode: C++ *** +;;; End: *** +*/ diff --git a/src/ChangeLog b/src/ChangeLog --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2006-10-27 John W. Eaton + * mexproto.h: Include oct-dlldefs.h. + * pr-output.cc (SPECIALIZE_UABS): New macro. Use it to generate specializations of abs for unsigned int types. Instantiate abs for signed int types. diff --git a/src/mexproto.h b/src/mexproto.h --- a/src/mexproto.h +++ b/src/mexproto.h @@ -56,6 +56,8 @@ #include #endif +#include "oct-dlldefs.h" + #define MXARRAY_TYPEDEFS_ONLY #include "mxarray.h" #undef MXARRAY_TYPEDEFS_ONLY