1999-05-09 04:20:59 +00:00
|
|
|
/*
|
|
|
|
* alignment.h, Copyright, 1998, Richard Sharpe, All Rights Reserved
|
|
|
|
*
|
2002-08-28 21:04:11 +00:00
|
|
|
* $Id: alignment.h,v 1.4 2002/08/28 21:00:05 jmayer Exp $
|
1999-09-23 05:26:18 +00:00
|
|
|
*
|
1999-05-09 04:20:59 +00:00
|
|
|
* Please see the file COPYING in the top level for details of copying
|
2002-08-28 21:04:11 +00:00
|
|
|
* this software. Use of this software is approved only under certain
|
1999-05-09 04:20:59 +00:00
|
|
|
* conditions.
|
2002-08-28 21:04:11 +00:00
|
|
|
*
|
1999-05-09 04:20:59 +00:00
|
|
|
* This file implements the alignment macros for the Threaded SMB Server
|
|
|
|
*
|
2002-08-28 21:04:11 +00:00
|
|
|
* For the moment we assume Intel style architecture, but can support
|
1999-05-09 04:20:59 +00:00
|
|
|
* others.
|
|
|
|
*
|
|
|
|
* Modification History
|
|
|
|
*
|
|
|
|
* 16-Oct-1998, RJS, Initial Coding
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __ALIGNMENT_H
|
|
|
|
#define __ALIGNMENT_H
|
|
|
|
|
|
|
|
#define GBYTE(buf, pos) (unsigned char)((char)buf[pos])
|
1999-05-10 20:17:36 +00:00
|
|
|
#define GSHORT(buf, pos) pletohs(&buf[pos])
|
|
|
|
#define GSSHORT(buf, pos) (signed)pletohs(&buf[pos])
|
|
|
|
#define GWORD(buf, pos) pletohl(&buf[pos])
|
1999-05-09 04:20:59 +00:00
|
|
|
|
|
|
|
#endif
|