小编Eri*_*hen的帖子

Nginx 配置错误:无法检测整数大小

当我尝试在 nginx src 路径中运行“configure”命令时,出现了以下错误。

checking for OS
+ Linux 2.6.32-71.el6.x86_64 x86_64
checking for C compiler ... found
+ using GNU C compiler
+ gcc version: 4.4.6 20110731 (Red Hat 4.4.6-3) (GCC) 
checking for gcc -pipe switch ... found
checking for gcc builtin atomic operations ... not found
checking for C99 variadic macros ... not found
checking for gcc variadic macros ... not found
checking for unistd.h ... found
checking for inttypes.h ... found
checking for limits.h ... found
checking for …
Run Code Online (Sandbox Code Playgroud)

nginx configure

5
推荐指数
1
解决办法
7835
查看次数

什么是Java的类文字Scala的模拟,例如Foo.class?

在Java中我会写logger.getLogger(NameOfClass.class).如何在Scala中编写相同的内容?

scala

3
推荐指数
1
解决办法
574
查看次数

如何在linux中使用c时间来打印函数运行时间?

当我在linux中运行c代码时,代码总是不会打印出经过的时间,结果总是为0.代码如下:

#include <sys/time.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
void main(int argc,char* argv[]){
  int n;
  if(argc == 2){
    n = atoi(argv[1]);
  }
  struct timeval start, end;
  gettimeofday(&start, 0);
  int r = fib(n);
  gettimeofday(&end, 0);
  long mtime, s,us;
  s = end.tv_sec  - start.tv_sec;
  us = end.tv_usec - start.tv_usec;
  printf("s=%f,us=%f  \n", s, us);
  mtime = (s*1000 + us/1000.0)+0.5;
  printf("Fib result for %d is: %d;elapsing %f \n", n, r, mtime); 

}

int fib(int n){
  if(n == 0) return 0;
  if(n == 1) return …
Run Code Online (Sandbox Code Playgroud)

c linux time

2
推荐指数
2
解决办法
2万
查看次数

标签 统计

c ×1

configure ×1

linux ×1

nginx ×1

scala ×1

time ×1