Blame gl/tests/getpagesize.c

Packit 549fdc
/* getpagesize emulation for systems where it cannot be done in a C macro.
Packit 549fdc
Packit 549fdc
   Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
Packit 549fdc
Packit 549fdc
   This program is free software: you can redistribute it and/or modify
Packit 549fdc
   it under the terms of the GNU General Public License as published by
Packit 549fdc
   the Free Software Foundation; either version 3 of the License, or
Packit 549fdc
   (at your option) any later version.
Packit 549fdc
Packit 549fdc
   This program is distributed in the hope that it will be useful,
Packit 549fdc
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 549fdc
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit 549fdc
   GNU General Public License for more details.
Packit 549fdc
Packit 549fdc
   You should have received a copy of the GNU General Public License
Packit 549fdc
   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
Packit 549fdc
Packit 549fdc
/* Written by Bruno Haible and Martin Lambers.  */
Packit 549fdc
Packit 549fdc
#include <config.h>
Packit 549fdc
Packit 549fdc
/* Specification. */
Packit 549fdc
#include <unistd.h>
Packit 549fdc
Packit 549fdc
/* This implementation is only for native Windows systems.  */
Packit 549fdc
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
Packit 549fdc
Packit 549fdc
# define WIN32_LEAN_AND_MEAN
Packit 549fdc
# include <windows.h>
Packit 549fdc
Packit 549fdc
int
Packit 549fdc
getpagesize (void)
Packit 549fdc
{
Packit 549fdc
  SYSTEM_INFO system_info;
Packit 549fdc
  GetSystemInfo (&system_info);
Packit 549fdc
  return system_info.dwPageSize;
Packit 549fdc
}
Packit 549fdc
Packit 549fdc
#endif