diff --git a/tgt-vvp/configure.in b/tgt-vvp/configure.in index 32ca851cf..7442a0080 100644 --- a/tgt-vvp/configure.in +++ b/tgt-vvp/configure.in @@ -13,14 +13,21 @@ AC_CYGWIN AC_SUBST(CYGWIN) AC_CHECK_HEADERS(malloc.h) -# Darwin requires -no-cpp-precomp +# Do some operating system specific setup. case "${host}" in *-*-darwin*) CPPFLAGS="-no-cpp-precomp $CPPFLAGS" CFLAGS="-no-cpp-precomp $CFLAGS" ;; + + *-*-linux*) + AC_DEFINE(_LARGEFILE_SOURCE) + AC_DEFINE(_LARGEFILE64_SOURCE) + ;; esac +AC_CHECK_FUNCS(fopen64) + # The -fPIC flag is used to tell the compiler to make position # independent code. It is needed when making shared objects. diff --git a/tgt-vvp/vvp.c b/tgt-vvp/vvp.c index a5a5c877e..6e66b16fc 100644 --- a/tgt-vvp/vvp.c +++ b/tgt-vvp/vvp.c @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifdef HAVE_CVS_IDENT -#ident "$Id: vvp.c,v 1.15 2002/08/12 01:35:03 steve Exp $" +#ident "$Id: vvp.c,v 1.16 2003/05/16 03:22:52 steve Exp $" #endif /* @@ -72,7 +72,11 @@ int target_design(ivl_design_t des) const char*path = ivl_design_flag(des, "-o"); assert(path); +#ifdef HAVE_FOPEN64 + vvp_out = fopen64(path, "w"); +#else vvp_out = fopen(path, "w"); +#endif if (vvp_out == 0) { perror(path); return -1; @@ -104,6 +108,9 @@ int target_design(ivl_design_t des) /* * $Log: vvp.c,v $ + * Revision 1.16 2003/05/16 03:22:52 steve + * Use fopen64 to open output file. + * * Revision 1.15 2002/08/12 01:35:03 steve * conditional ident string using autoconfig. *