Home | History | Annotate | Download | only in include
      1 /*
      2  * Copyright (c) 2002, Intel Corporation. All rights reserved.
      3  * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
      4  * This file is licensed under the GPL license.  For the full content
      5  * of this license, see the COPYING file at the top level of this
      6  * source tree.
      7  */
      8 
      9 /*
     10  * return codes
     11  */
     12 
     13 /*
     14  * Define PTS_DEVELOPER_MODE if you want to compile for developer scenarios,
     15  * including reporting errors (as opposed to warnings), when compiling some
     16  * test programs.
     17  */
     18 
     19 #if defined(_GNU_SOURCE)
     20 # if !AFFINITY_NEEDS_GNU_SOURCE
     21 #  if defined(PTS_DEVELOPER_MODE)
     22 #   error "Contains GNU-isms that need fixing."
     23 #  else
     24 #   warning "Contains GNU-isms that need fixing."
     25 #  endif
     26 # endif
     27 #endif
     28 
     29 #if defined(_BSD_SOURCE)
     30 # if defined(PTS_DEVELOPER_MODE)
     31 #  error "Contains BSD-isms that need fixing."
     32 # else
     33 #  warning "Contains BSD-isms that need fixing."
     34 # endif
     35 #endif
     36 
     37 #define PTS_PASS        0
     38 #define PTS_FAIL        1
     39 #define PTS_UNRESOLVED  2
     40 #define PTS_UNSUPPORTED 4
     41 #define PTS_UNTESTED    5
     42 
     43 #ifndef ARRAY_SIZE
     44 #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof(arr[0]))
     45 #endif
     46 
     47 #define LTP_ATTRIBUTE_NORETURN		__attribute__((noreturn))
     48 #define LTP_ATTRIBUTE_UNUSED		__attribute__((unused))
     49 #define LTP_ATTRIBUTE_UNUSED_RESULT	__attribute__((warn_unused_result))
     50