fd = creat (outname, 0666);
fd = creat64 (outname, 0666);
me (void){  const char *env = getenv ("MEMUSAGE_PROG_NAME");  size_t prog_len = strlen (__progname);  initialized = -1;  mallocp = (void *(*) (size_t)) dlsym (RTLD_NEXT, "malloc");  reallocp = (void *(*) (void *, size_t)) dlsym (RTLD_NEXT, "realloc");  callocp = (void *(*) (size_t, size_t)) dlsym (RTLD_NEXT, "calloc");  freep = (void (*) (void *)) dlsym (RTLD_NEXT, "free");  mmapp = (void *(*) (void *, size_t, int, int, int, off_t)) dlsym (RTLD_NEXT,								    "mmap");  mmap64p =    (void *(*) (void *, size_t, int, int, int, off64_t)) dlsym (RTLD_NEXT,								"mmap64");  mremapp = (void *(*) (void *, size_t, size_t, int)) dlsym (RTLD_NEXT,							     "mremap");  munmapp = (int (*) (void *, size_t)) dlsym (RTLD_NEXT, "munmap");  initialized = 1;  if (env != NULL)    {      /* Check for program name.  */      size_t len = strlen (env);      if (len > prog_len || strcmp (env, &__progname[prog_len - len]) != 0	  || (prog_len != len && __progname[prog_len - len - 1] != '/'))	not_me = true;    }  /* Only open the file if it's really us.  */  if (!not_me && fd == -1)    {      const char *outname;      if (!start_sp)	start_sp = GETSP ();      outname = getenv ("MEMUSAGE_OUTPUT");      if (outname != NULL && outname[0] != '\0'	  && (access (outname, R_OK | W_OK) == 0 || errno == ENOENT))	{	  fd = creat (outname, 0666);	  if (fd == -1)	    /* Don't do anything in future calls if we cannot write to	       the output file.  */	    not_me = true;	  else	    {	      /* Write the first entry.  */	      first.heap = 0;	      first.stack = 0;	      GETTIME (first.time_low, first.time_high);	      /* Write it two times since we need the starting and end time. */	      write (fd, &first, sizeof (first));	      /* Determine the buffer size.  We use the default if the		 environment variable is not present.  */	      buffer_size = DEFAULT_BUFFER_SIZE;	      if (getenv ("MEMUSAGE_BUFFER_SIZE") != NULL)		{		  buffer_size = atoi (getenv ("MEMUSAGE_BUFFER_SIZE"));		  if (buffer_size == 0 || buffer_size > DEFAULT_BUFFER_SIZE)		    buffer_size = DEFAULT_BUFFER_SIZE;		}	      /* Possibly enable timer-based stack pointer retrieval.  */	      if (getenv ("MEMUSAGE_NO_TIMER") == NULL)		{		  struct sigaction act;		  act.sa_handler = (sighandler_t) &int_handler;		  act.sa_flags = SA_RESTART;		  sigfillset (&act.sa_mask);		  if (sigaction (SIGPROF, &act, NULL) >= 0)		    {		      struct itimerval timer;		      timer.it_value.tv_sec = 0;		      timer.it_value.tv_usec = 1;		      timer.it_interval = timer.it_value;		      setitimer (ITIMER_PROF, &timer, NULL);		    }		}	    }	}      if (!not_me && getenv ("MEMUSAGE_TRACE_MMAP") != NULL)	trace_mmap = true;    }}