New upstream version 0.1.9998svn3293+dfsg
Gianfranco Costamagna
5 years ago
28 | 28 |
* SUCH DAMAGE.
|
29 | 29 |
*/
|
30 | 30 |
|
|
31 |
#ifdef __sun__
|
|
32 |
# define _POSIX_C_SOURCE 199506L /* for dirfd() */
|
|
33 |
# define __EXTENSIONS__ 1 /* for u_short and friends */
|
|
34 |
#endif
|
31 | 35 |
#if HAVE_NBTOOL_CONFIG_H
|
32 | 36 |
#include "nbtool_config.h"
|
33 | 37 |
#endif
|
|
63 | 67 |
|
64 | 68 |
#ifdef __sun__
|
65 | 69 |
# include "solfakes.h"
|
66 | |
# ifndef __XOPEN_OR_POSIX
|
67 | |
# define dirfd(dir) ((dir)->dd_fd)
|
68 | |
#else
|
69 | |
# define dirfd(dir) ((dir)->d_fd)
|
70 | |
#endif
|
|
70 |
# define dirfd(dir) ((dir)->d_fd)
|
71 | 71 |
#endif
|
72 | 72 |
#ifdef _MSC_VER
|
73 | 73 |
# include "mscfakes.h"
|
0 | |
/* $Id: kmkbuiltin.c 3291 2019-01-08 15:06:54Z bird $ */
|
|
0 |
/* $Id: kmkbuiltin.c 3293 2019-01-08 21:13:50Z bird $ */
|
1 | 1 |
/** @file
|
2 | 2 |
* kMk Builtin command execution.
|
3 | 3 |
*/
|
|
297 | 297 |
{
|
298 | 298 |
struct KMKBUILTINENTRY const *pEntry;
|
299 | 299 |
size_t cchAndStart;
|
|
300 |
#if K_ENDIAN == K_ENDIAN_BIG
|
|
301 |
size_t cch;
|
|
302 |
#endif
|
300 | 303 |
int cLeft;
|
301 | 304 |
|
302 | 305 |
pszCmd += sizeof(s_szPrefix) - 1;
|
|
309 | 312 |
#endif
|
310 | 313 |
cchAndStart = strlen(pszCmd);
|
311 | 314 |
#if K_ENDIAN == K_ENDIAN_BIG
|
|
315 |
cch = cchAndStart;
|
312 | 316 |
cchAndStart <<= K_ARCH_BITS - 8;
|
313 | |
switch (cchAndStart)
|
|
317 |
switch (cch)
|
314 | 318 |
{
|
315 | 319 |
default: /* fall thru */
|
316 | 320 |
# if K_ARCH_BITS >= 64
|
0 | |
/* $Id: kDefs.h 111 2018-03-16 12:46:58Z bird $ */
|
|
0 |
/* $Id: kDefs.h 116 2019-01-08 19:23:20Z bird $ */
|
1 | 1 |
/** @file
|
2 | 2 |
* kTypes - Defines and Macros.
|
3 | 3 |
*/
|
|
337 | 337 |
# define K_ENDIAN K_ARCH_ENDIAN
|
338 | 338 |
# elif defined(__BYTE_ORDER__) && defined(__ORDER_LITTLE_ENDIAN__) && defined(__ORDER_BIG_ENDIAN__)
|
339 | 339 |
# if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
340 | |
# define K_ENDIAN K_ARCH_LITTLE
|
|
340 |
# define K_ENDIAN K_ENDIAN_LITTLE
|
341 | 341 |
# elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
342 | |
# define K_ENDIAN K_ARCH_BIG
|
|
342 |
# define K_ENDIAN K_ENDIAN_BIG
|
343 | 343 |
# else
|
344 | 344 |
# error "Port Me or define K_ENDIAN."
|
345 | 345 |
# endif
|