Changeset 367 for branches/samba-3.0/source/lib
- Timestamp:
- Jan 13, 2010, 7:52:51 PM (16 years ago)
- Location:
- branches/samba-3.0/source/lib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.0/source/lib/os2path.c
r366 r367 11 11 #include <string.h> 12 12 13 // samba DEBUG() needs the following includes and defines13 // Samba DEBUG() needs the following includes and defines 14 14 #define PRINTF_ATTRIBUTE(a1, a2) __attribute__ ((format (__printf__, a1, a2))) 15 15 #include "pstring.h" … … 21 21 int os2_GetExePath(char *buff) 22 22 { 23 24 25 26 23 APIRET rc = NO_ERROR; 24 PPIB ppib = NULL; 25 char sExePath [_MAX_PATH]; 26 char sDrive [_MAX_PATH], sDir [_MAX_DIR]; 27 27 28 28 // we search for the infoblock to get the module name 29 29 rc = DosGetInfoBlocks(NULL, &ppib); 30 30 if (rc != NO_ERROR) 31 31 { … … 33 33 } 34 34 35 // witthe module name we get the path (including the exe name)36 37 38 39 40 35 // with the module name we get the path (including the exe name) 36 rc = DosQueryModuleName(ppib->pib_hmte, sizeof(sExePath), sExePath); 37 if (rc != NO_ERROR) 38 { 39 return -1; 40 } 41 41 42 // we spitt to the different values43 44 45 46 42 // we split to the different values 43 _splitpath(sExePath, sDrive, sDir, NULL, NULL); 44 // strcat(sDrive, sDir); 45 strncat(sDrive, sDir, strlen(sDir) -1); 46 strcpy(buff, sDrive); 47 47 48 48 return 0; -
branches/samba-3.0/source/lib/popt_common.c
r1 r367 186 186 case DYN_SBINDIR: 187 187 if (arg) { 188 #ifdef __OS2__ 189 pstrcpy(dyn_SBINDIR, arg); 190 #else 188 191 dyn_SBINDIR = SMB_STRDUP(arg); 192 #endif 189 193 } 190 194 break; … … 192 196 case DYN_BINDIR: 193 197 if (arg) { 198 #ifdef __OS2__ 199 pstrcpy(dyn_BINDIR, arg); 200 #else 194 201 dyn_BINDIR = SMB_STRDUP(arg); 202 #endif 195 203 } 196 204 break; … … 198 206 case DYN_SWATDIR: 199 207 if (arg) { 208 #ifdef __OS2__ 209 pstrcpy(dyn_SWATDIR, arg); 210 #else 200 211 dyn_SWATDIR = SMB_STRDUP(arg); 212 #endif 201 213 } 202 214 break;
Note:
See TracChangeset
for help on using the changeset viewer.