Skip to content

Commit

Permalink
FLTK now enables large file support when available (STR #1087)
Browse files Browse the repository at this point in the history
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4702 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
  • Loading branch information
michaelrsweet committed Dec 14, 2005
1 parent c97fcd9 commit 7dd1ddb
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGES
Expand Up @@ -3,6 +3,8 @@ CHANGES IN FLTK 1.1.7
- Documentation fixes (STR #571, STR #648, STR #692, STR
#730, STR #744, STR #745, STR #931, STR #942, STR #960,
STR #969)
- FLTK now enables large file support when available (STR
#1087)
- Fl_Clock_Output depended on a time value that was the
same as an unsigned long, which is incorrect for WIN64
and VC++ 2005 (STR #1079)
Expand Down
24 changes: 24 additions & 0 deletions configh.in
Expand Up @@ -255,6 +255,30 @@

#undef HAVE_ALSA_ASOUNDLIB_H

/*
* Do we have the long long type?
*/

#undef HAVE_LONG_LONG

#ifdef HAVE_LONG_LONG
# define FLTK_LLFMT "%lld"
# define FLTK_LLCAST (long long)
#else
# define FLTK_LLFMT "%ld"
# define FLTK_LLCAST (long)
#endif /* HAVE_LONG_LONG */

/*
* Do we have the strtoll() function?
*/

#undef HAVE_STRTOLL

#ifndef HAVE_STRTOLL
# define strtoll(nptr,endptr,base) strtol((nptr), (endptr), (base))
#endif /* !HAVE_STRTOLL */

/*
* End of "$Id$".
*/
34 changes: 34 additions & 0 deletions configure.in
Expand Up @@ -389,6 +389,40 @@ AC_CHECK_FUNCS(localeconv)
dnl FLTK library uses math library functions...
AC_SEARCH_LIBS(pow, m)

dnl Check for largefile support...
AC_SYS_LARGEFILE

dnl Define largefile options as needed...
LARGEFILE=""
if test x$enable_largefile != xno; then
LARGEFILE="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE"

if test $ac_cv_sys_large_files = 1; then
LARGEFILE="$LARGEFILE -D_LARGE_FILES"
fi

if test $ac_cv_sys_file_offset_bits = 64; then
LARGEFILE="$LARGEFILE -D_FILE_OFFSET_BITS=64"
fi
fi
AC_SUBST(LARGEFILE)

dnl Check for "long long" support...
AC_CACHE_CHECK(for long long int, ac_cv_c_long_long,
[if test "$GCC" = yes; then
ac_cv_c_long_long=yes
else
AC_TRY_COMPILE(,[long long int i;],
ac_cv_c_long_long=yes,
ac_cv_c_long_long=no)
fi])

if test $ac_cv_c_long_long = yes; then
AC_DEFINE(HAVE_LONG_LONG)
fi

AC_CHECK_FUNC(strtoll, AC_DEFINE(HAVE_STRTOLL))

dnl Check for audio libraries...
AUDIOLIBS=""

Expand Down
4 changes: 2 additions & 2 deletions makeinclude.in
Expand Up @@ -55,8 +55,8 @@ MAKEDEPEND = @MAKEDEPEND@

# flags for C++ compiler:
OPTIM = @OPTIM@
CFLAGS = $(OPTIM) @CPPFLAGS@ @CFLAGS@
CXXFLAGS = $(OPTIM) @CPPFLAGS@ @CXXFLAGS@
CFLAGS = $(OPTIM) @LARGEFILE@ @CPPFLAGS@ @CFLAGS@
CXXFLAGS = $(OPTIM) @LARGEFILE@ @CPPFLAGS@ @CXXFLAGS@

# program to make the archive:
LIBNAME = @LIBNAME@
Expand Down

0 comments on commit 7dd1ddb

Please sign in to comment.