设为首页
收藏本站
用户名
Email
自动登录
找回密码
密码
登录
注册
快捷导航
平台
Portal
论坛
BBS
文库
项目
群组
Group
我的博客
Space
搜索
搜索
热搜:
shell
linux
mysql
本版
用户
LinuxSir.cn,穿越时空的Linuxsir!
»
论坛
›
编程开发讨论区 —— LinuxSir.cn
›
Linux 程序设计专题讨论
›
这个程序在REDHAT 9.0 能编译,但在UNIX不行。(小问题) ...
返回列表
查看:
557
|
回复:
2
这个程序在REDHAT 9.0 能编译,但在UNIX不行。(小问题)
[复制链接]
home
home
当前离线
积分
1150
IP卡
狗仔卡
发表于 2003-12-27 21:47:53
|
显示全部楼层
|
阅读模式
这是在UNIX编译
# gcc utime.c
In file included from utime.c:14:
/usr/include/utime.h:40: syntax error before `time_t'
这是该系统的/usr/include/utime.h文件。
36 #ifndef _UTIME_H_
37 #define _UTIME_H_
38
39 struct utimbuf {
40 time_t actime; /* Access time */
41 time_t modtime; /* Modification time */
42 };
在Redhat 9.0 能通过。
这是/usr/include/utime.h
37 /* Structure describing file times. */
38 struct utimbuf
39 {
40 __time_t actime; /* Access time. */
41 __time_t modtime; /* Modification time. */
42 };
差别很小。请问__time_t和time_t有什么不同?怎么会这样?:help:
回复
使用道具
举报
提升卡
置顶卡
沉默卡
喧嚣卡
变色卡
显身卡
fog_proxy
fog_proxy
当前离线
积分
515
IP卡
狗仔卡
发表于 2003-12-28 00:01:42
|
显示全部楼层
我没有unix系统,不过从linux的源代码来看,time_t和__time_t应该是一样的。具体可以看一下,/usr/include/bits/下的types.h,typesizes.h和/usr/include下的time.h.
你可以在unix下编译的时候加入types.h和typesizes.h头文件试试。
回复
支持
反对
使用道具
举报
显身卡
dancingpig
dancingpig
当前离线
积分
1525
IP卡
狗仔卡
发表于 2003-12-28 17:22:02
|
显示全部楼层
unix的数据类型和linux有区别,函数的位置也不一样
unp好象写的
回复
支持
反对
使用道具
举报
显身卡
返回列表
高级模式
B
Color
Image
Link
Quote
Code
Smilies
您需要登录后才可以回帖
登录
|
注册
本版积分规则
发表回复
回帖后跳转到最后一页
浏览过的版块
开源软件专题讨论
Slackware Linux
shell进阶应用、shell编程
LFS(LinuxfromScratch)
Copyright © 2002-2023
LinuxSir.cn
(http://www.linuxsir.cn/) 版权所有 All Rights Reserved.
Powered by
RedflagLinux!
技术支持:
中科红旗
|
京ICP备19024520号
快速回复
返回顶部
返回列表