pike.git / src / modules / _Stdio / efuns.c

version» Context lines:

pike.git/src/modules/_Stdio/efuns.c:670:    struct statvfs st;   #else /* !HAVE_STATVFS */   #ifdef HAVE_STATFS   #ifdef HAVE_STRUCT_STATFS    struct statfs st;   #else /* !HAVE_STRUCT_STATFS */   #ifdef HAVE_STRUCT_FS_DATA    /* Probably only ULTRIX has this name for the struct */    struct fs_data st;   #else /* !HAVE_STRUCT_FS_DATA */ -  /* Should not be reached */ +    #error No struct to hold statfs() data.   #endif /* HAVE_STRUCT_FS_DATA */   #endif /* HAVE_STRUCT_STATFS */   #else /* !HAVE_STATFS */   #ifdef HAVE_USTAT    PIKE_STAT_T statbuf;    struct ustat st;   #else /* !HAVE_USTAT */ -  /* Should not be reached */ +    #error No stat function for filesystems.   #endif /* HAVE_USTAT */   #endif /* HAVE_STATFS */   #endif /* HAVE_STATVFS */    int i;    struct pike_string *str;       if(args<1)    SIMPLE_TOO_FEW_ARGS_ERROR("filesystem_stat", 1);    if(TYPEOF(sp[-args]) != T_STRING)
pike.git/src/modules/_Stdio/efuns.c:718: Inside #if defined(HAVE_STATFS)
   i = statfs(str->str, &st, sizeof(st), 0);   #else    i = statfs(str->str, &st);   #endif /* HAVE_SYSV_STATFS */   #else /* !HAVE_STATFS */   #ifdef HAVE_USTAT    if (!(i = fd_stat(str->str, &statbuf))) {    i = ustat(statbuf.st_rdev, &st);    }   #else -  /* Should not be reached */ +    #error No stat function for filesystems.   #endif /* HAVE_USTAT */   #endif /* HAVE_STATFS */   #endif /* HAVE_STATVFS */    THREADS_DISALLOW();    pop_n_elems(args);    if(i==-1)    {    push_int(0);    }else{
pike.git/src/modules/_Stdio/efuns.c:778: Inside #if defined(HAVE_STATFS)
  #endif /* HAVE_STATFS_F_BAVAIL */   #else /* !HAVE_STRUCT_STATFS */   #ifdef HAVE_STRUCT_FS_DATA    /* ULTRIX */    push_static_text("blocksize"); push_int(st.fd_bsize);    push_static_text("blocks"); push_int(st.fd_btot);    push_static_text("bfree"); push_int(st.fd_bfree);    push_static_text("bavail"); push_int(st.fd_bfreen);    num_fields += 4;   #else /* !HAVE_STRUCT_FS_DATA */ -  /* Should not be reached */ +    #error No struct to hold statfs() data.   #endif /* HAVE_STRUCT_FS_DATA */   #endif /* HAVE_STRUCT_STATFS */   #else /* !HAVE_STATFS */   #ifdef HAVE_USTAT    push_static_text("bfree"); push_int(st.f_tfree);    push_static_text("ffree"); push_int(st.f_tinode);    push_static_text("fsname"); push_text(st.f_fname);    num_fields += 3;   #else -  /* Should not be reached */ +    #error No stat function for filesystems.   #endif /* HAVE_USTAT */   #endif /* HAVE_STATFS */   #endif /* HAVE_STATVFS */    f_aggregate_mapping(num_fields*2);    }   }      #endif /* HAVE_STATVFS || HAVE_STATFS || HAVE_USTAT */   #endif /* __NT__ */