Skip to content

Instantly share code, notes, and snippets.

View qiuchengxuan's full-sized avatar

qiuchengxuan qiuchengxuan

  • Yunshan Networks
  • Beijing
View GitHub Profile
unsafe fn get_list(p: &Path) -> ~[~str] {
use libc::{DIR, dirent_t};
use libc::{opendir, readdir, closedir};
extern mod rustrt {
unsafe fn rust_list_dir_val(ptr: *dirent_t)
-> *libc::c_char;
}
let input = p.to_str();
let mut strings = ~[];
let input_ptr = ::cast::transmute(&input[0]);
@ttakezawa
ttakezawa / emacs-latest.spec
Created January 3, 2013 12:21
CentOS6.3でemacs 24.2のRPM作成に使ったSPECファイル
Name: emacs-latest
Version: 24.2
Release: 1%{?dist}
Summary: GNU Emacs
#Group:
License: GPL
URL: http://www.gnu.org/software/emacs/
Source0: http://ftp.gnu.org/pub/gnu/emacs/emacs-24.2.tar.xz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)