Changeset 656
- Timestamp:
- Nov 8, 2011, 6:50:31 PM (14 years ago)
- Location:
- trunk/server
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/server/lib/tdb/common/tdb_private.h
r456 r656 38 38 #include "tdb.h" 39 39 40 /* #define TDB_TRACE 1 */ 40 #define TDB_TRACE 1 41 41 #ifndef HAVE_GETPAGESIZE 42 42 #define getpagesize() 0x2000 -
trunk/server/lib/tdb/common/transaction.c
r456 r656 1020 1020 1021 1021 tdb_trace(tdb, "tdb_transaction_commit"); 1022 1022 tdb_trace(tdb, "@todo: tdb_transaction_error"); 1023 1023 if (tdb->transaction->transaction_error) { 1024 1024 tdb->ecode = TDB_ERR_IO; … … 1028 1028 } 1029 1029 1030 1030 tdb_trace(tdb, "@todo: tdb_transaction_nesting"); 1031 1031 if (tdb->transaction->nesting != 0) { 1032 1032 tdb->transaction->nesting--; … … 1034 1034 } 1035 1035 1036 tdb_trace(tdb, "@todo: tdb_null_transaction"); 1036 1037 /* check for a null transaction */ 1037 1038 if (tdb->transaction->blocks == NULL) { … … 1040 1041 } 1041 1042 1043 tdb_trace(tdb, "@todo: tdb_transaction_prepare"); 1042 1044 if (!tdb->transaction->prepared) { 1043 1045 int ret = _tdb_transaction_prepare_commit(tdb); … … 1048 1050 methods = tdb->transaction->io_methods; 1049 1051 1052 tdb_trace(tdb, "@todo: tdb_transaction perform all the writes"); 1053 1050 1054 /* perform all the writes */ 1051 1055 for (i=0;i<tdb->transaction->num_blocks;i++) { … … 1062 1066 length = tdb->transaction->last_block_size; 1063 1067 } 1064 1065 1068 if (methods->tdb_write(tdb, offset, tdb->transaction->blocks[i], length) == -1) { 1066 1069 TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_transaction_commit: write failed during commit\n")); … … 1083 1086 tdb->transaction->num_blocks = 0; 1084 1087 1088 tdb_trace(tdb, "@todo: tdb_transaction ensure the new data is on disk"); 1085 1089 /* ensure the new data is on disk */ 1086 1090 if (transaction_sync(tdb, 0, tdb->map_size) == -1) { … … 1100 1104 mtime changes when a transaction completes */ 1101 1105 #ifdef HAVE_UTIME 1106 tdb_trace(tdb, "@todo: tdb_transaction utime"); 1102 1107 utime(tdb->name, NULL); 1103 1108 #endif 1104 1109 1110 tdb_trace(tdb, "@todo: tdb_transaction need repack"); 1105 1111 need_repack = tdb->transaction->need_repack; 1106 1112 1107 1113 /* use a transaction cancel to free memory and remove the 1108 1114 transaction locks */ 1115 tdb_trace(tdb, "@todo: tdb_transaction cancel"); 1109 1116 _tdb_transaction_cancel(tdb); 1110 1117 1111 1118 if (need_repack) { 1119 tdb_trace(tdb, "@todo: tdb_transaction repack"); 1112 1120 return tdb_repack(tdb); 1113 1121 } -
trunk/server/source3/build.cmd
r604 r656 7 7 /* version 0.3.1 from 20.08.2010 Silvan (added version.ecs check) */ 8 8 /* version 0.3.2 from 08.07.2011 Silvan (pythonhome may be not set) */ 9 /* version 0.3.3 from 05.11.2011 Herwig (add support for libc064) */ 9 10 10 11 /* load the sysfuncs if not already loaded */ … … 16 17 17 18 /* init the version string (don't forget to change) */ 18 version = "0.3.2" 19 version_date = "08.07.2011" 20 19 version = "0.3.3" 20 version_date = "05.11.2011" 21 21 22 22 '@echo off' … … 24 24 25 25 say "Samba for eCS (OS/2) build script v" || version || " from " || version_date 26 27 26 28 27 /* No parameter or HELP -> display usage */ … … 31 30 say "Valid commands are:" 32 31 say " HELP - this page" 32 say " 064 - link against libc064.dll (default)" 33 say " 064x - link against libc064x.dll" 33 34 say " 063 - link against libc063.dll" 34 say " 064x - link against libc064x.dll"35 35 say " CONF - run configure" 36 36 say " CLEAN - clean up and recompile everything" … … 55 55 /* defaults */ 56 56 make = "" 57 libc = "064 x"57 libc = "064" 58 58 brand = "No" 59 59 conf = "" … … 83 83 build_parms = build_parms||' 'make 84 84 end 85 if pos("064X", cmdline) > 0 then do 86 libc = "064X" 87 build_parms = build_parms||' 'libc 88 end 89 if pos("063", cmdline) > 0 then do 90 libc = "063" 91 build_parms = build_parms||' 'libc 85 select 86 when pos("064X", cmdline) > 0 then do 87 libc = "064X" 88 build_parms = build_parms||' 'libc 89 end 90 when pos("063", cmdline) > 0 then do 91 libc = "063" 92 build_parms = build_parms||' 'libc 93 end 94 otherwise do 95 libc = "064" 96 build_parms = build_parms||' 'libc 97 end 92 98 end 93 99 if pos("BRAND", cmdline) > 0 then do … … 101 107 102 108 /* start working */ 103 if libc = "063" then do 104 address cmd "call 063.cmd" 105 end 106 else do 107 address cmd "call 064x.cmd" 109 select 110 when libc = "064X" then address cmd "call 064x.cmd" 111 when libc = "063" then address cmd "call 063.cmd" 112 otherwise address cmd "call 064.cmd" 108 113 end 109 114 … … 123 128 124 129 /* is cups env set */ 125 130 sEnvVar = EnvGet('CUPS'); 126 131 if sEnvVar <> '' then do 127 call lineout cacheFile, "ac_cv_path_CUPS_CONFIG='" || sEnvVar || "'";132 call lineout cacheFile, "ac_cv_path_CUPS_CONFIG='" || sEnvVar || "'"; 128 133 end 129 134 130 135 /* is python env set */ 131 136 sEnvVar = EnvGet('PYTHONHOME'); 132 137 if sEnvVar <> '' then do 133 sPythonVersion = PythonVersion(sEnvVar);134 if sPythonVersion <> '-1' then do135 call lineout cacheFile, "ac_cv_path_PYTHON_CONFIG='" || sEnvVar || "/config/" || sPythonVersion || "'";136 call lineout cacheFile, "ac_cv_path_PYTHON='" || sEnvVar || "'";137 end138 sPythonVersion = PythonVersion(sEnvVar); 139 if sPythonVersion <> '-1' then do 140 call lineout cacheFile, "ac_cv_path_PYTHON_CONFIG='" || sEnvVar || "/config/" || sPythonVersion || "'"; 141 call lineout cacheFile, "ac_cv_path_PYTHON='" || sEnvVar || "'"; 142 end 138 143 end 139 144 … … 148 153 address cmd "make clean" 149 154 end 150 155 151 156 if brand = "YES" then do 152 157 svninfo = ".\svninfo" … … 160 165 say build_parms 161 166 address cmd 'make 2>&1 | tee build.log' 162 end 167 end 163 168 164 169 if pos("ZIP", cmdline) > 0 then do -
trunk/server/source3/lib/os2helper.c
r655 r656 1 /* This file contains helper functions for OS/2 - 2 do not try to compile on other platforms! */ 1 /* This file contains Samba helper functions for eComStation (OS/2) - 2 * do not try to compile on other platforms! 3 * 4 * Copyright (C) 2007-2011 5 * Silvan Scherrer 6 * Yuri Dario 7 * Paul Smedley 8 * 9 * This program is free software; you can redistribute it and/or modify 10 * it under the terms of the GNU General Public License as published by 11 * the Free Software Foundation; either version 3 of the License, or 12 * (at your option) any later version. 13 * 14 * This program is distributed in the hope that it will be useful, 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 * GNU General Public License for more details. 18 * 19 * You should have received a copy of the GNU General Public License 20 * along with this program; if not, see <http://www.gnu.org/licenses/>. 21 */ 3 22 4 23 #ifdef __OS2__ … … 51 70 { 52 71 /* We call __libc_Back_ioFileSizeSet directly instead of 53 ftruncate to force it not to zero expanding files to optimize 54 samba performance when copying files */72 ftruncate to force it not to zero expanding files to 73 optimize Samba performance when copying files */ 55 74 56 75 int rc = __libc_Back_ioFileSizeSet(fd, size, 0); … … 65 84 int os2_isattribute(char *path, unsigned short attr) 66 85 { 67 68 69 USHORT dosattr;/* attribute to search for */70 71 72 73 if (attr==aARCH)86 HDIR hdirFindHandle = HDIR_CREATE; 87 FILEFINDBUF3 FindBuffer = {0}; /* Returned from FindFirst/Next */ 88 USHORT dosattr; /* attribute to search for */ 89 ULONG ulResultBufLen = sizeof(FILEFINDBUF3); 90 ULONG ulFindCount = 1; /* Look for 1 file at a time */ 91 APIRET rc = NO_ERROR; /* Return code */ 92 if (attr == aARCH) 74 93 dosattr=MUST_HAVE_ARCHIVED; 75 else if (attr==aRONLY)94 else if (attr == aRONLY) 76 95 dosattr=MUST_HAVE_READONLY; 77 else if (attr==aSYSTEM)96 else if (attr == aSYSTEM) 78 97 dosattr=MUST_HAVE_SYSTEM; 79 else if (attr==aHIDDEN)98 else if (attr == aHIDDEN) 80 99 dosattr=MUST_HAVE_HIDDEN; 81 100 82 rc = DosFindFirst( path,/* File pattern - all files */101 rc = DosFindFirst( path, /* File pattern - all files */ 83 102 &hdirFindHandle, /* Directory search handle */ 84 103 dosattr, 85 104 &FindBuffer, /* Result buffer */ 86 105 ulResultBufLen, /* Result buffer length */ … … 88 107 FIL_STANDARD); /* Return Level 1 file info */ 89 108 90 91 92 93 94 109 if (rc != NO_ERROR) { 110 rc = DosFindClose(hdirFindHandle); /* Close our directory handle */ 111 return 1; 112 } else { 113 rc = DosFindClose(hdirFindHandle); /* Close our directory handle */ 95 114 return 0; 96 115 } /* endif */ 97 116 } 98 117 … … 157 176 } 158 177 */ 178 159 179 // OS/2 specific socketpair() implementation, as it only works in low mem 160 180 int os2_socketpair(int fds[2]) 161 181 { 162 182 int mypair[2]; 163 183 int rc = 0; 164 184 165 185 rc = socketpair(AF_UNIX, SOCK_STREAM, 0, mypair); 166 167 168 169 186 if (rc >= 0) { 187 fds[0] = mypair[0]; 188 fds[1] = mypair[1]; 189 } 170 190 171 191 return rc; … … 178 198 void os2_randget(char * buffer, int length) 179 199 { 180 181 182 183 200 UCHAR randbyte(); 201 unsigned int idx; 202 203 for (idx=0; idx<length; idx++) 184 204 buffer[idx] = randbyte(); 185 205 -
trunk/server/source3/lib/recvfile.c
r464 r656 25 25 26 26 #include "includes.h" 27 #ifdef __OS2__ 28 #define pipe(A) os2_socketpair(A) 29 #endif 27 30 28 31 /* Do this on our own in TRANSFER_BUF_SIZE chunks. … … 174 177 } 175 178 176 #ifndef __OS2__177 179 if ((pipefd[0] == -1) && (pipe(pipefd) == -1)) { 178 #else179 if ((pipefd[0] == -1) && (socketpair(AF_UNIX, SOCK_STREAM,0, pipefd) == -1)) {180 #endif181 180 try_splice_call = false; 182 181 return default_sys_recvfile(fromfd, tofd, offset, count); -
trunk/server/source3/lib/select.c
r593 r656 28 28 This means all Samba signal handlers should call sys_select_signal(). 29 29 */ 30 #ifdef __OS2__ 31 #define pipe(A) os2_socketpair(A) 32 #endif 30 33 31 34 static pid_t initialised; -
trunk/server/source3/libsmb/clientgen.c
r646 r656 435 435 DEBUG(0,("Error writing %d bytes to client. (%s)\n", 436 436 (int)(len+extradata), strerror(errno))); 437 printf("@remove me, %d bytes written, %d + %d bytes reqested\n", nwritten, len, extradata);438 437 return false; 439 438 } -
trunk/server/source3/passdb/pdb_tdb.c
r414 r656 339 339 int ret; 340 340 341 DEBUG(0,("@todo: tdbsam_convert: tdbsam_convert_backup\n")); 341 342 /* We only need the update backup for local db's. */ 342 343 if (db_is_local(name) && !tdbsam_convert_backup(name, pp_db)) { … … 349 350 state.success = true; 350 351 352 DEBUG(0,("@todo: tdbsam_convert: transaction_start\n")); 351 353 if (db->transaction_start(db) != 0) { 352 354 DEBUG(0, ("tdbsam_convert: Could not start transaction\n")); … … 354 356 } 355 357 358 DEBUG(0,("@todo: tdbsam_convert: tdbsam_upgrade_next_rid\n")); 356 359 if (!tdbsam_upgrade_next_rid(db)) { 357 360 DEBUG(0, ("tdbsam_convert: tdbsam_upgrade_next_rid failed\n")); … … 359 362 } 360 363 364 DEBUG(0,("@todo: tdbsam_convert: traverse\n")); 361 365 ret = db->traverse(db, tdbsam_convert_one, &state); 362 366 if (ret < 0) { … … 370 374 } 371 375 376 DEBUG(0,("@todo: tdbsam_convert: dbwrap_store_int32 major\n")); 372 377 if (dbwrap_store_int32(db, TDBSAM_VERSION_STRING, 373 378 TDBSAM_VERSION) != 0) { … … 375 380 goto cancel; 376 381 } 377 382 DEBUG(0,("@todo: tdbsam_convert: dbwrap_store_int32 minor\n")); 378 383 if (dbwrap_store_int32(db, TDBSAM_MINOR_VERSION_STRING, 379 384 TDBSAM_MINOR_VERSION) != 0) { … … 382 387 } 383 388 389 DEBUG(0,("@todo: tdbsam_convert: transaction_commit\n")); 384 390 if (db->transaction_commit(db) != 0) { 385 391 DEBUG(0, ("tdbsam_convert: Could not commit transaction\n")); … … 390 396 391 397 cancel: 398 DEBUG(0,("@todo: tdbsam_convert: transaction_cancel\n")); 392 399 if (db->transaction_cancel(db) != 0) { 393 400 smb_panic("tdbsam_convert: transaction_cancel failed");
Note:
See TracChangeset
for help on using the changeset viewer.