~ubuntu-branches/ubuntu/utopic/coreutils/utopic-proposed

« back to all changes in this revision

Viewing changes to lib/same-inode.h

  • Committer: Package Import Robot
  • Author(s): Colin Watson
  • Date: 2012-11-28 03:03:42 UTC
  • mfrom: (8.3.4 sid)
  • Revision ID: package-import@ubuntu.com-20121128030342-21zanj8354gas5gr
Tags: 8.20-3ubuntu1
* Resynchronise with Debian.  Remaining changes:
  - Make 'uname -i -p' return the real processor/hardware, instead of
    unknown.
  - Build-depend on gettext:any instead of on gettext, so that apt-get can
    properly resolve build-dependencies on the tool when cross-building.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* Determine whether two stat buffers refer to the same file.
2
2
 
3
 
   Copyright (C) 2006, 2009-2011 Free Software Foundation, Inc.
 
3
   Copyright (C) 2006, 2009-2012 Free Software Foundation, Inc.
4
4
 
5
5
   This program is free software: you can redistribute it and/or modify
6
6
   it under the terms of the GNU General Public License as published by
18
18
#ifndef SAME_INODE_H
19
19
# define SAME_INODE_H 1
20
20
 
21
 
# define SAME_INODE(Stat_buf_1, Stat_buf_2) \
22
 
   ((Stat_buf_1).st_ino == (Stat_buf_2).st_ino \
23
 
    && (Stat_buf_1).st_dev == (Stat_buf_2).st_dev)
 
21
# ifdef __VMS
 
22
#  define SAME_INODE(a, b)             \
 
23
    ((a).st_ino[0] == (b).st_ino[0]    \
 
24
     && (a).st_ino[1] == (b).st_ino[1] \
 
25
     && (a).st_ino[2] == (b).st_ino[2] \
 
26
     && (a).st_dev == (b).st_dev)
 
27
# else
 
28
#  define SAME_INODE(a, b)    \
 
29
    ((a).st_ino == (b).st_ino \
 
30
     && (a).st_dev == (b).st_dev)
 
31
# endif
24
32
 
25
33
#endif