Blame gnulib-tests/test-dirent.c

Packit 9e4112
/* Test of <dirent.h> substitute.
Packit 9e4112
   Copyright (C) 2009-2018 Free Software Foundation, Inc.
Packit 9e4112
Packit 9e4112
   This program is free software: you can redistribute it and/or modify
Packit 9e4112
   it under the terms of the GNU General Public License as published by
Packit 9e4112
   the Free Software Foundation; either version 3 of the License, or
Packit 9e4112
   (at your option) any later version.
Packit 9e4112
Packit 9e4112
   This program is distributed in the hope that it will be useful,
Packit 9e4112
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 9e4112
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit 9e4112
   GNU General Public License for more details.
Packit 9e4112
Packit 9e4112
   You should have received a copy of the GNU General Public License
Packit 9e4112
   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
Packit 9e4112
Packit 9e4112
/* Written by Eric Blake <ebb9@byu.net>, 2009.  */
Packit 9e4112
Packit 9e4112
#include <config.h>
Packit 9e4112
Packit 9e4112
#include <dirent.h>
Packit 9e4112
Packit 9e4112
/* Check for existence of required types.  */
Packit 9e4112
static DIR *dir _GL_UNUSED;
Packit 9e4112
static struct dirent d;
Packit 9e4112
static ino_t i;
Packit 9e4112
Packit 9e4112
int
Packit 9e4112
main (void)
Packit 9e4112
{
Packit 9e4112
  return d.d_name[0] + i;
Packit 9e4112
}