linux.cc revision 2665
12553SN/A/*
22553SN/A * Copyright (c) 2003-2005 The Regents of The University of Michigan
32553SN/A * All rights reserved.
42553SN/A *
52553SN/A * Redistribution and use in source and binary forms, with or without
62553SN/A * modification, are permitted provided that the following conditions are
72553SN/A * met: redistributions of source code must retain the above copyright
82553SN/A * notice, this list of conditions and the following disclaimer;
92553SN/A * redistributions in binary form must reproduce the above copyright
102553SN/A * notice, this list of conditions and the following disclaimer in the
112553SN/A * documentation and/or other materials provided with the distribution;
122553SN/A * neither the name of the copyright holders nor the names of its
132553SN/A * contributors may be used to endorse or promote products derived from
142553SN/A * this software without specific prior written permission.
152553SN/A *
162553SN/A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
172553SN/A * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
182553SN/A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
192553SN/A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
202553SN/A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
212553SN/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
222553SN/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
232553SN/A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
242553SN/A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
252553SN/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
262553SN/A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
272665Ssaidi@eecs.umich.edu *
282665Ssaidi@eecs.umich.edu * Authors: Korey Sewell
292553SN/A */
302553SN/A
312553SN/A#include "arch/alpha/linux/linux.hh"
322553SN/A
332553SN/A// open(2) flags translation table
342553SN/AOpenFlagTransTable AlphaLinux::openFlagTable[] = {
352553SN/A#ifdef _MSC_VER
362553SN/A  { AlphaLinux::TGT_O_RDONLY,	_O_RDONLY },
372553SN/A  { AlphaLinux::TGT_O_WRONLY,	_O_WRONLY },
382553SN/A  { AlphaLinux::TGT_O_RDWR,	_O_RDWR },
392553SN/A  { AlphaLinux::TGT_O_APPEND,	_O_APPEND },
402553SN/A  { AlphaLinux::TGT_O_CREAT,	_O_CREAT },
412553SN/A  { AlphaLinux::TGT_O_TRUNC,	_O_TRUNC },
422553SN/A  { AlphaLinux::TGT_O_EXCL,	_O_EXCL },
432553SN/A#ifdef _O_NONBLOCK
442553SN/A  { AlphaLinux::TGT_O_NONBLOCK,	_O_NONBLOCK },
452553SN/A#endif
462553SN/A#ifdef _O_NOCTTY
472553SN/A  { AlphaLinux::TGT_O_NOCTTY,	_O_NOCTTY },
482553SN/A#endif
492553SN/A#ifdef _O_SYNC
502553SN/A  { AlphaLinux::TGT_O_SYNC,	_O_SYNC },
512553SN/A#endif
522553SN/A#else /* !_MSC_VER */
532553SN/A  { AlphaLinux::TGT_O_RDONLY,	O_RDONLY },
542553SN/A  { AlphaLinux::TGT_O_WRONLY,	O_WRONLY },
552553SN/A  { AlphaLinux::TGT_O_RDWR,	O_RDWR },
562553SN/A  { AlphaLinux::TGT_O_APPEND,	O_APPEND },
572553SN/A  { AlphaLinux::TGT_O_CREAT,	O_CREAT },
582553SN/A  { AlphaLinux::TGT_O_TRUNC,	O_TRUNC },
592553SN/A  { AlphaLinux::TGT_O_EXCL,	O_EXCL },
602553SN/A  { AlphaLinux::TGT_O_NONBLOCK,	O_NONBLOCK },
612553SN/A  { AlphaLinux::TGT_O_NOCTTY,	O_NOCTTY },
622553SN/A#ifdef O_SYNC
632553SN/A  { AlphaLinux::TGT_O_SYNC,	O_SYNC },
642553SN/A#endif
652553SN/A#endif /* _MSC_VER */
662553SN/A};
672553SN/A
682553SN/Aconst int AlphaLinux::NUM_OPEN_FLAGS =
692553SN/A        (sizeof(AlphaLinux::openFlagTable)/sizeof(AlphaLinux::openFlagTable[0]));
702553SN/A
712553SN/A
722553SN/A
73