$NetBSD: patch-ab,v 1.16 2016/02/24 17:39:18 ryoon Exp $

* Add NetBSD support

--- fotoxx-16.02.1.cc.orig	2016-01-01 08:20:29.000000000 +0000
+++ fotoxx-16.02.1.cc
@@ -465,28 +465,28 @@ int initzfunc(void *)
    if (err) {
       printz("copy default pattern files \n");
       mkdir(pattern_dirk,0750);
-      shell_quiet("cp -n %s/patterns/* %s",get_zdatadir(),pattern_dirk);
+      shell_quiet("yes 'n' | cp -i %s/patterns/* %s",get_zdatadir(),pattern_dirk);
    }
 
    err = stat(retouch_combo_dirk,&statb);                                        //  retouch combo settings
    if (err) {
       printz("copy default retouch_combo files \n");
       mkdir(retouch_combo_dirk,0750);
-      shell_quiet("cp -n %s/retouch_combo/* %s",get_zdatadir(),retouch_combo_dirk);
+      shell_quiet("yes 'n' | cp -i %s/retouch_combo/* %s",get_zdatadir(),retouch_combo_dirk);
    }
 
    err = stat(custom_kernel_dirk,&statb);                                        //  custom convolution kernels
    if (err) {
       printz("copy default custom_kernel files \n");
       mkdir(custom_kernel_dirk,0750);
-      shell_quiet("cp -n %s/custom_kernel/* %s",get_zdatadir(),custom_kernel_dirk);
+      shell_quiet("yes 'n' | cp -i %s/custom_kernel/* %s",get_zdatadir(),custom_kernel_dirk);
    }
 
    err = stat(favorites_dirk,&statb);                                            //  favorites menu
    if (err) {
       printz("copy default favorites menu \n");
       mkdir(favorites_dirk,0750);
-      shell_quiet("cp -n %s/favorites/* %s",get_zdatadir(),favorites_dirk);
+      shell_quiet("yes 'n' | cp -i %s/favorites/* %s",get_zdatadir(),favorites_dirk);
    }
 
    err = stat(tags_defined_file,&statb);                                         //  tags_defined file
@@ -510,7 +510,7 @@ int initzfunc(void *)
    screenhh = gdk_screen_get_height(screen);
    printz("screen width: %d  height: %d \n",screenww,screenhh);
 
-   NWT = get_nprocs();                                                           //  get SMP CPU count
+   NWT = sysconf(_SC_NPROCESSORS_ONLN);           //  get SMP CPU count
    if (NWT <= 0) NWT = 2;
    if (NWT > max_threads) NWT = max_threads;                                     //  compile time limit
    printz("using %d threads \n",NWT);
