Linux c Êý¾ÝÀàÐÍ
µ±LinuxÄÚºËÔÚÌåϵ½á¹¹²îÒì½Ï´óµÄƽ̨֮¼äÒÆֲʱ£¬»á²úÉúÓëÊý¾ÝÀàÐÍÏà¹ØµÄÎÊÌâ¡£
.ÔÚ±àÒëÄÚºËʱʹÓà -Wall -W strict-prototypes Ñ¡Ïî, ¿ÉÒÔ±ÜÃâºÜ¶à´íÎóµÄ·¢Éú
.ÄÚºËʹÓõĻù±¾Êý¾ÝÀàÐÍÖ÷ÒªÓÐ:
int ±ê×¼CÓïÑÔÕûÊýÀàÐÍ
u32 32λÕûÊýÀàÐÍ
pid_t Ìض¨Äں˶ÔÏópidµÄÀàÐÍ
.ÔÚ²»Í¬µÄCPUÌåϵ½á¹¹ÉÏ£¬CÓïÑÔµÄÊý¾ÝÀàÐÍËùÕ¼¿Õ¼ä²»Ò»Ñù¡£
arch
char
short
int
long
ptr
long-long
u8
u16
u32
u64
i686
1
2
4
4
4
8
1
2
4
8
i386
1
2
4
4
4
8
1
2
4
8
alpha
1
2
4
8
8
8
1
2
4
8
armv41
1
2
4
4
4
8
1
2
4
8
ia64
1
2
4
8
8
8
1
2
4
8
m68k
1
2
4
4
4
8
1
2
4
8
mips
1
2
4
4
4
8
1
2
4
8
ppc
1
2
4
4
4
8
1
2
4
8
sparc
1
2
4
4
4
8
1
2
4
8
sparc64
1
2
4
4
4
8
1
2
4
8
.ÄÚºËÖеĵØÖ·ÊÇunsigned longÀàÐÍ£¬ Ö¸Õë´óСºÍlongÀàÐÍÏàͬ
.ÄÚºËÌṩÏÂÁÐÊý¾ÝÀàÐÍ£¬ ËùÓÐÀàÐÍÔÚÍ·Îļþ<asm/types.h>ÖÐÉùÃ÷£¬ Õâ¸öÎļþÓÖ±»Í·Îļþ<Linux/types.h>Ëù°üº¬£¬ ÏÂÃæÊÇ include/asm/typs.hÎļþ
[File] /usr/src/kernels/2.6.9-22.EL-i686/include/asm-i386/types.h
#ifndef _I386_TYPES_H
#define _I386_TYPES_H
#ifndef __ASSEMBLY__
typedef unsigned short umode_t;
/*
* __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
* header files exported to user space
*/
typedef __signed__ char __s8;
typedef unsigned char __u8;
typedef __signed__ short __s16;
typedef unsigned short __u16;
typedef __signed__ int __s32;
typedef unsigned int __u32;
#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
typedef __sig
Ïà¹ØÎĵµ£º
ʲôÊÇprocÎļþϵͳ£¿ procÎļþϵͳÊÇÒ»¸öαÎļþϵͳ£¬ËüÖ»´æÔÚÄÚ´æµ±ÖУ¬¶ø²»Õ¼ÓÃÍâ´æ¿Õ¼ä¡£ËüÒÔÎļþϵͳµÄ·½Ê½Îª·ÃÎÊϵͳÄÚºËÊý¾ÝµÄ²Ù×÷Ìṩ½Ó¿Ú¡£Óû§ºÍÓ¦ÓóÌÐò¿ÉÒÔͨ¹ýprocµÃµ½ÏµÍ³µÄÐÅÏ¢£¬²¢¿ÉÒԸıäÄں˵ÄijЩ²ÎÊý¡£ÓÉÓÚϵͳµÄÐÅÏ¢£¬Èç½ø³Ì£¬ÊǶ¯Ì¬¸Ä±äµÄ£¬ËùÒÔÓû§»òÓ¦ÓóÌÐò¶ÁÈ¡procÎļþʱ£¬procÎļþϵͳÊǶ¯Ì¬´Ó ......
¡¡1.1¡¢ÓÃrootÓû§µÇ¼£¬½øÈëÖÕ¶ËÃüÁîģʽ£»
¡¡¡¡1.2¡¢¿ªÆôftp·þÎñ¡£
¡¡¡¡cd /etc/xinetd.d £¬±à¼ftp·þÎñµÄÅäÖÃÎļþgssftpµÄÉèÖãº
¡¡¡¡¿ªÆôftp·þÎñÉèÖÃ.
¡¡¡¡vi gssftp £¬½« ÐÞ¸ÄÁ½ÏîÄÚÈÝ£º
¡¡¡¡£¨1£©server_args = -l –a È¥µô-a ¸ÄΪserver_args = -l
¡¡¡¡£¨2£©disable=yes¸ÄΪdisable=no
¡¡¡¡£¨3£©±£´æÍ˳ ......
# cd /home/tmp (½øÈëѹËõ°üËùÔÚĿ¼)
# groupadd mysql (½¨Á¢mysql×é)
# useradd -g mysql mysql (ÔÚmysql×éÖн¨Á¢mysqlÓû§)
# tar -zxvf mysql-5.0.37.tar.gz (½âѹmysqlÔ´Âë,bz2ѹËõ°üÇëÓÓtar -jvxf ÎļþÃû”Ö¸Áî)
# cd mysql-5.0.37 (½øÈë½âѹĿ¼)
# ./configure --prefix=/usr/local/mysql (p ......
#include <stdio.h>
#include <string.h>
int
main(void)
{
char str[] =
"3BVPSq4xF.K?=u#,"
"G'K<MrDnRr7gH%#,"
"XKf<f%G`w^=?C<#,"
"HgU_AnNR?*PDQU#,"
......