Fix jn precision
[glibc.git] / nss / makedb.c
blob8cee92f891b25e16b99f5b3c229913116f7d13db
1 /* Create simple DB database from textual input.
2 Copyright (C) 1996-2000, 2011 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4 Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
6 The GNU C Library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
11 The GNU C Library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
16 You should have received a copy of the GNU Lesser General Public
17 License along with the GNU C Library; if not, write to the Free
18 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
19 02111-1307 USA. */
21 #include <argp.h>
22 #include <assert.h>
23 #include <ctype.h>
24 #include <errno.h>
25 #include <error.h>
26 #include <fcntl.h>
27 #include <inttypes.h>
28 #include <libintl.h>
29 #include <locale.h>
30 #include <search.h>
31 #include <stdio.h>
32 #include <stdlib.h>
33 #include <string.h>
34 #include <unistd.h>
35 #include <sys/mman.h>
36 #include <sys/stat.h>
37 #include "nss_db/nss_db.h"
39 /* Get libc version number. */
40 #include "../version.h"
42 /* The hashing function we use. */
43 #include "../intl/hash-string.h"
45 /* SELinux support. */
46 #ifdef HAVE_SELINUX
47 # include <selinux/selinux.h>
48 #endif
50 #define PACKAGE _libc_intl_domainname
52 /* List of data bases. */
53 struct database
55 char dbid;
56 bool extra_string;
57 struct database *next;
58 void *entries;
59 size_t nentries;
60 size_t nhashentries;
61 stridx_t *hashtable;
62 size_t keystrlen;
63 stridx_t *keyidxtab;
64 char *keystrtab;
65 } *databases;
66 static size_t ndatabases;
67 static size_t nhashentries_total;
68 static size_t valstrlen;
69 static void *valstrtree;
70 static char *valstrtab;
71 static size_t extrastrlen;
73 /* Database entry. */
74 struct dbentry
76 stridx_t validx;
77 uint32_t hashval;
78 char str[0];
81 /* Stored string entry. */
82 struct valstrentry
84 stridx_t idx;
85 bool extra_string;
86 char str[0];
90 /* True if any entry has been added. */
91 static bool any_dbentry;
93 /* If non-zero convert key to lower case. */
94 static int to_lowercase;
96 /* If non-zero print content of input file, one entry per line. */
97 static int do_undo;
99 /* If non-zero do not print informational messages. */
100 static int be_quiet;
102 /* Name of output file. */
103 static const char *output_name;
105 /* Name and version of program. */
106 static void print_version (FILE *stream, struct argp_state *state);
107 void (*argp_program_version_hook) (FILE *, struct argp_state *) = print_version;
109 /* Definitions of arguments for argp functions. */
110 static const struct argp_option options[] =
112 { "fold-case", 'f', NULL, 0, N_("Convert key to lower case") },
113 { "output", 'o', N_("NAME"), 0, N_("Write output to file NAME") },
114 { "quiet", 'q', NULL, 0,
115 N_("Do not print messages while building database") },
116 { "undo", 'u', NULL, 0,
117 N_("Print content of database file, one entry a line") },
118 { "generated", 'g', N_("CHAR"), 0,
119 N_("Generated line not part of iteration") },
120 { NULL, 0, NULL, 0, NULL }
123 /* Short description of program. */
124 static const char doc[] = N_("Create simple database from textual input.");
126 /* Strings for arguments in help texts. */
127 static const char args_doc[] = N_("\
128 INPUT-FILE OUTPUT-FILE\n-o OUTPUT-FILE INPUT-FILE\n-u INPUT-FILE");
130 /* Prototype for option handler. */
131 static error_t parse_opt (int key, char *arg, struct argp_state *state);
133 /* Function to print some extra text in the help message. */
134 static char *more_help (int key, const char *text, void *input);
136 /* Data structure to communicate with argp functions. */
137 static struct argp argp =
139 options, parse_opt, args_doc, doc, NULL, more_help
143 /* List of databases which are not part of the iteration table. */
144 static struct db_option
146 char dbid;
147 struct db_option *next;
148 } *db_options;
151 /* Prototypes for local functions. */
152 static int process_input (FILE *input, const char *inname,
153 int to_lowercase, int be_quiet);
154 static int print_database (int fd);
155 static void compute_tables (void);
156 static int write_output (int fd);
158 /* SELinux support. */
159 #ifdef HAVE_SELINUX
160 /* Set the SELinux file creation context for the given file. */
161 static void set_file_creation_context (const char *outname, mode_t mode);
162 static void reset_file_creation_context (void);
163 #else
164 # define set_file_creation_context(_outname,_mode)
165 # define reset_file_creation_context()
166 #endif
169 /* External functions. */
170 extern void *xmalloc (size_t n) __attribute_malloc__;
171 extern void *xcalloc (size_t n, size_t m) __attribute_malloc__;
175 main (int argc, char *argv[])
177 const char *input_name;
178 FILE *input_file;
179 int remaining;
180 int mode = 0644;
182 /* Set locale via LC_ALL. */
183 setlocale (LC_ALL, "");
185 /* Set the text message domain. */
186 textdomain (_libc_intl_domainname);
188 /* Initialize local variables. */
189 input_name = NULL;
191 /* Parse and process arguments. */
192 argp_parse (&argp, argc, argv, 0, &remaining, NULL);
194 /* Determine file names. */
195 if (do_undo || output_name != NULL)
197 if (remaining + 1 != argc)
199 wrong_arguments:
200 error (0, 0, gettext ("wrong number of arguments"));
201 argp_help (&argp, stdout, ARGP_HELP_SEE,
202 program_invocation_short_name);
203 exit (1);
205 input_name = argv[remaining];
207 else
209 if (remaining + 2 != argc)
210 goto wrong_arguments;
212 input_name = argv[remaining++];
213 output_name = argv[remaining];
216 /* Special handling if we are asked to print the database. */
217 if (do_undo)
219 int fd = open (input_name, O_RDONLY);
220 if (fd == -1)
221 error (EXIT_FAILURE, errno, gettext ("cannot open database file `%s'"),
222 input_name);
224 int status = print_database (fd);
226 close (fd);
228 return status;
231 /* Open input file. */
232 if (strcmp (input_name, "-") == 0 || strcmp (input_name, "/dev/stdin") == 0)
233 input_file = stdin;
234 else
236 struct stat64 st;
238 input_file = fopen64 (input_name, "r");
239 if (input_file == NULL)
240 error (EXIT_FAILURE, errno, gettext ("cannot open input file `%s'"),
241 input_name);
243 /* Get the access rights from the source file. The output file should
244 have the same. */
245 if (fstat64 (fileno (input_file), &st) >= 0)
246 mode = st.st_mode & ACCESSPERMS;
249 /* Start the real work. */
250 int status = process_input (input_file, input_name, to_lowercase, be_quiet);
252 /* Close files. */
253 if (input_file != stdin)
254 fclose (input_file);
256 /* No need to continue when we did not read the file successfully. */
257 if (status != EXIT_SUCCESS)
258 return status;
260 /* Bail out if nothing is to be done. */
261 if (!any_dbentry)
263 if (be_quiet)
264 return EXIT_SUCCESS;
265 else
266 error (EXIT_SUCCESS, 0, gettext ("no entries to be processed"));
269 /* Compute hash and string tables. */
270 compute_tables ();
272 /* Open output file. This must not be standard output so we don't
273 handle "-" and "/dev/stdout" special. */
274 char *tmp_output_name;
275 if (asprintf (&tmp_output_name, "%s.XXXXXX", output_name) == -1)
276 error (EXIT_FAILURE, errno, gettext ("cannot create temporary file name"));
278 set_file_creation_context (output_name, mode);
279 int fd = mkstemp (tmp_output_name);
280 reset_file_creation_context ();
281 if (fd == -1)
282 error (EXIT_FAILURE, errno, gettext ("cannot create temporary file"));
284 status = write_output (fd);
286 if (status == EXIT_SUCCESS)
288 struct stat64 st;
290 if (fstat64 (fd, &st) == 0)
292 if ((st.st_mode & ACCESSPERMS) != mode)
293 /* We ignore problems with changing the mode. */
294 fchmod (fd, mode);
296 else
298 error (0, errno, gettext ("cannot stat newly created file"));
299 status = EXIT_FAILURE;
303 close (fd);
305 if (status == EXIT_SUCCESS)
307 if (rename (tmp_output_name, output_name) != 0)
309 error (0, errno, gettext ("cannot rename temporary file"));
310 status = EXIT_FAILURE;
311 goto do_unlink;
314 else
315 do_unlink:
316 unlink (tmp_output_name);
318 return status;
322 /* Handle program arguments. */
323 static error_t
324 parse_opt (int key, char *arg, struct argp_state *state)
326 struct db_option *newp;
328 switch (key)
330 case 'f':
331 to_lowercase = 1;
332 break;
333 case 'o':
334 output_name = arg;
335 break;
336 case 'q':
337 be_quiet = 1;
338 break;
339 case 'u':
340 do_undo = 1;
341 break;
342 case 'g':
343 newp = xmalloc (sizeof (*newp));
344 newp->dbid = arg[0];
345 newp->next = db_options;
346 db_options = newp;
347 break;
348 default:
349 return ARGP_ERR_UNKNOWN;
351 return 0;
355 static char *
356 more_help (int key, const char *text, void *input)
358 switch (key)
360 case ARGP_KEY_HELP_EXTRA:
361 /* We print some extra information. */
362 return strdup (gettext ("\
363 For bug reporting instructions, please see:\n\
364 <http://www.gnu.org/software/libc/bugs.html>.\n"));
365 default:
366 break;
368 return (char *) text;
371 /* Print the version information. */
372 static void
373 print_version (FILE *stream, struct argp_state *state)
375 fprintf (stream, "makedb (GNU %s) %s\n", PACKAGE, VERSION);
376 fprintf (stream, gettext ("\
377 Copyright (C) %s Free Software Foundation, Inc.\n\
378 This is free software; see the source for copying conditions. There is NO\n\
379 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
380 "), "2011");
381 fprintf (stream, gettext ("Written by %s.\n"), "Ulrich Drepper");
385 static int
386 dbentry_compare (const void *p1, const void *p2)
388 const struct dbentry *d1 = (const struct dbentry *) p1;
389 const struct dbentry *d2 = (const struct dbentry *) p2;
391 if (d1->hashval != d2->hashval)
392 return d1->hashval < d2->hashval ? -1 : 1;
394 return strcmp (d1->str, d2->str);
398 static int
399 valstr_compare (const void *p1, const void *p2)
401 const struct valstrentry *d1 = (const struct valstrentry *) p1;
402 const struct valstrentry *d2 = (const struct valstrentry *) p2;
404 return strcmp (d1->str, d2->str);
408 static int
409 process_input (input, inname, to_lowercase, be_quiet)
410 FILE *input;
411 const char *inname;
412 int to_lowercase;
413 int be_quiet;
415 char *line;
416 size_t linelen;
417 int status;
418 size_t linenr;
420 line = NULL;
421 linelen = 0;
422 status = EXIT_SUCCESS;
423 linenr = 0;
425 struct database *last_database = NULL;
427 while (!feof_unlocked (input))
429 ssize_t n = getline (&line, &linelen, input);
430 if (n < 0)
431 /* This means end of file or some bug. */
432 break;
433 if (n == 0)
434 /* Short read. Probably interrupted system call. */
435 continue;
437 ++linenr;
439 if (line[n - 1] == '\n')
440 /* Remove trailing newline. */
441 line[--n] = '\0';
443 char *cp = line;
444 while (isspace (*cp))
445 ++cp;
447 if (*cp == '#' || *cp == '\0')
448 /* First non-space character in line '#': it's a comment.
449 Also go to the next line if it is empty except for whitespaces. */
450 continue;
452 /* Skip over the character indicating the database so that it is not
453 affected by TO_LOWERCASE. */
454 char *key = cp++;
455 while (*cp != '\0' && !isspace (*cp))
457 if (to_lowercase)
458 *cp = tolower (*cp);
459 ++cp;
462 if (*cp == '\0')
463 /* It's a line without a value field. */
464 continue;
466 *cp++ = '\0';
467 size_t keylen = cp - key;
469 while (isspace (*cp))
470 ++cp;
472 char *data = cp;
473 size_t datalen = (&line[n] - cp) + 1;
475 /* Find the database. */
476 if (last_database == NULL || last_database->dbid != key[0])
478 last_database = databases;
479 while (last_database != NULL && last_database->dbid != key[0])
480 last_database = last_database->next;
482 if (last_database == NULL)
484 last_database = xmalloc (sizeof (*last_database));
485 last_database->dbid = key[0];
486 last_database->extra_string = false;
487 last_database->next = databases;
488 last_database->entries = NULL;
489 last_database->nentries = 0;
490 last_database->keystrlen = 0;
491 databases = last_database;
493 struct db_option *runp = db_options;
494 while (runp != NULL)
495 if (runp->dbid == key[0])
497 last_database->extra_string = true;
498 break;
500 else
501 runp = runp->next;
505 /* Skip the database selector. */
506 ++key;
507 --keylen;
509 /* Store the data. */
510 struct valstrentry *nentry = xmalloc (sizeof (struct valstrentry)
511 + datalen);
512 if (last_database->extra_string)
513 nentry->idx = extrastrlen;
514 else
515 nentry->idx = valstrlen;
516 nentry->extra_string = last_database->extra_string;
517 memcpy (nentry->str, data, datalen);
519 struct valstrentry **fdata = tsearch (nentry, &valstrtree,
520 valstr_compare);
521 if (fdata == NULL)
522 error (EXIT_FAILURE, errno, gettext ("cannot create search tree"));
524 if (*fdata != nentry)
526 /* We can reuse a string. */
527 free (nentry);
528 nentry = *fdata;
530 else
531 if (last_database->extra_string)
532 extrastrlen += datalen;
533 else
534 valstrlen += datalen;
536 /* Store the key. */
537 struct dbentry *newp = xmalloc (sizeof (struct dbentry) + keylen);
538 newp->validx = nentry->idx;
539 newp->hashval = __hash_string (key);
540 memcpy (newp->str, key, keylen);
542 struct dbentry **found = tsearch (newp, &last_database->entries,
543 dbentry_compare);
544 if (found == NULL)
545 error (EXIT_FAILURE, errno, gettext ("cannot create search tree"));
547 if (*found != newp)
549 free (newp);
550 if (!be_quiet)
551 error_at_line (0, 0, inname, linenr, gettext ("duplicate key"));
552 continue;
555 ++last_database->nentries;
556 last_database->keystrlen += keylen;
558 any_dbentry = true;
561 if (ferror_unlocked (input))
563 error (0, 0, gettext ("problems while reading `%s'"), inname);
564 status = EXIT_FAILURE;
567 return status;
571 static void
572 copy_valstr (const void *nodep, const VISIT which, const int depth)
574 if (which != leaf && which != postorder)
575 return;
577 const struct valstrentry *p = *(const struct valstrentry **) nodep;
579 strcpy (valstrtab + (p->extra_string ? valstrlen : 0) + p->idx, p->str);
583 static int
584 is_prime (size_t candidate)
586 /* No even number and none less than 10 will be passed here. */
587 size_t divn = 3;
588 size_t sq = divn * divn;
590 while (sq < candidate && candidate % divn != 0)
592 ++divn;
593 sq += 4 * divn;
594 ++divn;
597 return candidate % divn != 0;
601 static size_t
602 next_prime (size_t seed)
604 /* Make it definitely odd. */
605 seed |= 1;
607 while (!is_prime (seed))
608 seed += 2;
610 return seed;
614 static void
615 compute_tables (void)
617 valstrtab = xmalloc (roundup (valstrlen + extrastrlen, sizeof (stridx_t)));
618 while ((valstrlen + extrastrlen) % sizeof (stridx_t) != 0)
619 valstrtab[valstrlen++] = '\0';
620 twalk (valstrtree, copy_valstr);
622 static struct database *db;
623 for (db = databases; db != NULL; db = db->next)
624 if (db->nentries != 0)
626 ++ndatabases;
628 /* We simply use an odd number large than twice the number of
629 elements to store in the hash table for the size. This gives
630 enough efficiency. */
631 #define TEST_RANGE 30
632 size_t nhashentries_min = next_prime (db->nentries < TEST_RANGE
633 ? db->nentries
634 : db->nentries * 2 - TEST_RANGE);
635 size_t nhashentries_max = MAX (nhashentries_min, db->nentries * 4);
636 size_t nhashentries_best = nhashentries_min;
637 size_t chainlength_best = db->nentries;
639 db->hashtable = xmalloc (2 * nhashentries_max * sizeof (stridx_t)
640 + db->keystrlen);
641 db->keyidxtab = db->hashtable + nhashentries_max;
642 db->keystrtab = (char *) (db->keyidxtab + nhashentries_max);
644 static size_t max_chainlength;
645 static char *wp;
646 static size_t nhashentries;
647 static bool copy_string;
649 void add_key(const void *nodep, const VISIT which, const int depth)
651 if (which != leaf && which != postorder)
652 return;
654 const struct dbentry *dbe = *(const struct dbentry **) nodep;
656 ptrdiff_t stridx;
657 if (copy_string)
659 stridx = wp - db->keystrtab;
660 wp = stpcpy (wp, dbe->str) + 1;
662 else
663 stridx = 0;
665 size_t hidx = dbe->hashval % nhashentries;
666 size_t hval2 = 1 + dbe->hashval % (nhashentries - 2);
667 size_t chainlength = 0;
669 while (db->hashtable[hidx] != ~((stridx_t) 0))
671 ++chainlength;
672 if ((hidx += hval2) >= nhashentries)
673 hidx -= nhashentries;
676 db->hashtable[hidx] = ((db->extra_string ? valstrlen : 0)
677 + dbe->validx);
678 db->keyidxtab[hidx] = stridx;
680 max_chainlength = MAX (max_chainlength, chainlength);
683 copy_string = false;
684 nhashentries = nhashentries_min;
685 for (size_t cnt = 0; cnt < TEST_RANGE; ++cnt)
687 memset (db->hashtable, '\xff', nhashentries * sizeof (stridx_t));
689 max_chainlength = 0;
690 wp = db->keystrtab;
692 twalk (db->entries, add_key);
694 if (max_chainlength == 0)
696 /* No need to look further, this is as good as it gets. */
697 nhashentries_best = nhashentries;
698 break;
701 if (max_chainlength < chainlength_best)
703 chainlength_best = max_chainlength;
704 nhashentries_best = nhashentries;
707 nhashentries = next_prime (nhashentries + 1);
708 if (nhashentries > nhashentries_max)
709 break;
712 /* Recompute the best table again, this time fill in the strings. */
713 nhashentries = nhashentries_best;
714 memset (db->hashtable, '\xff',
715 2 * nhashentries_max * sizeof (stridx_t));
716 copy_string = true;
717 wp = db->keystrtab;
719 twalk (db->entries, add_key);
721 db->nhashentries = nhashentries_best;
722 nhashentries_total += nhashentries_best;
727 static int
728 write_output (int fd)
730 struct nss_db_header *header;
731 uint64_t file_offset = (sizeof (struct nss_db_header)
732 + (ndatabases * sizeof (header->dbs[0])));
733 header = alloca (file_offset);
735 header->magic = NSS_DB_MAGIC;
736 header->ndbs = ndatabases;
737 header->valstroffset = file_offset;
738 header->valstrlen = valstrlen;
740 size_t filled_dbs = 0;
741 struct iovec iov[2 + ndatabases * 3];
742 iov[0].iov_base = header;
743 iov[0].iov_len = file_offset;
745 iov[1].iov_base = valstrtab;
746 iov[1].iov_len = valstrlen + extrastrlen;
747 file_offset += iov[1].iov_len;
749 size_t keydataoffset = file_offset + nhashentries_total * sizeof (stridx_t);
750 for (struct database *db = databases; db != NULL; db = db->next)
751 if (db->entries != NULL)
753 assert (file_offset % sizeof (stridx_t) == 0);
754 assert (filled_dbs < ndatabases);
756 header->dbs[filled_dbs].id = db->dbid;
757 memset (header->dbs[filled_dbs].pad, '\0',
758 sizeof (header->dbs[0].pad));
759 header->dbs[filled_dbs].hashsize = db->nhashentries;
761 iov[2 + filled_dbs].iov_base = db->hashtable;
762 iov[2 + filled_dbs].iov_len = db->nhashentries * sizeof (stridx_t);
763 header->dbs[filled_dbs].hashoffset = file_offset;
764 file_offset += iov[2 + filled_dbs].iov_len;
766 iov[2 + ndatabases + filled_dbs * 2].iov_base = db->keyidxtab;
767 iov[2 + ndatabases + filled_dbs * 2].iov_len
768 = db->nhashentries * sizeof (stridx_t);
769 header->dbs[filled_dbs].keyidxoffset = keydataoffset;
770 keydataoffset += iov[2 + ndatabases + filled_dbs * 2].iov_len;
772 iov[3 + ndatabases + filled_dbs * 2].iov_base = db->keystrtab;
773 iov[3 + ndatabases + filled_dbs * 2].iov_len = db->keystrlen;
774 header->dbs[filled_dbs].keystroffset = keydataoffset;
775 keydataoffset += iov[3 + ndatabases + filled_dbs * 2].iov_len;
777 ++filled_dbs;
780 assert (filled_dbs == ndatabases);
781 assert (file_offset == (iov[0].iov_len + iov[1].iov_len
782 + nhashentries_total * sizeof (stridx_t)));
783 header->allocate = file_offset;
785 if (writev (fd, iov, 2 + ndatabases * 3) != keydataoffset)
787 error (0, errno, gettext ("failed to write new database file"));
788 return EXIT_FAILURE;
791 return EXIT_SUCCESS;
795 static int
796 print_database (int fd)
798 struct stat64 st;
799 if (fstat64 (fd, &st) != 0)
800 error (EXIT_FAILURE, errno, gettext ("cannot stat database file"));
802 const struct nss_db_header *header = mmap (NULL, st.st_size, PROT_READ,
803 MAP_PRIVATE|MAP_POPULATE, fd, 0);
804 if (header == MAP_FAILED)
805 error (EXIT_FAILURE, errno, gettext ("cannot map database file"));
807 if (header->magic != NSS_DB_MAGIC)
808 error (EXIT_FAILURE, 0, gettext ("file not a database file"));
810 const char *valstrtab = (const char *) header + header->valstroffset;
812 for (unsigned int dbidx = 0; dbidx < header->ndbs; ++dbidx)
814 const stridx_t *stridxtab
815 = ((const stridx_t *) ((const char *) header
816 + header->dbs[dbidx].keyidxoffset));
817 const char *keystrtab
818 = (const char *) header + header->dbs[dbidx].keystroffset;
819 const stridx_t *hashtab
820 = (const stridx_t *) ((const char *) header
821 + header->dbs[dbidx].hashoffset);
823 for (uint32_t hidx = 0; hidx < header->dbs[dbidx].hashsize; ++hidx)
824 if (hashtab[hidx] != ~((stridx_t) 0))
825 printf ("%c%s %s\n",
826 header->dbs[dbidx].id,
827 keystrtab + stridxtab[hidx],
828 valstrtab + hashtab[hidx]);
831 return EXIT_SUCCESS;
835 #ifdef HAVE_SELINUX
836 static void
837 set_file_creation_context (const char *outname, mode_t mode)
839 static int enabled;
840 static int enforcing;
841 security_context_t ctx;
843 /* Check if SELinux is enabled, and remember. */
844 if (enabled == 0)
845 enabled = is_selinux_enabled ();
846 if (enabled < 0)
847 return;
849 /* Check if SELinux is enforcing, and remember. */
850 if (enforcing == 0)
851 enforcing = security_getenforce () ? 1 : -1;
853 /* Determine the context which the file should have. */
854 ctx = NULL;
855 if (matchpathcon (outname, S_IFREG | mode, &ctx) == 0 && ctx != NULL)
857 if (setfscreatecon (ctx) != 0)
858 error (enforcing > 0 ? EXIT_FAILURE : 0, 0,
859 gettext ("cannot set file creation context for `%s'"),
860 outname);
862 freecon (ctx);
866 static void
867 reset_file_creation_context (void)
869 setfscreatecon (NULL);
871 #endif