cbsheng / tinyhttpd Goto Github PK
View Code? Open in Web Editor NEWtinyhttpd的详细注释版,十分适合入门者学习的一个项目
tinyhttpd的详细注释版,十分适合入门者学习的一个项目
Line 313 in 247de7e
这个编译警告可以解决吗?
gcc -W -Wall -lpthread -o httpd httpd.c
httpd.c: In function ‘startup’:
httpd.c:533:52: warning: pointer targets in passing argument 3 of ‘getsockname’ differ in signedness [-Wpointer-sign]
if (getsockname(httpd, (struct sockaddr *)&name, &namelen) == -1)
^
In file included from httpd.c:23:0:
/usr/include/sys/socket.h:127:12: note: expected ‘socklen_t * restrict {aka unsigned int * restrict}’ but argument is of type ‘int *’
extern int getsockname (int __fd, __SOCKADDR_ARG __addr,
^
httpd.c: In function ‘main’:
httpd.c:591:24: warning: pointer targets in passing argument 3 of ‘accept’ differ in signedness [-Wpointer-sign]
&client_name_len);
^
In file included from httpd.c:23:0:
/usr/include/sys/socket.h:243:12: note: expected ‘socklen_t * restrict {aka unsigned int * restrict}’ but argument is of type ‘int *’
extern int accept (int __fd, __SOCKADDR_ARG __addr,
^
httpd running on port 50724 Can't locate CGI.pm in @INC (you may need to install the CGI module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.26.1 /usr/local/share/perl/5.26.1 /usr/lib/x86_64-linux-gnu/perl5/5.26 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.26 /usr/share/perl/5.26 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at htdocs/color.cgi line 4. BEGIN failed--compilation aborted at htdocs/color.cgi line 4. ^C
跑的时候(运行,然后输入颜色),出现这个问题
我看到393行,有//,但是没写注释,估计是大佬忘记了。我查了一下,MSG_PEEK表示窥探缓存中的数据,但是不会导致这些数据被清除。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.