1 /* 2 * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana 3 * University Research and Technology 4 * Corporation. All rights reserved. 5 * Copyright (c) 2004-2006 The University of Tennessee and The University 6 * of Tennessee Research Foundation. All rights 7 * reserved. 8 * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, 9 * University of Stuttgart. All rights reserved. 10 * Copyright (c) 2004-2005 The Regents of the University of California. 11 * All rights reserved. 12 * $COPYRIGHT$ 13 * 14 * Additional copyrights may follow 15 * 16 * $HEADER$ 17 */ 18 19 #ifndef OPAL_STRNCPY_H 20 #define OPAL_STRNCPY_H 21 22 #include "opal_config.h" 23 #ifdef HAVE_SYS_TYPES_H 24 #include <sys/types.h> 25 #endif 26 27 /* 28 * Use opal_strncpy() instead of strncpy() 29 */ 30 #if defined(strncpy) 31 #undef strncpy 32 #endif 33 #define strncpy opal_strncpy 34 35 BEGIN_C_DECLS 36 37 /* Might also be pure? */ 38 OPAL_DECLSPEC char *opal_strncpy(char *dest, const char *src, size_t len) __opal_attribute_nonnull__(1) __opal_attribute_nonnull__(2); 39 40 END_C_DECLS 41 42 #endif /* OPAL_STRNCPY_H */ 43