/*
 * Copyright (c) 2012 The Native Client Authors. All rights reserved.
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

#include <stdio.h>

#if defined(__GLIBC__)
#include <unistd.h>
#else
/*
 * TODO(bsy): remove when newlib toolchain catches up
 * http://code.google.com/p/nativeclient/issues/detail?id=2714
 */
#include "native_client/src/trusted/service_runtime/include/sys/unistd.h"
#endif

int main(void) {
#if defined(__GLIBC__)
  long rv = sysconf(_SC_PAGESIZE);
#else
  long rv = sysconf(NACL_ABI__SC_PAGESIZE);
#endif

  printf("%ld\n", rv);
  return rv != (1<<16);
}

/*
 * Copyright (c) 2012 The Native Client Authors. All rights reserved.
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

#include <stdio.h>
#include <unistd.h>

int main(void) {
  long rv = sysconf(_SC_PAGESIZE);
  printf("%ld\n", rv);
  return rv != (1<<16);
}

Clean up sysconf() test to address a TODO that depended on a toolchain roll
Clean up sysconf() test to address a TODO that depended on a toolchain roll

BUG=https://code.google.com/p/nativeclient/issues/detail?id=3909
BUG=https://code.google.com/p/nativeclient/issues/detail?id=2714
TEST=run_sysconf_pagesize_test

Review URL: https://codereview.chromium.org/655963003

git-svn-id: 721b910a23eff8a86f00c8fd261a7587cddf18f8@13915 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
