Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
225a2cff
Commit
225a2cff
authored
Oct 25, 2011
by
Paul Eggert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* sysdep.c (system_process_attributes): Simplify pid_t handling.
parent
eacd378d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
21 deletions
+5
-21
src/ChangeLog
src/ChangeLog
+3
-3
src/sysdep.c
src/sysdep.c
+2
-18
No files found.
src/ChangeLog
View file @
225a2cff
2011-10-2
5
Paul Eggert <eggert@cs.ucla.edu>
2011-10-2
6
Paul Eggert <eggert@cs.ucla.edu>
Fix integer width and related bugs.
* alloc.c (pure_bytes_used_lisp, pure_bytes_used_non_lisp):
...
...
@@ -627,8 +627,8 @@
Don't assume pid_t fits in int; on 64-bit AIX pid_t is 64-bit.
(emacs_read, emacs_write):
Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
(system_process_attributes): Don't assume uid_t, gid_t,
and
double all fit in int
or even EMACS_INT
.
(system_process_attributes): Don't assume uid_t, gid_t,
EMACS_INT,
and
double all fit in int.
* term.c (set_tty_color_mode):
Check that fixnums are in proper range for system types.
* termhooks.h (struct input_event):
...
...
src/sysdep.c
View file @
225a2cff
...
...
@@ -2705,15 +2705,7 @@ system_process_attributes (Lisp_Object pid)
struct
gcpro
gcpro1
,
gcpro2
;
CHECK_NUMBER_OR_FLOAT
(
pid
);
if
(
FLOATP
(
pid
))
{
double
v
=
XFLOAT_DATA
(
pid
);
if
(
!
(
TYPE_MINIMUM
(
pid_t
)
<=
v
&&
v
<
TYPE_MAXIMUM
(
pid_t
)
+
1
.
0
))
return
attrs
;
proc_id
=
v
;
}
else
proc_id
=
XINT
(
pid
);
CONS_TO_INTEGER
(
pid
,
pid_t
,
proc_id
);
sprintf
(
procfn
,
"/proc/%"
pMd
,
proc_id
);
if
(
stat
(
procfn
,
&
st
)
<
0
)
return
attrs
;
...
...
@@ -2978,15 +2970,7 @@ system_process_attributes (Lisp_Object pid)
struct
gcpro
gcpro1
,
gcpro2
;
CHECK_NUMBER_OR_FLOAT
(
pid
);
if
(
FLOATP
(
pid
))
{
double
v
=
XFLOAT_DATA
(
pid
);
if
(
!
(
TYPE_MINIMUM
(
pid_t
)
<=
v
&&
v
<
TYPE_MAXIMUM
(
pid_t
)
+
1
.
0
))
return
attrs
;
proc_id
=
v
;
}
else
proc_id
=
XINT
(
v
);
CONS_TO_INTEGER
(
pid
,
pid_t
,
proc_id
);
sprintf
(
procfn
,
"/proc/%"
pMd
,
proc_id
);
if
(
stat
(
procfn
,
&
st
)
<
0
)
return
attrs
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment