Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
53 lines (43 sloc) 1.25 KB
/*
* Copyright 2012 Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef FOLLY_PORTABILITY_H_
#define FOLLY_PORTABILITY_H_
#include "folly-config.h"
#ifdef FOLLY_HAVE_SCHED_H
#include <sched.h>
#ifndef FOLLY_HAVE_PTHREAD_YIELD
#define pthread_yield sched_yield
#endif
#endif
// Define macro wrappers for C++11's "final" and "override" keywords, which
// are supported in gcc 4.7 but not gcc 4.6.
//
// TODO(tudorb/agallagher): Autotoolize this.
#undef FOLLY_FINAL
#undef FOLLY_OVERRIDE
#ifdef __GNUC__
# if __GNUC_PREREQ(4,7)
# define FOLLY_FINAL final
# define FOLLY_OVERRIDE override
# endif
#endif
#ifndef FOLLY_FINAL
# define FOLLY_FINAL
#endif
#ifndef FOLLY_OVERRIDE
# define FOLLY_OVERRIDE
#endif
#endif // FOLLY_PORTABILITY_H_
Something went wrong with that request. Please try again.