solaris.cc revision 2600
19243SN/A/*
210889Sandreas.hansson@arm.com * Copyright (c) 2003-2005 The Regents of The University of Michigan
39243SN/A * All rights reserved.
49243SN/A *
59243SN/A * Redistribution and use in source and binary forms, with or without
69243SN/A * modification, are permitted provided that the following conditions are
79243SN/A * met: redistributions of source code must retain the above copyright
89243SN/A * notice, this list of conditions and the following disclaimer;
99243SN/A * redistributions in binary form must reproduce the above copyright
109243SN/A * notice, this list of conditions and the following disclaimer in the
119243SN/A * documentation and/or other materials provided with the distribution;
129243SN/A * neither the name of the copyright holders nor the names of its
139243SN/A * contributors may be used to endorse or promote products derived from
149831SN/A * this software without specific prior written permission.
159831SN/A *
169831SN/A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
179243SN/A * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
189243SN/A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
199243SN/A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
209243SN/A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
219243SN/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
229243SN/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
239243SN/A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
249243SN/A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
259243SN/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
269243SN/A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
279243SN/A */
289243SN/A
299243SN/A#include "arch/sparc/solaris/solaris.hh"
309243SN/A
319243SN/A// open(2) flags translation table
329243SN/AOpenFlagTransTable SparcSolaris::openFlagTable[] = {
339243SN/A#ifdef _MSC_VER
349243SN/A  { SparcSolaris::TGT_O_RDONLY,	_O_RDONLY },
359243SN/A  { SparcSolaris::TGT_O_WRONLY,	_O_WRONLY },
369243SN/A  { SparcSolaris::TGT_O_RDWR,	_O_RDWR },
379243SN/A  { SparcSolaris::TGT_O_APPEND,	_O_APPEND },
389243SN/A  { SparcSolaris::TGT_O_CREAT,	_O_CREAT },
399243SN/A  { SparcSolaris::TGT_O_TRUNC,	_O_TRUNC },
409243SN/A  { SparcSolaris::TGT_O_EXCL,	_O_EXCL },
419243SN/A#ifdef _O_NONBLOCK
429967SN/A  { SparcSolaris::TGT_O_NONBLOCK,	_O_NONBLOCK },
4310618SOmar.Naji@arm.com  { SparcSolaris::TGT_O_NDELAY  ,	_O_NONBLOCK },
449243SN/A#endif
459243SN/A#ifdef _O_NOCTTY
4610146Sandreas.hansson@arm.com  { SparcSolaris::TGT_O_NOCTTY,	_O_NOCTTY },
479356SN/A#endif
4810146Sandreas.hansson@arm.com#ifdef _O_SYNC
4910247Sandreas.hansson@arm.com  { SparcSolaris::TGT_O_SYNC,	_O_SYNC },
5010208Sandreas.hansson@arm.com  { SparcSolaris::TGT_O_DSYNC,	_O_SYNC },
519352SN/A  { SparcSolaris::TGT_O_RSYNC,	_O_SYNC },
5210146Sandreas.hansson@arm.com#endif
539814SN/A#else /* !_MSC_VER */
549243SN/A  { SparcSolaris::TGT_O_RDONLY,	O_RDONLY },
559243SN/A  { SparcSolaris::TGT_O_WRONLY,	O_WRONLY },
5610432SOmar.Naji@arm.com  { SparcSolaris::TGT_O_RDWR,	O_RDWR },
579243SN/A  { SparcSolaris::TGT_O_APPEND,	O_APPEND },
5810146Sandreas.hansson@arm.com  { SparcSolaris::TGT_O_CREAT,	O_CREAT },
599243SN/A  { SparcSolaris::TGT_O_TRUNC,	O_TRUNC },
6010619Sandreas.hansson@arm.com  { SparcSolaris::TGT_O_EXCL,	O_EXCL },
619243SN/A  { SparcSolaris::TGT_O_NONBLOCK,	O_NONBLOCK },
6210211Sandreas.hansson@arm.com  { SparcSolaris::TGT_O_NDELAY  ,	O_NONBLOCK },
6310618SOmar.Naji@arm.com  { SparcSolaris::TGT_O_NOCTTY,	O_NOCTTY },
6410489SOmar.Naji@arm.com#ifdef O_SYNC
659831SN/A  { SparcSolaris::TGT_O_SYNC,	O_SYNC },
669831SN/A  { SparcSolaris::TGT_O_DSYNC,	O_SYNC },
679831SN/A  { SparcSolaris::TGT_O_RSYNC,	O_SYNC },
689831SN/A#endif
699831SN/A#endif /* _MSC_VER */
7010140SN/A};
7110646Sandreas.hansson@arm.com
729243SN/Aconst int SparcSolaris::NUM_OPEN_FLAGS =
7310394Swendy.elsasser@arm.com        (sizeof(SparcSolaris::openFlagTable)/sizeof(SparcSolaris::openFlagTable[0]));
7410394Swendy.elsasser@arm.com
759566SN/A