Changeset 14452 for trunk/psLib/src/sys
- Timestamp:
- Aug 8, 2007, 3:40:08 PM (19 years ago)
- Location:
- trunk/psLib/src/sys
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/sys/psAbort.h
r11686 r14452 10 10 * @author Joshua Hoblitt, University of Hawaii 11 11 * 12 * $Revision: 1.1 4$ $Name: not supported by cvs2svn $13 * $Date: 2007-0 2-07 23:52:54$12 * $Revision: 1.15 $ $Name: not supported by cvs2svn $ 13 * $Date: 2007-08-09 01:40:07 $ 14 14 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii 15 15 */ … … 22 22 23 23 #include <stdarg.h> 24 25 #include "psType.h" 24 26 25 27 /** Reports an abort message to logging facility … … 45 47 const char *format, ///< A printf style formatting statement 46 48 ... 47 #ifdef __GNUC__ 48 ) __attribute__((format(printf, 4, 5), noreturn)); 49 #else // ifdef __GNUC__ 50 ); 51 #endif // ifdef __GNUC__ 49 ) PS_ATTR_FORMAT(printf, 4, 5) PS_ATTR_NORETURN; 52 50 #ifndef SWIG 53 51 #define psAbort(...) \ -
trunk/psLib/src/sys/psError.h
r11694 r14452 12 12 * @author Joshua Hoblitt, University of Hawaii 13 13 * 14 * @version $Revision: 1.3 5$ $Name: not supported by cvs2svn $15 * @date $Date: 2007-0 2-08 01:59:28$14 * @version $Revision: 1.36 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2007-08-09 01:40:07 $ 16 16 * 17 17 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 28 28 #include<stdarg.h> 29 29 30 #include "psType.h" 30 31 #include "psErrorCodes.h" 31 32 … … 101 102 const char* format, ///< printf-style format of header line 102 103 ... ///< any parameters required in format 103 #ifdef __GNUC__ 104 ) __attribute__((format(printf, 2, 3))); 105 #else // ifdef __GNUC__ 106 ); 107 #endif // ifdef __GNUC__ 108 104 ) PS_ATTR_FORMAT(printf, 2, 3); 109 105 110 106 #ifndef SWIG … … 151 147 const char* format, ///< printf-style format of header line 152 148 ... ///< any parameters required in format 153 #ifdef __GNUC__ 154 ) __attribute__((format(printf, 6, 7))); 155 #else // ifdef __GNUC__ 156 ); 157 #endif // ifdef __GNUC__ 149 ) PS_ATTR_FORMAT(printf, 6, 7); 158 150 #ifndef SWIG 159 151 #define psError(code,new,...) \ … … 182 174 const char* format, ///< printf-style format of header line 183 175 ... ///< any parameters required in format 184 #ifdef __GNUC__ 185 ) __attribute__((format(printf, 4, 5))); 186 #else // ifdef __GNUC__ 187 ); 188 #endif // ifdef __GNUC__ 176 ) PS_ATTR_FORMAT(printf, 4, 5); 189 177 #ifndef SWIG 190 178 #define psWarning(...) \ … … 204 192 psErrorCode code, ///< Error class code 205 193 const char* msg ///< Error message 206 ) ;194 ) PS_ATTR_MALLOC; 207 195 208 196 /// @} -
trunk/psLib/src/sys/psLine.h
r11694 r14452 9 9 * @author David Robbins, MHPCC 10 10 * 11 * @version $Revision: 1. 7$ $Name: not supported by cvs2svn $12 * @date $Date: 2007-0 2-08 01:59:28$11 * @version $Revision: 1.8 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2007-08-09 01:40:07 $ 13 13 * 14 14 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 37 37 psLine *psLineAlloc( 38 38 long Nline ///< length of line object to allocate 39 ) ;39 ) PS_ATTR_MALLOC; 40 40 41 41 … … 74 74 const char *format, ///< printf-style format of line 75 75 ... ///< any parameters required in format 76 #ifdef __GNUC__ 77 ) __attribute__((format(printf, 2, 3))); 78 #else // ifdef __GNUC__ 79 ); 80 #endif // ifdef __GNUC__ 76 ) PS_ATTR_FORMAT(printf, 2, 3); 81 77 82 78 -
trunk/psLib/src/sys/psLogMsg.h
r11694 r14452 11 11 * @author Joshua Hoblitt, University of Hawaii 12 12 * 13 * @version $Revision: 1. 39$ $Name: not supported by cvs2svn $14 * @date $Date: 2007-0 2-08 01:59:28$13 * @version $Revision: 1.40 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2007-08-09 01:40:07 $ 15 15 * 16 16 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 120 120 const char *format, ///< printf-style format command 121 121 ... 122 #ifdef __GNUC__ 123 ) __attribute__((format(printf, 3, 4))); 124 #else // ifdef __GNUC__ 125 ); 126 #endif // ifdef __GNUC__ 122 ) PS_ATTR_FORMAT(printf, 3, 4); 127 123 128 124 -
trunk/psLib/src/sys/psString.h
r12885 r14452 11 11 * @author Joshua Hoblitt, University of Hawaii 12 12 * 13 * @version $Revision: 1.4 1$ $Name: not supported by cvs2svn $14 * @date $Date: 2007-0 4-18 19:37:08$13 * @version $Revision: 1.42 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2007-08-09 01:40:07 $ 15 15 * 16 16 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 25 25 #include <sys/types.h> 26 26 #include <stdarg.h> 27 27 28 #include "psType.h" 28 29 #include "psList.h" … … 32 33 33 34 /** This macro returns a (static buffer containing) "file:line" */ 35 const char *p_psFileLine(const char *file, int line) 34 36 #ifdef __GNUC__ 35 const char *p_psFileLine(const char *file, int line) __attribute__((deprecated)); 36 #else // ifdef __GNUC__ 37 const char *p_psFileLine(const char *file, int line); 37 __attribute__((deprecated)) 38 38 #endif // ifdef __GNUC__ 39 ; 39 40 #define PS_FILE_LINE p_psFileLine(__FILE__,__LINE__) 40 41 … … 54 55 const char *func, ///< Function name of caller 55 56 size_t nChar ///< Size of psString to allocate. 56 ) ;57 ) PS_ATTR_MALLOC; 57 58 #define psStringAlloc(nChar) \ 58 59 p_psStringAlloc(__FILE__, __LINE__, __func__, nChar) … … 147 148 const char *format, ///< format to append 148 149 ... ///< format arguments 149 #ifdef __GNUC__ 150 ) __attribute__((format(printf, 5, 6))); 151 #else // ifdef __GNUC__ 152 ); 153 #endif // ifdef __GNUC__ 150 ) PS_ATTR_FORMAT(printf, 5, 6); 154 151 #define psStringAppend(dest, ...) \ 155 152 p_psStringAppend(__FILE__, __LINE__, __func__, dest, __VA_ARGS__) … … 205 202 const char *format, ///< format to append 206 203 ... ///< format arguments 207 #ifdef __GNUC__ 208 ) __attribute__((format(printf, 5, 6))); 209 # else // ifdef __GNUC__ 210 ); 211 #endif // ifdef __GNUC__ 204 ) PS_ATTR_FORMAT(printf, 5, 6); 212 205 #define psStringPrepend(dest, ...) \ 213 206 p_psStringPrepend(__FILE__, __LINE__, __func__, dest, __VA_ARGS__) -
trunk/psLib/src/sys/psTrace.h
r12494 r14452 9 9 * @author GLG, MHPCC 10 10 * 11 * @version $Revision: 1.5 8$ $Name: not supported by cvs2svn $12 * @date $Date: 2007-0 3-19 22:26:22$11 * @version $Revision: 1.59 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2007-08-09 01:40:07 $ 13 13 * 14 14 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 100 100 const char *format, ///< printf-style format command 101 101 ... ///< trace message arguments 102 #ifdef __GNUC__ 103 ) __attribute__((format(printf, 6, 7))); 104 #else // ifdef __GNUC__ 105 ); 106 #endif // ifdef __GNUC__ 102 ) PS_ATTR_FORMAT(printf, 6, 7); 107 103 #ifndef SWIG 108 104 #define psTrace(facil, level, ...) \ -
trunk/psLib/src/sys/psType.h
r12439 r14452 10 10 * @author Ross Harman, MHPCC 11 11 * 12 * @version $Revision: 1. 59$ $Name: not supported by cvs2svn $13 * @date $Date: 2007-0 3-14 04:08:13$12 * @version $Revision: 1.60 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2007-08-09 01:40:07 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 243 243 #define PSELEMTYPE_SIZEOF(x) (x & 0xFF) 244 244 245 #ifdef __GNUC__ 246 #define PS_ATTR_MALLOC __attribute__((__malloc__)) 247 #else // __GNUC__ 248 #define PS_ATTR_MALLOC 249 #endif // __GNUC__ 250 251 #ifdef __GNUC__ 252 #define PS_ATTR_NORETURN __attribute__((noreturn)) 253 #else // __GNUC__ 254 #define PS_ATTR_NORETURN 255 #endif // __GNUC__ 256 257 #ifdef __GNUC__ 258 #define PS_ATTR_FORMAT(style, start, end) __attribute__((format(style, start, end))) 259 #else // __GNUC__ 260 #define PS_ATTR_FORMAT(style, start, end) 261 #endif // __GNUC__ 262 245 263 /** Dimensions of a data type. 246 264 *
Note:
See TracChangeset
for help on using the changeset viewer.
