PostgreSQL Source Code  git master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
genfile.c
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * genfile.c
4  * Functions for direct access to files
5  *
6  *
7  * Copyright (c) 2004-2017, PostgreSQL Global Development Group
8  *
9  * Author: Andreas Pflug <pgadmin@pse-consulting.de>
10  *
11  * IDENTIFICATION
12  * src/backend/utils/adt/genfile.c
13  *
14  *-------------------------------------------------------------------------
15  */
16 #include "postgres.h"
17 
18 #include <sys/file.h>
19 #include <sys/stat.h>
20 #include <unistd.h>
21 #include <dirent.h>
22 
23 #include "access/htup_details.h"
24 #include "access/xlog_internal.h"
25 #include "catalog/pg_type.h"
26 #include "funcapi.h"
27 #include "mb/pg_wchar.h"
28 #include "miscadmin.h"
29 #include "postmaster/syslogger.h"
30 #include "storage/fd.h"
31 #include "utils/builtins.h"
32 #include "utils/memutils.h"
33 #include "utils/timestamp.h"
34 
35 typedef struct
36 {
37  char *location;
38  DIR *dirdesc;
41 
42 
43 /*
44  * Convert a "text" filename argument to C string, and check it's allowable.
45  *
46  * Filename may be absolute or relative to the DataDir, but we only allow
47  * absolute paths that match DataDir or Log_directory.
48  */
49 static char *
51 {
52  char *filename;
53 
54  filename = text_to_cstring(arg);
55  canonicalize_path(filename); /* filename can change length here */
56 
57  if (is_absolute_path(filename))
58  {
59  /* Disallow '/a/b/data/..' */
60  if (path_contains_parent_reference(filename))
61  ereport(ERROR,
62  (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
63  (errmsg("reference to parent directory (\"..\") not allowed"))));
64 
65  /*
66  * Allow absolute paths if within DataDir or Log_directory, even
67  * though Log_directory might be outside DataDir.
68  */
69  if (!path_is_prefix_of_path(DataDir, filename) &&
72  ereport(ERROR,
73  (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
74  (errmsg("absolute path not allowed"))));
75  }
76  else if (!path_is_relative_and_below_cwd(filename))
77  ereport(ERROR,
78  (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
79  (errmsg("path must be in or below the current directory"))));
80 
81  return filename;
82 }
83 
84 
85 /*
86  * Read a section of a file, returning it as bytea
87  *
88  * Caller is responsible for all permissions checking.
89  *
90  * We read the whole of the file when bytes_to_read is negative.
91  */
92 static bytea *
93 read_binary_file(const char *filename, int64 seek_offset, int64 bytes_to_read,
94  bool missing_ok)
95 {
96  bytea *buf;
97  size_t nbytes;
98  FILE *file;
99 
100  if (bytes_to_read < 0)
101  {
102  if (seek_offset < 0)
103  bytes_to_read = -seek_offset;
104  else
105  {
106  struct stat fst;
107 
108  if (stat(filename, &fst) < 0)
109  {
110  if (missing_ok && errno == ENOENT)
111  return NULL;
112  else
113  ereport(ERROR,
115  errmsg("could not stat file \"%s\": %m", filename)));
116  }
117 
118  bytes_to_read = fst.st_size - seek_offset;
119  }
120  }
121 
122  /* not sure why anyone thought that int64 length was a good idea */
123  if (bytes_to_read > (MaxAllocSize - VARHDRSZ))
124  ereport(ERROR,
125  (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
126  errmsg("requested length too large")));
127 
128  if ((file = AllocateFile(filename, PG_BINARY_R)) == NULL)
129  {
130  if (missing_ok && errno == ENOENT)
131  return NULL;
132  else
133  ereport(ERROR,
135  errmsg("could not open file \"%s\" for reading: %m",
136  filename)));
137  }
138 
139  if (fseeko(file, (off_t) seek_offset,
140  (seek_offset >= 0) ? SEEK_SET : SEEK_END) != 0)
141  ereport(ERROR,
143  errmsg("could not seek in file \"%s\": %m", filename)));
144 
145  buf = (bytea *) palloc((Size) bytes_to_read + VARHDRSZ);
146 
147  nbytes = fread(VARDATA(buf), 1, (size_t) bytes_to_read, file);
148 
149  if (ferror(file))
150  ereport(ERROR,
152  errmsg("could not read file \"%s\": %m", filename)));
153 
154  SET_VARSIZE(buf, nbytes + VARHDRSZ);
155 
156  FreeFile(file);
157 
158  return buf;
159 }
160 
161 /*
162  * Similar to read_binary_file, but we verify that the contents are valid
163  * in the database encoding.
164  */
165 static text *
166 read_text_file(const char *filename, int64 seek_offset, int64 bytes_to_read,
167  bool missing_ok)
168 {
169  bytea *buf;
170 
171  buf = read_binary_file(filename, seek_offset, bytes_to_read, missing_ok);
172 
173  if (buf != NULL)
174  {
175  /* Make sure the input is valid */
176  pg_verifymbstr(VARDATA(buf), VARSIZE(buf) - VARHDRSZ, false);
177 
178  /* OK, we can cast it to text safely */
179  return (text *) buf;
180  }
181  else
182  return NULL;
183 }
184 
185 /*
186  * Read a section of a file, returning it as text
187  */
188 Datum
190 {
191  text *filename_t = PG_GETARG_TEXT_PP(0);
192  int64 seek_offset = 0;
193  int64 bytes_to_read = -1;
194  bool missing_ok = false;
195  char *filename;
196  text *result;
197 
198  if (!superuser())
199  ereport(ERROR,
200  (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
201  (errmsg("must be superuser to read files"))));
202 
203  /* handle optional arguments */
204  if (PG_NARGS() >= 3)
205  {
206  seek_offset = PG_GETARG_INT64(1);
207  bytes_to_read = PG_GETARG_INT64(2);
208 
209  if (bytes_to_read < 0)
210  ereport(ERROR,
211  (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
212  errmsg("requested length cannot be negative")));
213  }
214  if (PG_NARGS() >= 4)
215  missing_ok = PG_GETARG_BOOL(3);
216 
217  filename = convert_and_check_filename(filename_t);
218 
219  result = read_text_file(filename, seek_offset, bytes_to_read, missing_ok);
220  if (result)
221  PG_RETURN_TEXT_P(result);
222  else
223  PG_RETURN_NULL();
224 }
225 
226 /*
227  * Read a section of a file, returning it as bytea
228  */
229 Datum
231 {
232  text *filename_t = PG_GETARG_TEXT_PP(0);
233  int64 seek_offset = 0;
234  int64 bytes_to_read = -1;
235  bool missing_ok = false;
236  char *filename;
237  bytea *result;
238 
239  if (!superuser())
240  ereport(ERROR,
241  (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
242  (errmsg("must be superuser to read files"))));
243 
244  /* handle optional arguments */
245  if (PG_NARGS() >= 3)
246  {
247  seek_offset = PG_GETARG_INT64(1);
248  bytes_to_read = PG_GETARG_INT64(2);
249 
250  if (bytes_to_read < 0)
251  ereport(ERROR,
252  (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
253  errmsg("requested length cannot be negative")));
254  }
255  if (PG_NARGS() >= 4)
256  missing_ok = PG_GETARG_BOOL(3);
257 
258  filename = convert_and_check_filename(filename_t);
259 
260  result = read_binary_file(filename, seek_offset,
261  bytes_to_read, missing_ok);
262  if (result)
263  PG_RETURN_BYTEA_P(result);
264  else
265  PG_RETURN_NULL();
266 }
267 
268 
269 /*
270  * Wrapper functions for the 1 and 3 argument variants of pg_read_file()
271  * and pg_binary_read_file().
272  *
273  * These are necessary to pass the sanity check in opr_sanity, which checks
274  * that all built-in functions that share the implementing C function take
275  * the same number of arguments.
276  */
277 Datum
279 {
280  return pg_read_file(fcinfo);
281 }
282 
283 Datum
285 {
286  return pg_read_file(fcinfo);
287 }
288 
289 Datum
291 {
292  return pg_read_binary_file(fcinfo);
293 }
294 
295 Datum
297 {
298  return pg_read_binary_file(fcinfo);
299 }
300 
301 /*
302  * stat a file
303  */
304 Datum
306 {
307  text *filename_t = PG_GETARG_TEXT_PP(0);
308  char *filename;
309  struct stat fst;
310  Datum values[6];
311  bool isnull[6];
312  HeapTuple tuple;
313  TupleDesc tupdesc;
314  bool missing_ok = false;
315 
316  if (!superuser())
317  ereport(ERROR,
318  (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
319  (errmsg("must be superuser to get file information"))));
320 
321  /* check the optional argument */
322  if (PG_NARGS() == 2)
323  missing_ok = PG_GETARG_BOOL(1);
324 
325  filename = convert_and_check_filename(filename_t);
326 
327  if (stat(filename, &fst) < 0)
328  {
329  if (missing_ok && errno == ENOENT)
330  PG_RETURN_NULL();
331  else
332  ereport(ERROR,
334  errmsg("could not stat file \"%s\": %m", filename)));
335  }
336 
337  /*
338  * This record type had better match the output parameters declared for me
339  * in pg_proc.h.
340  */
341  tupdesc = CreateTemplateTupleDesc(6, false);
342  TupleDescInitEntry(tupdesc, (AttrNumber) 1,
343  "size", INT8OID, -1, 0);
344  TupleDescInitEntry(tupdesc, (AttrNumber) 2,
345  "access", TIMESTAMPTZOID, -1, 0);
346  TupleDescInitEntry(tupdesc, (AttrNumber) 3,
347  "modification", TIMESTAMPTZOID, -1, 0);
348  TupleDescInitEntry(tupdesc, (AttrNumber) 4,
349  "change", TIMESTAMPTZOID, -1, 0);
350  TupleDescInitEntry(tupdesc, (AttrNumber) 5,
351  "creation", TIMESTAMPTZOID, -1, 0);
352  TupleDescInitEntry(tupdesc, (AttrNumber) 6,
353  "isdir", BOOLOID, -1, 0);
354  BlessTupleDesc(tupdesc);
355 
356  memset(isnull, false, sizeof(isnull));
357 
358  values[0] = Int64GetDatum((int64) fst.st_size);
359  values[1] = TimestampTzGetDatum(time_t_to_timestamptz(fst.st_atime));
360  values[2] = TimestampTzGetDatum(time_t_to_timestamptz(fst.st_mtime));
361  /* Unix has file status change time, while Win32 has creation time */
362 #if !defined(WIN32) && !defined(__CYGWIN__)
363  values[3] = TimestampTzGetDatum(time_t_to_timestamptz(fst.st_ctime));
364  isnull[4] = true;
365 #else
366  isnull[3] = true;
367  values[4] = TimestampTzGetDatum(time_t_to_timestamptz(fst.st_ctime));
368 #endif
369  values[5] = BoolGetDatum(S_ISDIR(fst.st_mode));
370 
371  tuple = heap_form_tuple(tupdesc, values, isnull);
372 
373  pfree(filename);
374 
376 }
377 
378 /*
379  * stat a file (1 argument version)
380  *
381  * note: this wrapper is necessary to pass the sanity check in opr_sanity,
382  * which checks that all built-in functions that share the implementing C
383  * function take the same number of arguments
384  */
385 Datum
387 {
388  return pg_stat_file(fcinfo);
389 }
390 
391 /*
392  * List a directory (returns the filenames only)
393  */
394 Datum
396 {
397  FuncCallContext *funcctx;
398  struct dirent *de;
399  directory_fctx *fctx;
400  MemoryContext oldcontext;
401 
402  if (!superuser())
403  ereport(ERROR,
404  (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
405  (errmsg("must be superuser to get directory listings"))));
406 
407  if (SRF_IS_FIRSTCALL())
408  {
409  bool missing_ok = false;
410  bool include_dot_dirs = false;
411 
412  /* check the optional arguments */
413  if (PG_NARGS() == 3)
414  {
415  if (!PG_ARGISNULL(1))
416  missing_ok = PG_GETARG_BOOL(1);
417  if (!PG_ARGISNULL(2))
418  include_dot_dirs = PG_GETARG_BOOL(2);
419  }
420 
421  funcctx = SRF_FIRSTCALL_INIT();
422  oldcontext = MemoryContextSwitchTo(funcctx->multi_call_memory_ctx);
423 
424  fctx = palloc(sizeof(directory_fctx));
426 
427  fctx->include_dot_dirs = include_dot_dirs;
428  fctx->dirdesc = AllocateDir(fctx->location);
429 
430  if (!fctx->dirdesc)
431  {
432  if (missing_ok && errno == ENOENT)
433  {
434  MemoryContextSwitchTo(oldcontext);
435  SRF_RETURN_DONE(funcctx);
436  }
437  else
438  ereport(ERROR,
440  errmsg("could not open directory \"%s\": %m",
441  fctx->location)));
442  }
443  funcctx->user_fctx = fctx;
444  MemoryContextSwitchTo(oldcontext);
445  }
446 
447  funcctx = SRF_PERCALL_SETUP();
448  fctx = (directory_fctx *) funcctx->user_fctx;
449 
450  while ((de = ReadDir(fctx->dirdesc, fctx->location)) != NULL)
451  {
452  if (!fctx->include_dot_dirs &&
453  (strcmp(de->d_name, ".") == 0 ||
454  strcmp(de->d_name, "..") == 0))
455  continue;
456 
458  }
459 
460  FreeDir(fctx->dirdesc);
461 
462  SRF_RETURN_DONE(funcctx);
463 }
464 
465 /*
466  * List a directory (1 argument version)
467  *
468  * note: this wrapper is necessary to pass the sanity check in opr_sanity,
469  * which checks that all built-in functions that share the implementing C
470  * function take the same number of arguments.
471  */
472 Datum
474 {
475  return pg_ls_dir(fcinfo);
476 }
477 
478 /* Generic function to return a directory listing of files */
479 static Datum
481 {
482  FuncCallContext *funcctx;
483  struct dirent *de;
484  directory_fctx *fctx;
485 
486  if (SRF_IS_FIRSTCALL())
487  {
488  MemoryContext oldcontext;
489  TupleDesc tupdesc;
490 
491  funcctx = SRF_FIRSTCALL_INIT();
492  oldcontext = MemoryContextSwitchTo(funcctx->multi_call_memory_ctx);
493 
494  fctx = palloc(sizeof(directory_fctx));
495 
496  tupdesc = CreateTemplateTupleDesc(3, false);
497  TupleDescInitEntry(tupdesc, (AttrNumber) 1, "name",
498  TEXTOID, -1, 0);
499  TupleDescInitEntry(tupdesc, (AttrNumber) 2, "size",
500  INT8OID, -1, 0);
501  TupleDescInitEntry(tupdesc, (AttrNumber) 3, "modification",
502  TIMESTAMPTZOID, -1, 0);
503  funcctx->tuple_desc = BlessTupleDesc(tupdesc);
504 
505  fctx->location = pstrdup(dir);
506  fctx->dirdesc = AllocateDir(fctx->location);
507 
508  if (!fctx->dirdesc)
509  ereport(ERROR,
511  errmsg("could not read directory \"%s\": %m",
512  fctx->location)));
513 
514  funcctx->user_fctx = fctx;
515  MemoryContextSwitchTo(oldcontext);
516  }
517 
518  funcctx = SRF_PERCALL_SETUP();
519  fctx = (directory_fctx *) funcctx->user_fctx;
520 
521  while ((de = ReadDir(fctx->dirdesc, fctx->location)) != NULL)
522  {
523  Datum values[3];
524  bool nulls[3];
525  char path[MAXPGPATH];
526  struct stat attrib;
527  HeapTuple tuple;
528 
529  /* Skip hidden files */
530  if (de->d_name[0] == '.')
531  continue;
532 
533  /* Get the file info */
534  snprintf(path, MAXPGPATH, "%s/%s", fctx->location, de->d_name);
535  if (stat(path, &attrib) < 0)
536  ereport(ERROR,
538  errmsg("could not stat directory \"%s\": %m", dir)));
539 
540  /* Ignore anything but regular files */
541  if (!S_ISREG(attrib.st_mode))
542  continue;
543 
544  values[0] = CStringGetTextDatum(de->d_name);
545  values[1] = Int64GetDatum((int64) attrib.st_size);
546  values[2] = TimestampTzGetDatum(time_t_to_timestamptz(attrib.st_mtime));
547  memset(nulls, 0, sizeof(nulls));
548 
549  tuple = heap_form_tuple(funcctx->tuple_desc, values, nulls);
550  SRF_RETURN_NEXT(funcctx, HeapTupleGetDatum(tuple));
551  }
552 
553  FreeDir(fctx->dirdesc);
554  SRF_RETURN_DONE(funcctx);
555 }
556 
557 /* Function to return the list of files in the log directory */
558 Datum
560 {
561  return pg_ls_dir_files(fcinfo, Log_directory);
562 }
563 
564 /* Function to return the list of files in the WAL directory */
565 Datum
567 {
568  return pg_ls_dir_files(fcinfo, XLOGDIR);
569 }
Datum pg_ls_logdir(PG_FUNCTION_ARGS)
Definition: genfile.c:559
#define TIMESTAMPTZOID
Definition: pg_type.h:517
static char * convert_and_check_filename(text *arg)
Definition: genfile.c:50
#define VARDATA(PTR)
Definition: postgres.h:303
char * Log_directory
Definition: syslogger.c:66
#define TEXTOID
Definition: pg_type.h:324
#define VARSIZE(PTR)
Definition: postgres.h:304
#define SRF_IS_FIRSTCALL()
Definition: funcapi.h:285
bool path_is_prefix_of_path(const char *path1, const char *path2)
Definition: path.c:438
#define VARHDRSZ
Definition: c.h:445
char * pstrdup(const char *in)
Definition: mcxt.c:1077
Datum pg_read_file_all(PG_FUNCTION_ARGS)
Definition: genfile.c:284
static MemoryContext MemoryContextSwitchTo(MemoryContext context)
Definition: palloc.h:109
void canonicalize_path(char *path)
Definition: path.c:254
int errcode(int sqlerrcode)
Definition: elog.c:575
bool superuser(void)
Definition: superuser.c:47
int snprintf(char *str, size_t count, const char *fmt,...) pg_attribute_printf(3
HeapTuple heap_form_tuple(TupleDesc tupleDescriptor, Datum *values, bool *isnull)
Definition: heaptuple.c:692
#define PG_GETARG_BOOL(n)
Definition: fmgr.h:231
#define PG_RETURN_BYTEA_P(x)
Definition: fmgr.h:321
#define fseeko(stream, offset, origin)
Definition: win32.h:247
bool include_dot_dirs
Definition: genfile.c:39
Definition: dirent.h:9
#define PG_BINARY_R
Definition: c.h:1040
bool path_contains_parent_reference(const char *path)
Definition: path.c:376
#define SRF_PERCALL_SETUP()
Definition: funcapi.h:289
TupleDesc tuple_desc
Definition: funcapi.h:120
#define PG_GETARG_TEXT_PP(n)
Definition: fmgr.h:265
#define SRF_RETURN_NEXT(_funcctx, _result)
Definition: funcapi.h:291
void pfree(void *pointer)
Definition: mcxt.c:950
Datum pg_read_binary_file_off_len(PG_FUNCTION_ARGS)
Definition: genfile.c:290
Datum pg_stat_file(PG_FUNCTION_ARGS)
Definition: genfile.c:305
Definition: dirent.c:25
#define ERROR
Definition: elog.h:43
Datum pg_read_file_off_len(PG_FUNCTION_ARGS)
Definition: genfile.c:278
#define TimestampTzGetDatum(X)
Definition: timestamp.h:32
#define MAXPGPATH
DIR * dirdesc
Definition: adminpack.c:51
TupleDesc BlessTupleDesc(TupleDesc tupdesc)
Definition: execTuples.c:1031
static bytea * read_binary_file(const char *filename, int64 seek_offset, int64 bytes_to_read, bool missing_ok)
Definition: genfile.c:93
static char * buf
Definition: pg_test_fsync.c:65
int errcode_for_file_access(void)
Definition: elog.c:598
#define is_absolute_path(filename)
Definition: port.h:77
bool path_is_relative_and_below_cwd(const char *path)
Definition: path.c:405
FILE * AllocateFile(const char *name, const char *mode)
Definition: fd.c:2057
DIR * AllocateDir(const char *dirname)
Definition: fd.c:2298
Datum Int64GetDatum(int64 X)
Definition: fmgr.c:2152
void TupleDescInitEntry(TupleDesc desc, AttrNumber attributeNumber, const char *attributeName, Oid oidtypeid, int32 typmod, int attdim)
Definition: tupdesc.c:493
#define ereport(elevel, rest)
Definition: elog.h:122
Datum pg_read_binary_file(PG_FUNCTION_ARGS)
Definition: genfile.c:230
Datum pg_ls_dir_1arg(PG_FUNCTION_ARGS)
Definition: genfile.c:473
#define MaxAllocSize
Definition: memutils.h:40
Datum pg_ls_dir(PG_FUNCTION_ARGS)
Definition: genfile.c:395
#define XLOGDIR
uintptr_t Datum
Definition: postgres.h:372
#define PG_RETURN_DATUM(x)
Definition: fmgr.h:305
TimestampTz time_t_to_timestamptz(pg_time_t tm)
Definition: timestamp.c:1669
#define BoolGetDatum(X)
Definition: postgres.h:408
#define INT8OID
Definition: pg_type.h:304
#define PG_RETURN_TEXT_P(x)
Definition: fmgr.h:322
Datum pg_read_file(PG_FUNCTION_ARGS)
Definition: genfile.c:189
#define PG_ARGISNULL(n)
Definition: fmgr.h:166
#define NULL
Definition: c.h:229
Datum pg_read_binary_file_all(PG_FUNCTION_ARGS)
Definition: genfile.c:296
struct dirent * ReadDir(DIR *dir, const char *dirname)
Definition: fd.c:2364
MemoryContext multi_call_memory_ctx
Definition: funcapi.h:109
size_t Size
Definition: c.h:356
Datum pg_stat_file_1arg(PG_FUNCTION_ARGS)
Definition: genfile.c:386
#define PG_NARGS()
Definition: fmgr.h:160
#define HeapTupleGetDatum(tuple)
Definition: funcapi.h:222
#define BOOLOID
Definition: pg_type.h:288
TupleDesc CreateTemplateTupleDesc(int natts, bool hasoid)
Definition: tupdesc.c:41
char * location
Definition: adminpack.c:50
int FreeFile(FILE *file)
Definition: fd.c:2240
static Datum values[MAXATTR]
Definition: bootstrap.c:162
char * text_to_cstring(const text *t)
Definition: varlena.c:184
static char * filename
Definition: pg_dumpall.c:87
void * user_fctx
Definition: funcapi.h:90
void * palloc(Size size)
Definition: mcxt.c:849
int errmsg(const char *fmt,...)
Definition: elog.c:797
#define CStringGetTextDatum(s)
Definition: builtins.h:91
void * arg
char * DataDir
Definition: globals.c:59
Definition: c.h:439
#define PG_FUNCTION_ARGS
Definition: fmgr.h:150
bool pg_verifymbstr(const char *mbstr, int len, bool noError)
Definition: wchar.c:1866
#define SET_VARSIZE(PTR, len)
Definition: postgres.h:328
char d_name[MAX_PATH]
Definition: dirent.h:14
static text * read_text_file(const char *filename, int64 seek_offset, int64 bytes_to_read, bool missing_ok)
Definition: genfile.c:166
#define PG_GETARG_INT64(n)
Definition: fmgr.h:239
static Datum pg_ls_dir_files(FunctionCallInfo fcinfo, char *dir)
Definition: genfile.c:480
int16 AttrNumber
Definition: attnum.h:21
#define PG_RETURN_NULL()
Definition: fmgr.h:297
int FreeDir(DIR *dir)
Definition: fd.c:2407
#define SRF_RETURN_DONE(_funcctx)
Definition: funcapi.h:309
Datum pg_ls_waldir(PG_FUNCTION_ARGS)
Definition: genfile.c:566
#define SRF_FIRSTCALL_INIT()
Definition: funcapi.h:287