hg: add a dirent.h portability header

Summary:
This will either include system dirent on POSIX or a vendored dirent from
folly on Windows.

`/no-check-code` is here because it's everywhere across hg's .c codebase.

Differential Revision: D7555759

fbshipit-source-id: dc55926e83e17976930522277ed7fe6ce41f32f7
This commit is contained in:
Kostia Balytskyi 2018-04-10 01:06:35 -07:00 committed by Saurabh Singh
parent 6be12d9dae
commit 171ca13ebe

View File

@ -0,0 +1,18 @@
// Copyright (c) 2004-present, Facebook, Inc.
// All Rights Reserved.
//
// This software may be used and distributed according to the terms of the
// GNU General Public License version 2 or any later version.
// no-check-code
#ifndef FBHGEXT_CLIB_PORTABILITY_DIRENT_H
#define FBHGEXT_CLIB_PORTABILITY_DIRENT_H
#if defined(_MSC_VER)
#include "folly/portability/Dirent.h"
#else
#include <dirent.h>
#endif
#endif /* FBHGEXT_CLIB_PORTABILITY_DIRENT_H */