Changeset 745 for trunk/server/source3/include/smb_macros.h
- Timestamp:
- Nov 27, 2012, 4:43:17 PM (13 years ago)
- Location:
- trunk/server
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/server
- Property svn:mergeinfo changed
/vendor/current merged: 581,587,591,594,597,600,615,618,740
- Property svn:mergeinfo changed
-
trunk/server/source3/include/smb_macros.h
r414 r745 29 29 30 30 /* for readability... */ 31 #define IS_DOS_READONLY(test_mode) (((test_mode) & aRONLY) != 0)32 #define IS_DOS_DIR(test_mode) (((test_mode) & aDIR) != 0)33 #define IS_DOS_ARCHIVE(test_mode) (((test_mode) & aARCH) != 0)34 #define IS_DOS_SYSTEM(test_mode) (((test_mode) & aSYSTEM) != 0)35 #define IS_DOS_HIDDEN(test_mode) (((test_mode) & aHIDDEN) != 0)31 #define IS_DOS_READONLY(test_mode) (((test_mode) & FILE_ATTRIBUTE_READONLY) != 0) 32 #define IS_DOS_DIR(test_mode) (((test_mode) & FILE_ATTRIBUTE_DIRECTORY) != 0) 33 #define IS_DOS_ARCHIVE(test_mode) (((test_mode) & FILE_ATTRIBUTE_ARCHIVE) != 0) 34 #define IS_DOS_SYSTEM(test_mode) (((test_mode) & FILE_ATTRIBUTE_SYSTEM) != 0) 35 #define IS_DOS_HIDDEN(test_mode) (((test_mode) & FILE_ATTRIBUTE_HIDDEN) != 0) 36 36 37 37 #define SMB_WARN(condition, message) \ … … 69 69 70 70 /* access various service details */ 71 #define SERVICE(snum) (lp_servicename(snum))72 #define PRINTERNAME(snum) (lp_printername(snum))73 71 #define CAN_WRITE(conn) (!conn->read_only) 74 72 #define VALID_SNUM(snum) (lp_snum_ok(snum)) … … 147 145 #define IS_CONN_ENCRYPTED(conn) ((conn) ? (conn)->encrypted_tid : false) 148 146 149 /*******************************************************************150 find the difference in milliseconds between two struct timeval151 values152 ********************************************************************/153 154 #define TvalDiff(tvalold,tvalnew) \155 (((tvalnew)->tv_sec - (tvalold)->tv_sec)*1000 + \156 ((int)(tvalnew)->tv_usec - (int)(tvalold)->tv_usec)/1000)157 158 147 /**************************************************************************** 159 148 true if two IPv4 addresses are equal … … 206 195 207 196 #define IS_DC (lp_server_role()==ROLE_DOMAIN_PDC || lp_server_role()==ROLE_DOMAIN_BDC) 197 198 /* 199 * If you add any entries to KERBEROS_VERIFY defines, please modify the below expressions 200 * so they remain accurate. 201 */ 202 #define USE_KERBEROS_KEYTAB (KERBEROS_VERIFY_SECRETS != lp_kerberos_method()) 203 #define USE_SYSTEM_KEYTAB \ 204 ((KERBEROS_VERIFY_SECRETS_AND_KEYTAB == lp_kerberos_method()) || \ 205 (KERBEROS_VERIFY_SYSTEM_KEYTAB == lp_kerberos_method())) 208 206 209 207 /***************************************************************************** … … 267 265 #if defined(PARANOID_MALLOC_CHECKER) 268 266 269 #define PRS_ALLOC_MEM(ps, type, count) (type *)prs_alloc_mem_((ps),sizeof(type),(count))270 271 267 /* Get medieval on our ass about malloc.... */ 272 268 … … 304 300 305 301 #else 306 307 #define PRS_ALLOC_MEM(ps, type, count) (type *)prs_alloc_mem((ps),sizeof(type),(count))308 302 309 303 /* Regular malloc code. */
Note:
See TracChangeset
for help on using the changeset viewer.