About
User Reference
C++ API
luafaudes
Developer
Links
libFAUDES online
libFAUDES

Sections

Index

cfl_winextra.h

Go to the documentation of this file.
00001 /** @file cfl_winextra.h  Workaround missing posix functions */
00002 
00003 /* FAU Discrete Event Systems Library (libfaudes)
00004 
00005    Copyright (C) 2007  Thomas Moor
00006    Exclusive copyright is granted to Klaus Schmidt
00007 
00008    This library is free software; you can redistribute it and/or
00009    modify it under the terms of the GNU Lesser General Public
00010    License as published by the Free Software Foundation; either
00011    version 2.1 of the License, or (at your option) any later version.
00012 
00013    This library is distributed in the hope that it will be useful,
00014    but WITHOUT ANY WARRANTY; without even the implied warranty of
00015    MERCHANTABILITY or FITNES FOR A PARTICULAR PURPOSE.  See the GNU
00016    Lesser General Public License for more details.
00017 
00018    You should have received a copy of the GNU Lesser General Public
00019    License along with this library; if not, write to the Free Software
00020    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA */
00021 
00022 
00023 
00024 #ifndef FAUDES_WINEXTRA_H
00025 #define FAUDES_WINEXTRA_H
00026 
00027 #include <fcntl.h>
00028 #define _S_IREAD 256
00029 #define _S_IWRITE 128
00030 
00031 
00032 // Derive mkstemp from mktemp  
00033 int mkstemp(char *tmpl) {
00034  int ret=-1;
00035  mktemp(tmpl); 
00036  ret=open(tmpl,O_RDWR|O_BINARY|O_CREAT|O_EXCL|_O_SHORT_LIVED, _S_IREAD|_S_IWRITE); 
00037  return ret;
00038 }
00039 
00040 // Define alt path separators
00041 // Note: 
00042 //  * the first separator is the one used to prepend directories etc
00043 //  * all other separators are used to extract basenames
00044 //  * using gcc/make also on win, we occacionaly get Unix style files names
00045 //    in the build process ... thus we define also the Unix "/" as a separator 
00046 #define FAUDES_DIR_SEPARATORS "\\:/"
00047 
00048 
00049 
00050 
00051 #endif
00052 

libFAUDES 2.20s --- 2011.10.12 --- c++ source docu by doxygen