This file is indexed.

/usr/include/gmt/gmt_notunix.h is in libgmt-dev 4.5.11-1build1.

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
/*--------------------------------------------------------------------
 *	$Id: gmt_notunix.h 9923 2012-12-18 20:45:53Z pwessel $
 *
 *	Copyright (c) 1991-2013 by P. Wessel and W. H. F. Smith
 *	See LICENSE.TXT file for copying and redistribution conditions.
 *
 *	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; version 2 or 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.
 *
 *	Contact info: gmt.soest.hawaii.edu
 *--------------------------------------------------------------------*/
/*
 * gmt_notunix.h contains definitions for constants, structures, and
 * other parameters parameters used by GMT that are not supported by
 * non-UNIX operating systems such as Microsoft Windows.  Note that
 * all of these entities are part of POSIX.  The contents of this file
 * is only activated if one of the system preprocessor flags are defined.
 * Currently considered non-UNIX systems include
 *
 *	flag    |	OS
 *	--------------------------------------------
 *	WIN32   | Microsoft Windows 9x, NT, 2000
 *	__EMX__ | IBM OS/2 with EMX support
 *	_WIN32  | Unix emulation under Windows, like
 *		| Cygwin or DJGPP.  WIN32 implies and
 *		| sets _WIN32 but the converse is not
 *		| true.
 *
 * Author:	Paul Wessel
 * Date:	09-NOV-1999
 * Version:	4.1.x
 *
 */

#ifndef _GMT_NOTUNIX_H
#define _GMT_NOTUNIX_H

/* A few general comments:
 * FLOCK is a pain. If cannot be used under EMX and _WIN32.
 * Also, users have problems with file locking because their 
 * NFS does not support it. Only those who are really sure should
 * activate -DFLOCK.
 */


/*--------------------------------------------------------------------
 *
 *	   W I N D O W S   1 9 9 5,  1 9 9 8,  2 0 0 0,  N T
 *
 *	 This section applies to Microsoft Windows 95, 98, NT
 *
 *--------------------------------------------------------------------*/

#ifdef WIN32	/* Start of Windows setup */

/* This section will override those in gmt_notposix.h which cannot
 * automatically be generated under Windows.
 */

/* Turn off some annoying "security" warnings in Vis Studio */

#pragma warning( disable : 4996 )

#define SET_IN_NOTUNIX	/* This forces the following not to be reset in gmt_notposix.h */

/* These functions are available under Windows with MSVC compilers */

#define HAVE_COPYSIGN	1
#undef  HAVE_LOG2
#undef  HAVE_LOG1P
#define HAVE_HYPOT		1
#undef  HAVE_ACOSH
#undef  HAVE_ASINH
#undef  HAVE_ATANH
#undef  HAVE_RINT
#undef  HAVE_IRINT
#undef  HAVE_ISNANF
#undef  HAVE_ISNAND
#define HAVE_ISNAN		1
#define HAVE_J0			1
#define HAVE_J1			1
#define HAVE_JN			1
#define HAVE_Y0			1
#define HAVE_Y1			1
#define HAVE_YN			1
#undef  HAVE_ERF
#undef  HAVE_ERFC
#define HAVE_STRDUP		1
#define HAVE_STRTOD		1
#ifdef __INTEL_COMPILER 
#define HAVE_SINCOS		1
#else
#undef  HAVE_SINCOS
#endif
#undef  HAVE_ALPHASINCOS
#undef  WORDS_BIGENDIAN

/* Several math functions exist but the names have a leading underscore */

#define copysign(x,y) _copysign(x,y)
#define hypot(x,y) _hypot(x,y)
#define isnan(x) _isnan(x)
#define j0(x) _j0(x)
#define j1(x) _j1(x)
#define jn(n,x) _jn(n,x)
#define y0(x) _y0(x)
#define y1(x) _y1(x)
#define yn(n,x) _yn(n,x)
#define strdup(s) _strdup(s)
#define GMT_STAT _stat

typedef int mode_t;		/* mode_t not defined under Windows; assumed a signed 4-byte integer */

/* WIN32 versus _WIN32:
 *
 * In GMT, the WIN32 flag is predefined by the MicroSoft C compiler.
 * If set, we assume we are in a non-posix environment and must make
 * up the missing functions with homespun code.
 * WIN32 will set _WIN32 but the converse is not true.
 *
 * _WIN32 is set whenever we are compiling GMT on a PC not running
 * a Unix flavor.  This is true when GMT is to be installed under
 * Cygwin32.  _WIN32, when set, causes the directory delimiter to
 * be set to \ instead of /, and also attempts to deal with the fact
 * that DOS file systems have both TEXT and BINARY file modes.
 */

#ifndef _WIN32
#define _WIN32
#endif

#define PATH_SEPARATOR ';'	/* Win uses ; while Unix uses : */

#include <io.h>
#include <direct.h>

/* GMT normally gets these macros from unistd.h */

#define R_OK 04
#define W_OK 02
#define X_OK 01
#define F_OK 00

/* This structure is normally taken from pwd.h */

struct passwd {
	char	*pw_name;
	int	pw_uid;
	int	pw_gid;
	char	*pw_dir;
	char	*pw_shell;
};

/* These two functions prototypes are normally in pwd.h & unistd.h;
 * Here, they are defined as dummies at the bottom of gmt_init.c
 * since there are no equivalents under Windows. */

EXTERN_MSC struct passwd *getpwuid (const int uid);
EXTERN_MSC int getuid (void);

/* getcwd is usually in unistd.h; we use a macro here
 * since the same function under WIN32 is prefixed with _;
 * it is defined in direct.h. */

#ifndef getcwd
#define getcwd(path, len) _getcwd(path, len)
#endif

/* access is usually in unistd.h; we use a macro here
 * since the same function under WIN32 is prefixed with _
 * and defined in io.h */

#define access(path, mode) _access(path, mode)

/* mkdir is usually in sys/stat.h; we use a macro here
 * since the same function under WIN32 is prefixed with _
 * and furthermore does not pass the mode argument;
 * it is defined in direct.h */

#define mkdir(path,mode) _mkdir(path)

/* fileno is usually in stdio.h; we use a macro here
 * since the same function under WIN32 is prefixed with _
 * and defined in stdio.h */

#define fileno(stream) _fileno(stream)

/* setmode is usually in unistd.h; we use a macro here
 * since the same function under WIN32 is prefixed with _
 * and defined in io.h */

#define setmode(fd,mode) _setmode(fd,mode)

EXTERN_MSC void GMT_setmode (int i_or_o);
EXTERN_MSC void DOS_path_fix (char *dir);

#endif		/* End of Windows setup */

/*--------------------------------------------------------------------
 *
 *	 		  O S / 2
 *
 *	 This section applies to OS/2 with EMX support
 *
 *--------------------------------------------------------------------*/
 
#ifdef __EMX__	/* Start of OS/2 with EMX support */
/*
 *   Definitions to aid the porting of GMT to OS/2
 *   Most of the porting is taken care of by configure.
 *
 * Author:	Allen Cogbill, Los Alamos National Laboratory
 * Date:	09-NOV-1999
 */
 

#define SET_IN_NOTUNIX	/* This forces the following not to be reset in gmt_notposix.h */

/* This applies specifically to O/S2 with EMX and Sun Free math library */

#define HAVE_COPYSIGN	1
#define HAVE_LOG1P		1
#define HAVE_HYPOT		1
#define HAVE_ACOSH		1
#define HAVE_ASINH		1
#define HAVE_ATANH		1
#define HAVE_RINT		1
#undef  HAVE_IRINT
#define HAVE_ISNANF		1
#define HAVE_ISNAND		1
#define HAVE_ISNAN		1
#define HAVE_J0			1
#define HAVE_J1			1
#define HAVE_JN			1
#define HAVE_Y0			1
#define HAVE_Y1			1
#define HAVE_YN			1
#define HAVE_ERF		1
#define HAVE_ERFC		1
#define HAVE_STRDUP		1
#define HAVE_STRTOD		1
#undef  HAVE_SINCOS
#undef  HAVE_ALPHASINCOS
#undef  WORDS_BIGENDIAN

#include <io.h>

#undef FLOCK		/* Do not support file locking */
#define SET_IO_MODE	/* Need to force binary i/o upon request */
#define NO_FCNTL	/* fcntl.h does not exist here */
#define GMT_STAT _stat

EXTERN_MSC void GMT_setmode (int i_or_o);

#endif		/* End of OS/2 with EMX support */


/*--------------------------------------------------------------------
 *
 *	 		  NON-UNIX
 *
 *	 This section applies to WIN32, Cygwin, and possibly DJGPP
 *
 *--------------------------------------------------------------------*/
 
#ifdef _WIN32	/* Start of NON-UNIX */

#undef FLOCK		/* Do not support file locking */
#define SET_IO_MODE	/* Need to force binary i/o upon request */

EXTERN_MSC void GMT_setmode (int i_or_o);

#endif		/* End of NON-UNIX */

/*===================================================================
 *		      U N I X   C L E AN - U P
 *===================================================================*/
 
/* Set a few Default Unix settings if they did not get set above */


#ifndef PATH_SEPARATOR
#define PATH_SEPARATOR ':'	/* Win uses ; while Unix uses : */
#endif

#ifndef NO_FCNTL
#include <fcntl.h>
#endif

#ifndef GMT_STAT
#define GMT_STAT stat
#endif

#endif /* _GMT_NOTUNIX_H */