~elementary-apps/granite/saved-state

« back to all changes in this revision

Viewing changes to lib/Application.vala

  • Committer: xapantu
  • Date: 2014-08-05 15:04:49 UTC
  • mfrom: (756.3.2 granite)
  • Revision ID: xapantu@gmail.com-20140805150449-nyoouhohc3xwnkol
Merge Olivier Duchateau's patch, via Cameron Norman's branch: Support BSD systems (prctl, setproctitle)

Show diffs side-by-side

added added

removed removed

Lines of Context:
145
145
        public Application () {
146
146
#if LINUX
147
147
            prctl (15, exec_name, 0, 0, 0);
 
148
#elif DRAGON_FLY || FREE_BSD || NET_BSD || OPEN_BSD
 
149
            setproctitle (exec_name);
148
150
#endif
149
151
            Environment.set_prgname (exec_name);
150
152
 
166
168
#if LINUX
167
169
        [CCode (cheader_filename = "sys/prctl.h", cname = "prctl")]
168
170
            protected extern static int prctl (int option, string arg2, ulong arg3, ulong arg4, ulong arg5);
 
171
#elif DRAGON_FLY || FREE_BSD
 
172
        [CCode (cheader_filename = "unistd.h", cname = "setproctitle")]
 
173
            protected extern static void setproctitle (string fmt, ...);
 
174
#elif NET_BSD || OPEN_BSD
 
175
        [CCode (cheader_filename = "stdlib.h", cname = "setproctitle")]
 
176
            protected extern static void setproctitle (string fmt, ...);
169
177
#endif
170
178
 
171
179
        /**