diff --git a/src/os.cc b/src/os.cc index faa84c49..75656ded 100644 --- a/src/os.cc +++ b/src/os.cc @@ -51,6 +51,10 @@ # include #endif +#ifdef DJGPP +# include +#endif + #ifdef fileno # undef fileno #endif @@ -354,6 +358,11 @@ long getpagesize() { SYSTEM_INFO si; GetSystemInfo(&si); return si.dwPageSize; +# elif defined(DJGPP) + unsigned long size; + if (__dpmi_get_page_size(&size) != 0) + FMT_THROW(system_error(ENOSYS, "cannot get memory page size")); + return size; # else long size = FMT_POSIX_CALL(sysconf(_SC_PAGESIZE)); if (size < 0) FMT_THROW(system_error(errno, "cannot get memory page size"));