This file is indexed.

/usr/include/pcp/platform_defs.h is in libpcp3-dev 3.5.11.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
/* src/include/platform_header.h.  Generated from platform_header.h.in by configure.  */
/*
 * Copyright (c) 2003 Moser, Inc. All Rights Reserved.
 * Copyright (c) 2000-2004,2008 Silicon Graphics, Inc.  All Rights Reserved.
 * 
 * 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.
 *
 * @configure_input@
 */

#ifndef _PLATFORM_DEFS_H
#define _PLATFORM_DEFS_H

#ifdef __cplusplus      
extern "C" {
#endif

#include <time.h>

/*
 * The type of timestamps in struct stat: either HAVE_STAT_TIMESPEC,
 * HAVE_STAT_TIMESPEC_T, HAVE_STAT_TIMESTRUC or HAVE_STAT_TIME_T
 */
/* #undef HAVE_STAT_TIMESPEC_T */
/* #undef HAVE_STAT_TIMESTRUC */
#define HAVE_STAT_TIMESPEC 1
/* #undef HAVE_STAT_TIME_T */

/* HAVE_ST_MTIME if stat.st_mtime has a ``spec'' on the end */
/* #undef HAVE_ST_MTIME_WITH_SPEC */

/* HAVE_ST_MTIME if stat.st_mtime has an ``e'' on the end */
/* #undef HAVE_ST_MTIME_WITH_E */

/* if your compiler supports LL sufix on 64 bit int constants */
#define HAVE_CONST_LONGLONG 1

/*
 * HAVE_UNDERBAR_ENVIRON if extern char **_environ is defined
 * (else extern char **environ will be used)
 */
/* #undef HAVE_UNDERBAR_ENVIRON */

/*
 * If the pointer-to-function arguments to scandir()
 * are (*scanfn)(const struct dirent *dep)
 * Otherwise ``const'' will be omitted.
 */
/* #undef HAVE_CONST_DIRENT */

/*
 * If the dirent structure contains a directory offset field.
 */
/* #undef HAVE_DIRENT_D_OFF */

/*
 * If getopt() needs $POSIXLY_CORRECT set in the environment to work
 * correctly, specifically to not treat -x as an option when foo is
 * invoked with the arguments "arg -x"
 */
#define HAVE_GETOPT_NEEDS_POSIXLY_CORRECT 1

/* Defined if printf %p -> 0x prefix for value */
#define HAVE_PRINTF_P_PFX 1
#ifdef HAVE_PRINTF_P_PFX
#define PRINTF_P_PFX ""
#else
#define PRINTF_P_PFX "0x"
#endif

/* Defined if bit fields are allocated left-to-right within a word */
/* #undef HAVE_BITFIELDS_LTOR */

/* if compiler can cast __uint64_t to double */
#define HAVE_CAST_U64_DOUBLE 1

/* long and pointer must be either 32 bit or 64 bit */
#define HAVE_64BIT_LONG 1
/* #undef HAVE_32BIT_LONG */
/* #undef HAVE_32BIT_PTR */
#define HAVE_64BIT_PTR 1

/* Define if header file is available */
#define HAVE_FCNTL_H 1
#define HAVE_LIMITS_H 1
#define HAVE_MALLOC_H 1
#define HAVE_STRINGS_H 1
#define HAVE_SYSLOG_H 1
#define HAVE_UNISTD_H 1
#define HAVE_STDDEF_H 1
#define HAVE_SCHED_H 1
#define HAVE_DLFCN_H 1
/* #undef HAVE_DL_H */
/* #undef HAVE_IEEEFP_H */
#define HAVE_SYS_TIME_H 1
#define HAVE_SYS_TIMEB_H 1
#define HAVE_SYS_TIMES_H 1
#define HAVE_SYS_SYSINFO_H 1
/* #undef HAVE_SYS_SYSTEMINFO_H */
#define HAVE_SYS_RESOURCE_H 1
#define HAVE_SYS_PRCTL_H 1
#define HAVE_ENDIAN_H 1
/* #undef HAVE_STANDARDS_H */
/* #undef HAVE_SYS_BYTEORDER_H */
#define HAVE_PTHREAD_H 1
#define HAVE_GETOPT_H 1
#define HAVE_VALUES_H 1
#define HAVE_LIBGEN_H 1
#define HAVE_SYS_PARAM_H 1
#define HAVE_SYS_MMAN_H 1
#define HAVE_SYS_UN_H 1
#define HAVE_STDINT_H 1
#define HAVE_PWD_H 1
#define HAVE_REGEX_H 1
#define HAVE_TERMIO_H 1
#define HAVE_TERMIOS_H 1
#define HAVE_SYS_TERMIOS_H 1
#define HAVE_SYS_IOCTL_H 1
#define HAVE_SYS_WAIT_H 1
/* #undef HAVE_WINDOWS_H */
/* #undef HAVE_WINSOCK2_H */
/* #undef HAVE_WS2TCPIP_H */
/* #undef HAVE_IPTYPES_H */
#define HAVE_NETDB_H 1
#define HAVE_SYS_SOCKET_H 1
#define HAVE_NETINET_IN_H 1
#define HAVE_NETINET_TCP_H 1
#define HAVE_ARPA_INET_H 1

/* #undef HAVE_SYS_ENDIAN_H */
/* #undef HAVE_SYS_MACHINE_H */
/* #undef HAVE_MACHINE_ENDIAN_H */
#define HAVE_READLINE 1

#if defined(HAVE_MALLOC_H)
#include <malloc.h>
#endif
#if defined(HAVE_STDDEF_H)
#include <stddef.h>
#endif
#if defined(HAVE_SYSLOG_H)
#include <syslog.h>
#endif
#if defined(HAVE_WINDOWS_H)
#include <windows.h>
#endif
#if defined(HAVE_WINSOCK2_H)
#include <winsock2.h>
#endif
#if defined(HAVE_WS2TCPIP_H)
#include <ws2tcpip.h>
#endif
#if defined(HAVE_SYS_TIMEB_H)
#include <sys/timeb.h>
#endif

/* HAVE_NETWORK_BYTEORDER for big endian systems (not Intel) */
#if defined(HAVE_ENDIAN_H)
#include <endian.h>
#elif defined(HAVE_SYS_ENDIAN_H)
#include <sys/endian.h>
#elif defined(HAVE_MACHINE_ENDIAN_H)
#include <machine/endian.h>
#endif
#if defined(HAVE_ENDIAN_H) || defined(HAVE_SYS_ENDIAN_H) || defined(HAVE_MACHINE_ENDIAN_H)
#if defined(BYTE_ORDER) && BYTE_ORDER == BIG_ENDIAN
#define HAVE_NETWORK_BYTEORDER
#endif
#endif

#if defined(HAVE_SYS_BYTEORDER_H)
#include <sys/byteorder.h>
#if defined(_BIG_ENDIAN)
#define HAVE_NETWORK_BYTEORDER
#endif
#endif

#if defined(HAVE_SYS_MACHINE_H)
#include <sys/machine.h>
#if defined(BYTE_ORDER) && BYTE_ORDER == BIG_ENDIAN
#define HAVE_NETWORK_BYTEORDER
#endif
#endif

/* define which libraries are available */
/* #undef HAVE_LIBREGEX */

/* define which libc functions are available */
#define HAVE_WAIT3 1

#define HAVE_MKTIME 1
#define HAVE_UNSETENV 1

#define HAVE_GETHOSTNAME 1
#define HAVE_SELECT 1
#define HAVE_SOCKET 1

#define HAVE_UNAME 1
#define HAVE_SYSLOG 1
#define HAVE___CLONE 1
#define HAVE_PIPE2 1
#define HAVE_FCNTL 1

#define HAVE_PRCTL 1
#define HAVE_SETLINEBUF 1
#define HAVE_WAITPID 1
#define HAVE_ATEXIT 1
#define HAVE_KILL 1

#define HAVE_CHOWN 1
#define HAVE_GETCWD 1
#define HAVE_SCANDIR 1
#define HAVE_MKSTEMP 1
#define HAVE_GETPWNAM 1

#define HAVE_BRK 1
#define HAVE_SBRK 1
#define HAVE_MEMALIGN 1
#define HAVE_VALLOC 1

#define HAVE_NANOSLEEP 1
/* #undef HAVE_USLEEP */

#define HAVE_SIGNAL 1
#define HAVE_SIGHOLD 1
#define HAVE_SIGRELSE 1
#define HAVE_TCGETATTR 1
#define GWINSZ_IN_SYS_IOCTL 1

/* #undef HAVE_REGEX */
/* #undef HAVE_REGCMP */
#define HAVE_REGEXEC 1
#define HAVE_REGCOMP 1

#define HAVE_STRTOD 1
#define HAVE_STRTOL 1
#define HAVE_STRTOLL 1
#define HAVE_STRTOULL 1

#define HAVE_DLOPEN 1
#define HAVE_ISNANF 1
#define HAVE_ISNAND 1
/* #undef HAVE_FLOG10 */
#define HAVE_DIRNAME 1
#define HAVE_BASENAME 1
#define HAVE_SYSINFO 1
/* #undef HAVE_READDIR64 */

/* if termio signals are supported */
#ifdef HAVE_TERMIOS_H
#ifdef HAVE_TCGETATTR
#define HAVE_TERMIO_SIGNALS
#endif
#endif

/* if the /proc pseudo filesystem exists */
#define HAVE_PROCFS 1

#ifndef ULONGLONG_MAX 
#define ULONGLONG_MAX (__uint64_t)18446744073709551615ULL
#endif

#ifndef LONGLONG_MAX 
#define LONGLONG_MAX (__int64_t)9223372036854775807LL
#endif

/* some types only known by some compilers */
#define uint_t unsigned int
/* #undef __int32_t */
/* #undef __uint32_t */
/* #undef __int64_t */
/* #undef __uint64_t */

/* Check if __psint_t is set to something meaningful */
/* #undef HAVE___PSINT_T */
#ifndef HAVE___PSINT_T 
#ifdef HAVE_32BIT_PTR
typedef int __psint_t;
#elif defined HAVE_64BIT_PTR
#ifdef HAVE_64BIT_LONG
typedef long __psint_t;
#else
/* This is a very strange architecture, which has 64 bit pointers but
 * not 64 bit longs. So, I'd just punt here and assume long long is Ok */
typedef long long __psint_t;
#endif
#else
#error Unknown pointer size - not 32 and not 64
#endif
#endif

/* Check if ptrdiff_t type is available */
#define HAVE_PTRDIFF_T 1
#ifndef HAVE_PTRDIFF_T
#define ptrdiff_t	long
#endif

/*
 * socklen_t is not always defined, so use mysocklen_t as abstraction
 */
#define HAVE_SOCKLEN_T 1
#ifdef HAVE_SOCKLEN_T
#include <sys/types.h>
#include <sys/socket.h>
typedef socklen_t mysocklen_t;
#else
typedef int mysocklen_t;
#endif

/*
 * MAXNAMELEN hides in may places and may have alias names ...
 */
#ifndef MAXNAMELEN
#include <stdio.h>
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#if !defined(MAXNAMELEN) && defined(FILENAME_MAX)
/* posix version of the bsd MAXNAMELEN macro */
#define MAXNAMELEN FILENAME_MAX
#endif
#endif
#ifndef MAXNAMELEN
bozo! need to find where MAXNAMELEN is defined for this platform
#endif

/*
 * MAXPATHLEN hides in many places and may have alias names ...
 */
#ifndef MAXPATHLEN
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_LIMITS_H
#include <limits.h>
#endif
#if !defined(MAXPATHLEN) && defined(PATH_MAX)
/* posix version of the bsd MAXPATHLEN macro */
#define MAXPATHLEN PATH_MAX
#endif
#endif
#ifndef MAXPATHLEN
bozo! need to find where MAXPATHLEN is defined for this platform
#endif

/*
 * MAXHOSTNAMELEN hides in many places and may also have aliases ...
 */
#ifndef MAXHOSTNAMELEN
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#endif
#ifndef MAXHOSTNAMELEN
#ifdef HAVE_LIMITS_H
#include <limits.h>
#endif
#endif
#ifndef MAXHOSTNAMELEN
#ifdef HAVE_NETDB_H
#include <netdb.h>
#endif
#endif
#ifndef MAXHOSTNAMELEN
#ifdef HAVE_IPTYPES_H
#include <iptypes.h>
#define MAXHOSTNAMELEN MAX_HOSTNAME_LEN
#endif
#endif
#ifndef MAXHOSTNAMELEN
bozo! need to find where MAXHOSTNAMELEN is defined for this platform
#endif

#ifndef HAVE_FLOG10
#if !defined(flog10)
#define flog10(x) (float)log10((double)x)
#endif
#endif

#if !defined(WORD_BIT)
#define WORD_BIT 32
#endif

#define RETSIGTYPE void
#ifndef RETSIGTYPE
#define RETSIGTYPE void
#endif

/* #undef HAVE_SIGPF */
#ifndef HAVE_SIGPF
/* The return type of signal() */
typedef void (*SIG_PF) (int);
#endif

#define HAVE_SA_SIGINFO 1
#define HAVE_SIGPIPE 1
#define HAVE_SIGHUP 1

#define HAVE_WAIT_INCLUDES_SIGNAL 1
#ifndef HAVE_WAIT_INCLUDES_SIGNAL
#include <signal.h>
#endif

/* #undef HAVE_PR_TERMCHILD */
#define HAVE_PR_SET_PDEATHSIG 1

#ifdef HAVE_LIBGEN_H
#include <libgen.h>
#endif

#define HAVE_PTHREAD_MUTEX_T 1

#define HAVE_FNDELAY 1
#if !defined(HAVE_FNDELAY)
/* Only Solaris is known to need this so far */
#ifndef FNDELAY
#define FNDELAY O_NDELAY
#endif
#endif

/* #undef HAVE_ALTZONE */
#define HAVE_STRFTIME_z 1

#ifndef HAVE_VALLOC
#define valloc(x) malloc(x)
#endif

/* Determine if we are on a Linux box */
#define IS_LINUX 1
#ifdef IS_LINUX
#define isnand(d) isnan(d)	/* isnan is a type-independent macro (isnanf is defined though) */
#ifndef O_CLOEXEC
#define O_CLOEXEC 02000000	/* set close_on_exec */
#endif
#endif

/* Determine if we are on a Solaris box */
/* #undef IS_SOLARIS */

/* Determine if we are on an AIX box */
/* #undef IS_AIX */

/* Determine if we are on an FreeBSD box */
/* #undef IS_FREEBSD */

/* Determine if we are on a Mac OS X box */
/* #undef IS_DARWIN */
#ifdef IS_DARWIN
#define DLOPEN_NO_WARN
#define st_atim st_atimespec    /* workaround */
#define st_mtim st_mtimespec    /* workaround */
#define st_ctim st_ctimespec    /* workaround */
#define isnand(d) isnan(d)	/* isnan is a type-independent macro */
#define isnanf(d) isnan(d)	/* isnan is a type-independent macro */
#endif

/* Determine if we are on Windows with MinGW compiler */
/* #undef IS_MINGW */
#ifdef IS_MINGW
#define isnand(d) isnan(d)	/* isnan is a type-independent macro */
#define isnanf(d) isnan(d)	/* isnan is a type-independent macro */

#ifdef PCP_VERSION		/* used to reduce namespace pollution */
#define EINPROGRESS	WSAEINPROGRESS
#define ENETDOWN	WSAENETDOWN
#define ENETUNREACH	WSAENETUNREACH
#define ECONNRESET	WSAECONNRESET
#define ETIMEDOUT	WSAETIMEDOUT
#define ECONNREFUSED	WSAECONNREFUSED
#define EHOSTDOWN	WSAEHOSTDOWN
#define EHOSTUNREACH	WSAEHOSTUNREACH
#define EOPNOTSUPP	WSAEOPNOTSUPP
#define EADDRINUSE	WSAEADDRINUSE
#define EPROTO		WSAEPROTONOSUPPORT
#define EMSGSIZE	WSAEMSGSIZE
#define ENODATA		WSANO_DATA
extern char *wsastrerror(int);

#define HAVE_PIPE1
#define HAVE_MKDIR2
#define HAVE_RENAME2
#define HAVE_DLOPEN 1
#define HAVE_FNDELAY 1

#define MAP_FAILED	NULL
#define O_NDELAY	0
#define SIGHUP		(NSIG+1)
#define SIGUSR1		(NSIG+2)
#define SIGBUS		(NSIG+3)
#define S_IRGRP		0
#define S_IROTH		0
#define S_IRWXG		0
#define S_IRWXO		0
#define S_ISVTX		0

#define fcntl(f, cmd, ...) 0
#define mkdir2(path, mode) mkdir(path)
#define rename2(a, b) (unlink(b), rename(a,b))
#define realpath(path, pp) strcpy(pp, path)
#define pipe1(fds) _pipe(fds, 4096, O_BINARY)

extern void setlinebuf(FILE *);
extern char *index(const char *, int);
extern char *rindex(const char *, int);
extern long int lrand48(void);
extern void srand48(long int);

#define HAVE_STRUCT_TIMESPEC 1
#ifndef HAVE_STRUCT_TIMESPEC
/*
 * This is a bit odd ... but for MinGW, struct timespec is not in
 * <time.h> but _is_ in <pthread.h> ... the structure (sec, nanosec)
 * is what we want, so include <pthread.h>
 */
#include <pthread.h>
#endif

extern int nanosleep(const struct timespec *, struct timespec *);
extern unsigned int sleep(unsigned int);

enum { RTLD_NOW, RTLD_LAZY };
extern void *dlopen(const char *, int);
extern char *dlerror(void);
extern void *dlsym(void *, const char *);
extern int dlclose(void *);

extern void openlog(const char *, int, int);
extern void syslog(int, const char *, ...);
extern void closelog(void);
#endif
enum { LOG_EMERG, LOG_ALERT, LOG_CRIT, LOG_ERR,
       LOG_WARNING, LOG_NOTICE, LOG_INFO, LOG_DEBUG,
       LOG_PID, LOG_CONS, LOG_DAEMON };

#ifdef LIBPCP_INTERNAL
#define INTERN __declspec(dllexport)
#define EXTERN
#else
#define INTERN
#define EXTERN __declspec(dllimport)
#endif

#define setoserror(n)	(errno = (n))	/* not SetLastError() */
#define oserror()	errno		/* not GetLastError() */
#define neterror()	WSAGetLastError()
#define hosterror()	WSAGetLastError()
#define osstrerror()	strerror(GetLastError())
#define netstrerror()	strerror(WSAGetLastError())
#define hoststrerror()	strerror(WSAGetLastError())

#else /*!MINGW*/
#define INTERN
#define EXTERN extern

#define setoserror(n)	(errno = (n))
#define oserror()	errno
#define neterror()	errno
#define hosterror()	h_errno
#define osstrerror()	strerror(errno)
#define netstrerror()	strerror(errno)
#define hoststrerror()	hstrerror(h_errno)
#endif


/*
 * run-time environment that is in libc for most platforms, but for some
 * we need to provide our own implementation
 */
#ifndef HAVE_DIRNAME
extern char *dirname(char *);
#endif
#ifndef HAVE_BASENAME
extern char *basename(char *);
#endif
#ifndef HAVE_ISNAND
extern int isnand (double);
#endif

#ifdef HAVE_CONST_DIRENT
#define const_dirent const struct dirent
#else
#define const_dirent struct dirent
#endif

#ifndef HAVE_SCANDIR
struct dirent;
extern int scandir(const char *, struct dirent ***,
                   int(*filter)(const_dirent *),
                   int(*compare)(const_dirent **, const_dirent **));
extern int alphasort(const_dirent **, const_dirent **);
#endif

#ifndef HAVE_MKDIR2
#define mkdir2(path,mode) mkdir(path,mode)
#endif

#ifndef HAVE_RENAME2
#define rename2(path,target) rename(path,target)
#endif

#ifndef HAVE_PIPE1
#define pipe1(fds) pipe(fds)
#endif

/* printf candy ... */
#define FMT_PID "d"
#define FMT_PTHREAD "lu"

#ifndef __cplusplus      
#undef inline
#endif

#ifdef __cplusplus      
}
#endif

#endif /* _PLATFORM_DEFS_H */