• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

oga's tools


Commit MetaInfo

Revisiond9d15c535644a2a653500b8f3577e900fa5ac38f (tree)
Time2014-05-01 08:25:58
Authoroga <oga@mxg....>
Commiteroga

Log Message

fix open() argument, and add stdlib.h

Change Summary

Incremental Difference

--- a/xmem.c
+++ b/xmem.c
@@ -19,6 +19,7 @@
1919 #include <math.h>
2020 #include <unistd.h>
2121 #include <errno.h>
22+#include <stdlib.h>
2223
2324 #define VER "Ver 0.34"
2425 #define S_MEM "Memory"
--- a/xpkt.c
+++ b/xpkt.c
@@ -20,6 +20,7 @@
2020 #include <net/if.h>
2121 #include <netinet/in.h>
2222 #include <sys/ioctl.h>
23+#include <stdlib.h>
2324
2425 #define VER "Ver 1.06"
2526 #define S_IN "IN"
--- a/xpstat.c
+++ b/xpstat.c
@@ -8,6 +8,7 @@
88 * V1.01 96/10/30 -fn support and wait time adjust
99 * V1.02 96/10/31 -fs, -n support
1010 * V1.03 96/11/06 .xpstat comment, -x, -y, -l support
11+ * V1.04 14/05/01 fix open argument
1112 *
1213 */
1314 #include <stdio.h>
@@ -19,8 +20,10 @@
1920 #include <fcntl.h>
2021 #include <X11/Xlib.h>
2122 #include <X11/Xutil.h>
23+#include <stdlib.h>
24+#include <string.h>
2225
23-#define VER "1.03"
26+#define VER "1.04"
2427 #define MAXPRC 64
2528 #define BARLEN 12
2629 #define MAXBARLEN 30
@@ -457,7 +460,7 @@ char *b[];
457460
458461 while(1) {
459462 /* ブロセスデータ採取 */
460- if ((fd = open(tmpf,O_CREAT|O_RDWR|O_TRUNC)) < 0) {
463+ if ((fd = open(tmpf,O_CREAT|O_RDWR|O_TRUNC, 0666)) < 0) {
461464 perror("open pstmp");
462465 exit(1);
463466 }
@@ -543,3 +546,7 @@ char *b[];
543546 }
544547 }
545548 }
549+
550+/* vim:ts=8:sw=8:
551+ */
552+