summaryrefslogtreecommitdiff
path: root/src/interfaces/odbc/gpps.h
blob: 48b6722573db208195341eb8acf85bae8eaac5b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/* GetPrivateProfileString
 * for UNIX use
 */
#ifndef GPPS_H
#define GPPS_H

#include "psqlodbc.h"

#ifndef WIN32
#include <sys/types.h>
#endif

#define SQLGetPrivateProfileString(a,b,c,d,e,f) GetPrivateProfileString(a,b,c,d,e,f)
#define SQLWritePrivateProfileString(a,b,c,d) WritePrivateProfileString(a,b,c,d)

#ifdef __cplusplus
extern		"C"
{
#endif

	DWORD
				GetPrivateProfileString(const char *theSection,		/* section name */
													const char *theKey,		/* search key name */
													const char *theDefault,	/* default value if not
																		 * found */
													char *theReturnBuffer,		/* return valuse stored
																				 * here */
												  size_t theBufferLength,		/* byte length of return
																				 * buffer */
													const char *theIniFileName);		/* pathname of ini file
																				 * to search */

	DWORD
				WritePrivateProfileString(const char *theSection,		/* section name */
													  const char *theKey,		/* write key name */
													  const char *theBuffer,	/* input buffer */
												   const char *theIniFileName);		/* pathname of ini file
																				 * to write */

#ifdef __cplusplus
}

#endif

#ifndef WIN32
#undef DWORD
#endif
#endif