/[global]/global/gtags/gtags.c
ViewVC logotype

Diff of /global/gtags/gtags.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.127 by shigio, Sat Jul 30 11:33:48 2005 UTC revision 1.128 by h-iwamoto, Sun Jul 31 12:51:53 2005 UTC
# Line 369  main(argc, argv) Line 369  main(argc, argv)
369    
370                  if (argc) {                  if (argc) {
371                          if (secure_mode) {                          if (secure_mode) {
372                                  char    buf[MAXPATHLEN+1], *path;                                  char buf[MAXPATHLEN+1], *path;
373                                    size_t rootlen;
374    
375                                  getdbpath(cwd, root, dbpath, 0);                                  getdbpath(cwd, root, dbpath, 0);
376                                  path = realpath(argv[0], buf);                                  path = realpath(argv[0], buf);
377                                  if (path == NULL)                                  if (path == NULL)
378                                          die("realpath(%s, buf) failed. (errno=%d).", argv[0], errno);                                          die("realpath(%s, buf) failed. (errno=%d).", argv[0], errno);
379                                  if (!isabspath(path))                                  if (!isabspath(path))
380                                          die("realpath(3) is not compatible with BSD version.");                                          die("realpath(3) is not compatible with BSD version.");
381                                  if (strncmp(path, root, strlen(root)))                                  rootlen = strlen(root);
382                                    if (strncmp(path, root, rootlen) || path[rootlen] != '/')
383                                          die("'%s' is out of source tree.", path);                                          die("'%s' is out of source tree.", path);
384                          }                          }
385                          ip = fopen(argv[0], "r");                          ip = fopen(argv[0], "r");

Legend:
Removed from v.1.127  
changed lines
  Added in v.1.128

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26