1*159d09a2SMark Phalan /*
2*159d09a2SMark Phalan * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
3*159d09a2SMark Phalan * Use is subject to license terms.
4*159d09a2SMark Phalan */
5*159d09a2SMark Phalan
6*159d09a2SMark Phalan
7*159d09a2SMark Phalan /*
8*159d09a2SMark Phalan * k5-platform.h
9*159d09a2SMark Phalan *
10*159d09a2SMark Phalan * Copyright 2003, 2004, 2005 Massachusetts Institute of Technology.
11*159d09a2SMark Phalan * All Rights Reserved.
12*159d09a2SMark Phalan *
13*159d09a2SMark Phalan * Export of this software from the United States of America may
14*159d09a2SMark Phalan * require a specific license from the United States Government.
15*159d09a2SMark Phalan * It is the responsibility of any person or organization contemplating
16*159d09a2SMark Phalan * export to obtain such a license before exporting.
17*159d09a2SMark Phalan *
18*159d09a2SMark Phalan * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
19*159d09a2SMark Phalan * distribute this software and its documentation for any purpose and
20*159d09a2SMark Phalan * without fee is hereby granted, provided that the above copyright
21*159d09a2SMark Phalan * notice appear in all copies and that both that copyright notice and
22*159d09a2SMark Phalan * this permission notice appear in supporting documentation, and that
23*159d09a2SMark Phalan * the name of M.I.T. not be used in advertising or publicity pertaining
24*159d09a2SMark Phalan * to distribution of the software without specific, written prior
25*159d09a2SMark Phalan * permission. Furthermore if you modify this software you must label
26*159d09a2SMark Phalan * your software as modified software and not distribute it in such a
27*159d09a2SMark Phalan * fashion that it might be confused with the original M.I.T. software.
28*159d09a2SMark Phalan * M.I.T. makes no representations about the suitability of
29*159d09a2SMark Phalan * this software for any purpose. It is provided "as is" without express
30*159d09a2SMark Phalan * or implied warranty.
31*159d09a2SMark Phalan *
32*159d09a2SMark Phalan *
33*159d09a2SMark Phalan * Some platform-dependent definitions to sync up the C support level.
34*159d09a2SMark Phalan * Some to a C99-ish level, some related utility code.
35*159d09a2SMark Phalan *
36*159d09a2SMark Phalan * Currently:
37*159d09a2SMark Phalan * + make "static inline" work
38*159d09a2SMark Phalan * + 64-bit types and load/store code
39*159d09a2SMark Phalan * + SIZE_MAX
40*159d09a2SMark Phalan * + shared library init/fini hooks
41*159d09a2SMark Phalan * + consistent getpwnam/getpwuid interfaces
42*159d09a2SMark Phalan */
43*159d09a2SMark Phalan
44*159d09a2SMark Phalan static unsigned short
load_16_be(unsigned char * p)45*159d09a2SMark Phalan load_16_be (unsigned char *p)
46*159d09a2SMark Phalan {
47*159d09a2SMark Phalan return (p[1] | (p[0] << 8));
48*159d09a2SMark Phalan }
49*159d09a2SMark Phalan
50