Files
amiga-smbfs/source_code/smbfs.h
T
Olaf Barthel 78e86b738f smbfs 1.69 (13.6.2005)
- The time stamps used in "proc.c", as returned and submitted to
  the SMB file system on the other end of the wire are apparently
  all in Universally Coordinated Time already (or at least, this
  seems to be the case with Samba and Windows XP). Hence no conversion
  between local time and UTC is necessary, which would otherwise
  distort all date stamps converted. I modified the file system to
  leave all time stamps essentially unadjusted for local time in
  "proc.c". The local time zone adjustments are now performed only
  where the time in question is known to be Amiga-specific, such as
  the current system time or the date stamp to set for a file.

  The time conversion appears to be working correctly now, but it
  does ignore the effects of daylight savings time, which you might
  want to adjust for manually through the TIMEZONEOFFSET option
  (careful though: this overrides your current locale-defined time
  zone settings as far as smbfs is concerned).

  Unsolved problem: at least Windows XP seems to return different
  time stamps for directory listings and for indidivual files. As
  far as I can tell, the sets of time stamps returned for either
  doesn't match anywhere.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/amiga-smbfs/trunk@13 26594b9e-b914-4e86-b7a1-9402bd427170
2005-06-13 08:04:29 +00:00

160 lines
4.7 KiB
C

/*
* $Id: smbfs.h,v 1.3 2005-06-13 08:04:15 obarthel Exp $
*
* :ts=4
*
* SMB file system wrapper for AmigaOS, using the AmiTCP V3 API
*
* Copyright (C) 2000-2005 by Olaf `Olsen' Barthel <olsen@sourcery.han.de>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _SMBFS_H
#define _SMBFS_H 1
/****************************************************************************/
#ifndef _SYSTEM_HEADERS_H
#include "system_headers.h"
#endif /* _SYSTEM_HEADERS_H */
#ifndef _ASSERT_H
#include "assert.h"
#endif /* _ASSERT_H */
/****************************************************************************/
#define SAME (0)
#define OK (0)
#define NOT !
/****************************************************************************/
#ifndef ZERO
#define ZERO ((BPTR)NULL)
#endif /* ZERO */
/****************************************************************************/
#ifndef AMIGA_COMPILER_H
/****************************************************************************/
#if defined(__SASC)
#define FAR __far
#define ASM __asm
#define REG(r,p) register __##r p
#define INLINE __inline
#endif /* __SASC */
#if defined(__GNUC__)
#define FAR
#define ASM
#define REG(r,p) p __asm(#r)
#define INLINE __inline__
#endif /* __GNUC__ */
/****************************************************************************/
#ifndef VARARGS68K
#define VARARGS68K
#endif /* VARARGS68K */
/*****************************************************************************/
#endif /* AMIGA_COMPILER_H */
/*****************************************************************************/
#ifndef min
#define min(a,b) ((a) < (b) ? (a) : (b))
#endif /* min */
/****************************************************************************/
#if defined(__SASC)
extern struct Library * FAR AbsExecBase;
#else
#ifndef AbsExecBase
#define AbsExecBase (*(struct Library **)4)
#endif /* AbsExecBase */
#endif /* __SASC */
/****************************************************************************/
extern struct Library * SocketBase;
extern struct Library * SysBase;
extern struct Library * DOSBase;
/****************************************************************************/
#if defined(__amigaos4__)
/****************************************************************************/
extern struct ExecIFace * IExec;
extern struct DOSIFace * IDOS;
extern struct SocketIFace * ISocket;
/****************************************************************************/
#endif /* __amigaos4__ */
/****************************************************************************/
extern int h_errno;
/****************************************************************************/
extern int BroadcastNameQuery(char *name, char *scope, UBYTE *address);
extern LONG CompareNames(STRPTR a,STRPTR b);
extern LONG GetTimeZoneDelta(VOID);
extern STRPTR amitcp_strerror(int error);
extern STRPTR host_strerror(int error);
extern time_t MakeTime(const struct tm * const tm);
extern ULONG GetCurrentTime(VOID);
extern VOID GMTime(time_t seconds,struct tm * tm);
extern VOID VARARGS68K ReportError(STRPTR fmt,...);
extern VOID StringToUpper(STRPTR s);
extern VOID VARARGS68K SPrintf(STRPTR buffer, STRPTR formatString,...);
/****************************************************************************/
size_t strlcpy(char *dst, const char *src, size_t siz);
size_t strlcat(char *dst, const char *src, size_t siz);
/****************************************************************************/
extern void smb_encrypt(unsigned char *passwd, unsigned char *c8, unsigned char *p24);
extern void smb_nt_encrypt(unsigned char *passwd, unsigned char *c8, unsigned char *p24);
/****************************************************************************/
extern VOID FreeMemory(APTR address);
extern APTR AllocateMemory(ULONG size);
#define malloc(s) AllocateMemory(s)
#define free(m) FreeMemory(m)
/****************************************************************************/
#undef memcpy
#define memcpy(to,from,size) ((void)CopyMem((APTR)(from),(APTR)(to),(ULONG)(size)))
/****************************************************************************/
#endif /* _SMBFS_H */