Commit fa397c1f authored by rswindell's avatar rswindell
Browse files

Created get_errno(), to allow for a single smb.lib build for both single and

multi-threaded applications: the version of xpdev linked with the application
will determine the errno implementation (which is unique for multi-threaded
apps).
parent f1c07d16
......@@ -8,7 +8,7 @@
* @format.tab-size 4 (Plain Text/Source Code File Header) *
* @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) *
* *
* Copyright 2002 Rob Swindell - http://www.synchro.net/copyright.html *
* Copyright 2004 Rob Swindell - http://www.synchro.net/copyright.html *
* *
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Lesser General Public License *
......@@ -444,3 +444,12 @@ char* DLLCALL truncnl(char* str)
return(str);
}
/****************************************************************************/
/* Return errno from the proper C Library implementation */
/* (single/multi-threaded) */
/****************************************************************************/
int DLLCALL get_errno(void)
{
return(errno);
}
\ No newline at end of file
......@@ -8,7 +8,7 @@
* @format.tab-size 4 (Plain Text/Source Code File Header) *
* @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) *
* *
* Copyright 2003 Rob Swindell - http://www.synchro.net/copyright.html *
* Copyright 2004 Rob Swindell - http://www.synchro.net/copyright.html *
* *
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Lesser General Public License *
......@@ -182,6 +182,12 @@ DLLEXPORT char* DLLCALL truncnl(char* str);
#define STRERROR(x) truncsp(strerror(x))
#endif
/*********************/
/* Utility Functions */
/*********************/
/* Thunking for multi-threaded specific implementations of "errno" */
DLLEXPORT int DLLCALL get_errno(void);
/**********************************/
/* Common Utility Macro Functions */
/**********************************/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment