mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-16 21:07:26 +00:00
This is a mostly NOOP change which modifies the source code to compile cleanly in the MSVC command line build environment. A new makefile is introduced (msc/nmakefile) along with a README.txt in the same directory explaining how to build the code in the DOS window. As of this submission the build is running in a 32 bit environment, the intention is to use the same makefile for 64 bit builds in the future. Enabling high compilation warnings level allowed to identify a couple of bugs in the code which are being fixed. Not all sources are being compiled in the MSVC environment, only those in firmware/ and most of those in test/ subdirectories. The benchmark calculations require porting of the timer facilities and are being postponed. TEST Built in DOS and linux environments. Ran unit tests in linux environment. Review URL: http://codereview.chromium.org/2809037
46 lines
1.3 KiB
C
46 lines
1.3 KiB
C
/* Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
|
|
/* System includes for vboot reference library. This is the ONLY
|
|
* place in firmware/ where system headers may be included via
|
|
* #include <...>, so that there's only one place that needs to be
|
|
* fixed up for platforms which don't have all the system includes.
|
|
*
|
|
* Files in firmware/stub may still include system headers, because
|
|
* they're local implementations and will be ported to each system
|
|
* anyway. */
|
|
|
|
#ifndef VBOOT_REFERENCE_SYSINCLUDES_H_
|
|
#define VBOOT_REFERENCE_SYSINCLUDES_H_
|
|
|
|
#ifdef CHROMEOS_ENVIRONMENT
|
|
|
|
#include <inttypes.h> /* For PRIu64 */
|
|
#include <stdint.h>
|
|
#include <stdlib.h>
|
|
|
|
#if defined(HAVE_ENDIAN_H) && defined(HAVE_LITTLE_ENDIAN)
|
|
#include <byteswap.h>
|
|
#include <memory.h>
|
|
#endif
|
|
|
|
#else
|
|
#include "biosincludes.h"
|
|
#endif
|
|
|
|
#ifndef _MSC_VER
|
|
#define __pragma(...)
|
|
#endif
|
|
|
|
#if defined (CHROMEOS_ENVIRONMENT) || defined (TARGET_TEST_MODE)
|
|
|
|
/* 64-bit operations, for platforms where they need to be function calls */
|
|
#define UINT64_RSHIFT(v, shiftby) (((uint64_t)(v)) >> (shiftby))
|
|
#define UINT64_MULT32(v, multby) (((uint64_t)(v)) * ((uint32_t)(multby)))
|
|
|
|
#endif
|
|
|
|
#endif /* VBOOT_REFERENCE_SYSINCLUDES_H_ */
|