diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 1999-10-25 03:08:03 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 1999-10-25 03:08:03 +0000 |
commit | 51f62d505e2aba66bf7870c7bd005cd32e7d0953 (patch) | |
tree | 127e7cbbf6679dbc2e3cfd08786ab88a7a801f50 /src/interfaces/odbc/setup.c | |
parent | 8a17ed63359325c567694fdd378e71803a53cc73 (diff) | |
download | postgresql-51f62d505e2aba66bf7870c7bd005cd32e7d0953.tar.gz postgresql-51f62d505e2aba66bf7870c7bd005cd32e7d0953.zip |
Standardize on MAXPGPATH as the size of a file pathname buffer,
eliminating some wildly inconsistent coding in various parts of the
system. I set MAXPGPATH = 1024 in config.h.in. If anyone is really
convinced that there ought to be a configure-time test to set the
value, go right ahead ... but I think it's a waste of time.
Diffstat (limited to 'src/interfaces/odbc/setup.c')
-rw-r--r-- | src/interfaces/odbc/setup.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/interfaces/odbc/setup.c b/src/interfaces/odbc/setup.c index dae789003dd..40816fd1100 100644 --- a/src/interfaces/odbc/setup.c +++ b/src/interfaces/odbc/setup.c @@ -32,7 +32,6 @@ extern GLOBAL_VALUES globals; // Constants --------------------------------------------------------------- #define MIN(x,y) ((x) < (y) ? (x) : (y)) -#define MAXPATHLEN (255+1) // Max path length #define MAXKEYLEN (15+1) // Max keyword length #define MAXDESC (255+1) // Max description length #define MAXDSNAME (32+1) // Max data source name length @@ -323,7 +322,7 @@ LPCSTR lpsz; LPCSTR lpszStart; char aszKey[MAXKEYLEN]; int cbKey; -char value[MAXPATHLEN]; +char value[MAXPGPATH]; memset(&lpsetupdlg->ci, 0, sizeof(ConnInfo)); @@ -352,7 +351,7 @@ char value[MAXPATHLEN]; // lpsetupdlg->aAttr[iElement].fSupplied = TRUE; - _fmemcpy(value, lpszStart, MIN(lpsz-lpszStart+1, MAXPATHLEN)); + _fmemcpy(value, lpszStart, MIN(lpsz-lpszStart+1, MAXPGPATH)); mylog("aszKey='%s', value='%s'\n", aszKey, value); @@ -384,8 +383,8 @@ LPCSTR lpszDSN; // Pointer to da { if (hwndParent) { - char szBuf[MAXPATHLEN]; - char szMsg[MAXPATHLEN]; + char szBuf[MAXPGPATH]; + char szMsg[MAXPGPATH]; LoadString(s_hModule, IDS_BADDSN, szBuf, sizeof(szBuf)); wsprintf(szMsg, szBuf, lpszDSN); |