solaris.cc revision 2665
12600SN/A/* 22600SN/A * Copyright (c) 2003-2005 The Regents of The University of Michigan 32600SN/A * All rights reserved. 42600SN/A * 52600SN/A * Redistribution and use in source and binary forms, with or without 62600SN/A * modification, are permitted provided that the following conditions are 72600SN/A * met: redistributions of source code must retain the above copyright 82600SN/A * notice, this list of conditions and the following disclaimer; 92600SN/A * redistributions in binary form must reproduce the above copyright 102600SN/A * notice, this list of conditions and the following disclaimer in the 112600SN/A * documentation and/or other materials provided with the distribution; 122600SN/A * neither the name of the copyright holders nor the names of its 132600SN/A * contributors may be used to endorse or promote products derived from 142600SN/A * this software without specific prior written permission. 152600SN/A * 162600SN/A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 172600SN/A * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 182600SN/A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 192600SN/A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 202600SN/A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 212600SN/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 222600SN/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 232600SN/A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 242600SN/A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 252600SN/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 262600SN/A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 272665Ssaidi@eecs.umich.edu * 282665Ssaidi@eecs.umich.edu * Authors: Ali Saidi 292600SN/A */ 302600SN/A 312600SN/A#include "arch/sparc/solaris/solaris.hh" 322600SN/A 332600SN/A// open(2) flags translation table 342600SN/AOpenFlagTransTable SparcSolaris::openFlagTable[] = { 352600SN/A#ifdef _MSC_VER 362600SN/A { SparcSolaris::TGT_O_RDONLY, _O_RDONLY }, 372600SN/A { SparcSolaris::TGT_O_WRONLY, _O_WRONLY }, 382600SN/A { SparcSolaris::TGT_O_RDWR, _O_RDWR }, 392600SN/A { SparcSolaris::TGT_O_APPEND, _O_APPEND }, 402600SN/A { SparcSolaris::TGT_O_CREAT, _O_CREAT }, 412600SN/A { SparcSolaris::TGT_O_TRUNC, _O_TRUNC }, 422600SN/A { SparcSolaris::TGT_O_EXCL, _O_EXCL }, 432600SN/A#ifdef _O_NONBLOCK 442600SN/A { SparcSolaris::TGT_O_NONBLOCK, _O_NONBLOCK }, 452600SN/A { SparcSolaris::TGT_O_NDELAY , _O_NONBLOCK }, 462600SN/A#endif 472600SN/A#ifdef _O_NOCTTY 482600SN/A { SparcSolaris::TGT_O_NOCTTY, _O_NOCTTY }, 492600SN/A#endif 502600SN/A#ifdef _O_SYNC 512600SN/A { SparcSolaris::TGT_O_SYNC, _O_SYNC }, 522600SN/A { SparcSolaris::TGT_O_DSYNC, _O_SYNC }, 532600SN/A { SparcSolaris::TGT_O_RSYNC, _O_SYNC }, 542600SN/A#endif 552600SN/A#else /* !_MSC_VER */ 562600SN/A { SparcSolaris::TGT_O_RDONLY, O_RDONLY }, 572600SN/A { SparcSolaris::TGT_O_WRONLY, O_WRONLY }, 582600SN/A { SparcSolaris::TGT_O_RDWR, O_RDWR }, 592600SN/A { SparcSolaris::TGT_O_APPEND, O_APPEND }, 602600SN/A { SparcSolaris::TGT_O_CREAT, O_CREAT }, 612600SN/A { SparcSolaris::TGT_O_TRUNC, O_TRUNC }, 622600SN/A { SparcSolaris::TGT_O_EXCL, O_EXCL }, 632600SN/A { SparcSolaris::TGT_O_NONBLOCK, O_NONBLOCK }, 642600SN/A { SparcSolaris::TGT_O_NDELAY , O_NONBLOCK }, 652600SN/A { SparcSolaris::TGT_O_NOCTTY, O_NOCTTY }, 662600SN/A#ifdef O_SYNC 672600SN/A { SparcSolaris::TGT_O_SYNC, O_SYNC }, 682600SN/A { SparcSolaris::TGT_O_DSYNC, O_SYNC }, 692600SN/A { SparcSolaris::TGT_O_RSYNC, O_SYNC }, 702600SN/A#endif 712600SN/A#endif /* _MSC_VER */ 722600SN/A}; 732600SN/A 742600SN/Aconst int SparcSolaris::NUM_OPEN_FLAGS = 752600SN/A (sizeof(SparcSolaris::openFlagTable)/sizeof(SparcSolaris::openFlagTable[0])); 762600SN/A 77