mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-11-04 11:56:39 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			14 lines
		
	
	
	
		
			300 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			14 lines
		
	
	
	
		
			300 B
		
	
	
	
		
			C
		
	
	
	
	
	
// Wrapper for string.h on Mac
 | 
						|
#ifndef _STRING_WRAPPER_H
 | 
						|
#define _STRING_WRAPPER_H
 | 
						|
 | 
						|
#include <string.h>
 | 
						|
#ifdef __APPLE__
 | 
						|
// need our own implementation of strnlen
 | 
						|
static size_t strnlen(const char *s, size_t n)
 | 
						|
{
 | 
						|
  const char *p = (const char *)memchr(s, 0, n);
 | 
						|
  return(p ? p-s : n);
 | 
						|
}
 | 
						|
#endif
 | 
						|
#endif
 |